Ignore unsupported cookie policies

Contributed by Dmitry Potapov <dpotapov@yandex-team.ru>

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1623316 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2014-09-08 07:57:20 +00:00
parent e82fdff2e9
commit cffb877b1e
1 changed files with 5 additions and 1 deletions

View File

@ -148,7 +148,11 @@ public class RequestAddCookies implements HttpRequestInterceptor {
// Get an instance of the selected cookie policy
final CookieSpecProvider provider = registry.lookup(policy);
if (provider == null) {
throw new HttpException("Unsupported cookie policy: " + policy);
if (this.log.isDebugEnabled()) {
this.log.debug("Unsupported cookie policy: " + policy);
}
return;
}
final CookieSpec cookieSpec = provider.create(clientContext);
// Get all cookies available in the HTTP state