equal
deleted
inserted
replaced
60 * Internal in-memory implementation |
60 * Internal in-memory implementation |
61 * }</pre> |
61 * }</pre> |
62 * <ul> |
62 * <ul> |
63 * <li> |
63 * <li> |
64 * CookieHandler is at the core of cookie management. User can call |
64 * CookieHandler is at the core of cookie management. User can call |
65 * CookieHandler.setDefault to set a concrete CookieHanlder implementation |
65 * CookieHandler.setDefault to set a concrete CookieHandler implementation |
66 * to be used. |
66 * to be used. |
67 * </li> |
67 * </li> |
68 * <li> |
68 * <li> |
69 * CookiePolicy.shouldAccept will be called by CookieManager.put to see whether |
69 * CookiePolicy.shouldAccept will be called by CookieManager.put to see whether |
70 * or not one cookie should be accepted and put into cookie store. User can use |
70 * or not one cookie should be accepted and put into cookie store. User can use |
352 |
352 |
353 // to determine whether or not accept this cookie |
353 // to determine whether or not accept this cookie |
354 private boolean shouldAcceptInternal(URI uri, HttpCookie cookie) { |
354 private boolean shouldAcceptInternal(URI uri, HttpCookie cookie) { |
355 try { |
355 try { |
356 return policyCallback.shouldAccept(uri, cookie); |
356 return policyCallback.shouldAccept(uri, cookie); |
357 } catch (Exception ignored) { // pretect against malicious callback |
357 } catch (Exception ignored) { // protect against malicious callback |
358 return false; |
358 return false; |
359 } |
359 } |
360 } |
360 } |
361 |
361 |
362 |
362 |