hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r702605 - in /httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol: RequestAddCookies.java ResponseProcessCookies.java
Date Tue, 07 Oct 2008 19:48:56 GMT
Author: olegk
Date: Tue Oct  7 12:48:55 2008
New Revision: 702605

URL: http://svn.apache.org/viewvc?rev=702605&view=rev
Log:
Fixed misleading INFO log message printed if no cookie spec is available in the execution
context

Modified:
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
    httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java?rev=702605&r1=702604&r2=702605&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/RequestAddCookies.java
Tue Oct  7 12:48:55 2008
@@ -98,7 +98,7 @@
         }
         
         // 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");

Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java?rev=702605&r1=702604&r2=702605&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
(original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/protocol/ResponseProcessCookies.java
Tue Oct  7 12:48:55 2008
@@ -76,6 +76,12 @@
             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 @@
             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);



Mime
View raw message