hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37712] - CookiePolicy.registerCookieSpec(CookiePolicy.DEFAULT, <Some CookieSpec>); does not work as documented
Date Fri, 02 Dec 2005 13:53:57 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37712>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37712


olegk@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |ASSIGNED




------- Additional Comments From olegk@apache.org  2005-12-02 14:53 -------
Works for me. See for yourself

Test code run against local Tomcat 5.5.9:
==========
HttpClient httpclient = new HttpClient();
GetMethod httpget = new
GetMethod("http://localhost:8080/servlets-examples/servlet/CookieExample");
httpget.setQueryString(new NameValuePair[] {
  new NameValuePair("cookiename", ""), // invalid name
  new NameValuePair("cookievalue", "value")});
httpget.getParams().setCookiePolicy(CookiePolicy.IGNORE_COOKIES);
try {
  httpclient.executeMethod(httpget);
  System.out.println(httpget.getStatusLine());
} finally {
  httpget.releaseConnection();
}


Default cookie policy / RFC2109
================================
[DEBUG] header - >> "GET
/servlets-examples/servlet/CookieExample?cookiename=&cookievalue=value
HTTP/1.1[\r][\n]"
[DEBUG] header - >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc4[\r][\n]"
[DEBUG] header - >> "Host: localhost:8080[\r][\n]"
[DEBUG] header - >> "[\r][\n]"
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "Server: Apache-Coyote/1.1[\r][\n]"
[DEBUG] header - << "Set-Cookie: =value[\r][\n]"
[DEBUG] header - << "Content-Type: text/html;charset=ISO-8859-1[\r][\n]"
[DEBUG] header - << "Content-Length: 731[\r][\n]"
[DEBUG] header - << "Date: Fri, 02 Dec 2005 13:51:40 GMT[\r][\n]"
[WARN] HttpMethodBase - Invalid cookie header: "=value". Cookie name may not be
blank


Ignore cookie policy
================================
[DEBUG] header - >> "GET
/servlets-examples/servlet/CookieExample?cookiename=&cookievalue=value
HTTP/1.1[\r][\n]"
[DEBUG] header - >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc4[\r][\n]"
[DEBUG] header - >> "Host: localhost:8080[\r][\n]"
[DEBUG] header - >> "[\r][\n]"
[DEBUG] header - << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] header - << "Server: Apache-Coyote/1.1[\r][\n]"
[DEBUG] header - << "Set-Cookie: =value[\r][\n]"
[DEBUG] header - << "Content-Type: text/html;charset=ISO-8859-1[\r][\n]"
[DEBUG] header - << "Content-Length: 731[\r][\n]"
[DEBUG] header - << "Date: Fri, 02 Dec 2005 13:51:05 GMT[\r][\n]"

Please debug WebClient class

Oleg

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message