日期:2014-05-16 浏览次数:20799 次
/**
* Returns the currently configured cookies, in an unmodifiable set.
* @return the currently configured cookies, in an unmodifiable set
*/
public synchronized Set<Cookie> getCookies() {
final Set<Cookie> copy = new HashSet<Cookie>(cookies_);
return Collections.unmodifiableSet(copy);
}
for (Cookie cookie : cookies) {
try {
cookieSpec.validate(cookie, cookieOrigin);
cookieStore.addCookie(cookie);
if (this.log.isDebugEnabled()) {
this.log.debug("Cookie accepted: \""
+ cookie + "\". ");
}
} catch (MalformedCookieException ex) {
if (this.log.isWarnEnabled()) {
this.log.warn("Cookie rejected: \""
+ cookie + "\". " + ex.getMessage());
}
}
}