Fixed misleading INFO log message printed if no cookie spec is available in the execution context
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@702605 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
884a7cb69a
commit
07aab6a52d
|
@ -98,7 +98,7 @@ public class RequestAddCookies implements HttpRequestInterceptor {
|
|||
}
|
||||
|
||||
// Obtain the registry of cookie specs
|
||||
CookieSpecRegistry registry= (CookieSpecRegistry) context.getAttribute(
|
||||
CookieSpecRegistry registry = (CookieSpecRegistry) context.getAttribute(
|
||||
ClientContext.COOKIESPEC_REGISTRY);
|
||||
if (registry == null) {
|
||||
this.log.info("CookieSpec registry not available in HTTP context");
|
||||
|
|
|
@ -76,6 +76,12 @@ public class ResponseProcessCookies implements HttpResponseInterceptor {
|
|||
throw new IllegalArgumentException("HTTP context may not be null");
|
||||
}
|
||||
|
||||
// Obtain actual CookieSpec instance
|
||||
CookieSpec cookieSpec = (CookieSpec) context.getAttribute(
|
||||
ClientContext.COOKIE_SPEC);
|
||||
if (cookieSpec == null) {
|
||||
return;
|
||||
}
|
||||
// Obtain cookie store
|
||||
CookieStore cookieStore = (CookieStore) context.getAttribute(
|
||||
ClientContext.COOKIE_STORE);
|
||||
|
@ -83,13 +89,6 @@ public class ResponseProcessCookies implements HttpResponseInterceptor {
|
|||
this.log.info("Cookie store not available in HTTP context");
|
||||
return;
|
||||
}
|
||||
// Obtain actual CookieSpec instance
|
||||
CookieSpec cookieSpec = (CookieSpec) context.getAttribute(
|
||||
ClientContext.COOKIE_SPEC);
|
||||
if (cookieSpec == null) {
|
||||
this.log.info("CookieSpec not available in HTTP context");
|
||||
return;
|
||||
}
|
||||
// Obtain actual CookieOrigin instance
|
||||
CookieOrigin cookieOrigin = (CookieOrigin) context.getAttribute(
|
||||
ClientContext.COOKIE_ORIGIN);
|
||||
|
|
Loading…
Reference in New Issue