/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/ |
H A D | HttpCookieTest.java | 81 HttpCookie cookie = new HttpCookie("harmony!", null); 82 assertEquals("harmony!", cookie.getName()); 84 cookie = new HttpCookie("harmon$y", null); 85 assertEquals("harmon$y", cookie.getName()); 174 HttpCookie cookie = new HttpCookie("name", "value"); 175 assertEquals(1, cookie.getVersion()); 176 cookie.setVersion(0); 177 assertEquals(0, cookie.getVersion()); 178 cookie.setVersion(1); 179 assertEquals(1, cookie [all...] |
H A D | CookiePolicyTest.java | 34 HttpCookie cookie = new HttpCookie("Harmony_6", "ongoing"); 37 CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(null, cookie); 58 boolean accept = CookiePolicy.ACCEPT_ALL.shouldAccept(null, cookie); 68 accept = CookiePolicy.ACCEPT_NONE.shouldAccept(null, cookie); 78 accept = CookiePolicy.ACCEPT_ORIGINAL_SERVER.shouldAccept(uri, cookie); 81 cookie.setDomain(".b.c"); 83 "schema://a.b.c"), cookie); 86 cookie.setDomain(".b.c"); 88 "s://a.b.c.d"), cookie); 91 cookie [all...] |
/libcore/ojluni/src/main/java/java/net/ |
H A D | CookiePolicy.java | 43 public boolean shouldAccept(URI uri, HttpCookie cookie) { 52 public boolean shouldAccept(URI uri, HttpCookie cookie) { 61 public boolean shouldAccept(URI uri, HttpCookie cookie) { 62 return HttpCookie.domainMatches(cookie.getDomain(), uri.getHost()); 68 * Will be called to see whether or not this cookie should be accepted. 71 * @param cookie the HttpCookie object in question 72 * @return <tt>true</tt> if this cookie should be accepted; 75 public boolean shouldAccept(URI uri, HttpCookie cookie); argument
|
H A D | CookieStore.java | 32 * A CookieStore object represents a storage for cookie. Can store and retrieve 37 * retrieve cookie for every outgoing HTTP request. A CookieStore 45 * Adds one HTTP cookie to the store. This is called for every 48 * <p>A cookie to store may or may not be associated with an URI. If it 49 * is not associated with an URI, the cookie's domain and path attribute 52 * where this cookie comes from. 54 * <p>If a cookie corresponding to the given URI already exists, 57 * @param uri the uri this cookie associated with. 58 * if <tt>null</tt>, this cookie will not be associated 60 * @param cookie th 67 add(URI uri, HttpCookie cookie) argument 118 remove(URI uri, HttpCookie cookie) argument [all...] |
H A D | CookieManager.java | 41 * policy decisions on cookie acceptance/rejection. 43 * <p> The HTTP cookie management in java.net package looks like: 65 * CookieHandler is at the core of cookie management. User can call 71 * or not one cookie should be accepted and put into cookie store. User can use 77 * CookieStore is the place where any accepted HTTP cookie is stored in. 90 * <p>There're various ways user can hook up his own HTTP cookie management behavior, e.g. 131 * Create a new cookie manager. 133 * <p>This constructor will create new cookie manager with default 134 * cookie stor 355 shouldAcceptInternal(URI uri, HttpCookie cookie) argument 393 pathMatches(URI uri, HttpCookie cookie) argument [all...] |
H A D | HttpCookie.java | 48 * An HttpCookie object represents an http cookie, which carries state 52 * <p>There are 3 http cookie specifications: 88 // The value of the cookie itself. 95 // Attributes encoded in the header's cookie fields. 98 private String comment; // Comment=VALUE ... describes cookie's use 99 private String commentURL; // CommentURL="http URL" ... describes cookie's use 100 private boolean toDiscard; // Discard ... discard cookie unconditionally 101 private String domain; // Domain=VALUE ... domain that sees cookie 103 private String path; // Path=VALUE ... URLs that see the cookie 104 private String portlist; // Port[="portlist"] ... the port cookie ma 1032 assign(HttpCookie cookie, String attrName, String attrValue) argument 1105 assignAttribute(HttpCookie cookie, String attrName, String attrValue) argument [all...] |
H A D | InMemoryCookieStore.java | 69 * Add one cookie into cookie store. 71 public void add(URI uri, HttpCookie cookie) { argument 73 if (cookie == null) { 74 throw new NullPointerException("cookie is null"); 79 if (cookie.getMaxAge() != 0) { 80 addIndex(uriIndex, getEffectiveURI(uri), cookie); 91 * given uri when added to the cookie store. 116 * Get all cookies in cookie store, except those have expired 126 HttpCookie cookie 333 addIndex(Map<T, List<HttpCookie>> indexStore, T index, HttpCookie cookie) argument [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | AbstractCookiesTest.java | 104 HttpCookie cookie = cookies.get(0); 105 assertEquals("a", cookie.getName()); 106 assertEquals("android", cookie.getValue()); 107 assertEquals(null, cookie.getComment()); 108 assertEquals(null, cookie.getCommentURL()); 109 assertEquals(false, cookie.getDiscard()); 110 assertEquals(server.getCookieDomain(), cookie.getDomain()); 111 assertTrue(cookie.getMaxAge() > 100000000000L); 112 assertEquals("/path", cookie.getPath()); 113 assertEquals(true, cookie 783 add(URI uri, HttpCookie cookie) argument 808 remove(URI uri, HttpCookie cookie) argument 1505 setNextCookie(HttpCookie cookie) argument 1510 add(URI uri, HttpCookie cookie) argument 1529 remove(URI uri, HttpCookie cookie) argument [all...] |
/libcore/dalvik/src/main/java/dalvik/system/ |
H A D | DexFile.java | 38 * If close is called, mCookie becomes null but the internal cookie is preserved if the close 117 //System.out.println("DEX FILE cookie is " + mCookie + " fileName=" + fileName); 152 //System.out.println("DEX FILE cookie is " + mCookie + " sourceName=" + sourceName + " outputName=" + outputName); 295 private static Class defineClass(String name, ClassLoader loader, Object cookie, argument 299 result = defineClassNative(name, loader, cookie, dexFile); 367 * Open a DEX file. The value returned is a magic VM cookie. On 392 private static native boolean closeDexFile(Object cookie); argument 393 private static native Class defineClassNative(String name, ClassLoader loader, Object cookie, argument 396 private static native String[] getClassNameList(Object cookie); argument 397 private static native boolean isBackedByOatFile(Object cookie); argument [all...] |
/libcore/ojluni/src/main/java/sun/net/www/protocol/http/ |
H A D | HttpURLConnection.java | 1565 // redirecting HTTP response may have set cookie, so 2600 // constant strings represent set-cookie header names 2601 private final static String SET_COOKIE = "set-cookie"; 2616 // Filtering only if there is a cookie handler. [Assumption: the 2617 // cookie handler will store/retrieve the HttpOnly cookies] 2624 for (HttpCookie cookie : cookies) { 2626 if (cookie.isHttpOnly()) 2630 retValue.append(cookie.header);
|