You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Vladimir (JIRA)" <ji...@apache.org> on 2007/08/15 23:59:30 UTC
[jira] Created: (HTTPCLIENT-685) Problem using
CookiePolicy.NETSCAPE policy
Problem using CookiePolicy.NETSCAPE policy
-------------------------------------------
Key: HTTPCLIENT-685
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-685
Project: HttpComponents HttpClient
Issue Type: Bug
Components: HttpCookie
Affects Versions: 3.0.1
Reporter: Vladimir
Priority: Minor
Cookies are not sent correctly by httpclient.
Here is a code snippet:
---------
PostMethod postMethod = new PostMethod("http://someurl");
postMethod.setParameter("email", "vslaykovsky@gmail.com");
postMethod.setParameter("pass", "somepassword");
HttpClient client = new HttpClient();
client.getParams().setCookiePolicy(CookiePolicy.NETSCAPE);
client.executeMethod(postMethod);
String getarg = "http://someurl" + postMethod.getResponseHeader("Location").getValue();
GetMethod get = new GetMethod(getarg);
get.setFollowRedirects(true);
client.executeMethod(get);
------
After executing postMethod several cookies are injected in httpclient. After that get method must use those cookies and NETSCAPE policy, but using sniffer I see, that all cookies are separated in different lines instead of one line. For example:
Needed:
Cookie: first=value; second=second_value
Actual:
Cookie: first=value
Cookie: second=second_value
------
Only while writing this story, I've realized, that I'm using HttpClient 3.0.1, so this bug is probably already fixed. Sorry :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Resolved: (HTTPCLIENT-685) Problem using
CookiePolicy.NETSCAPE policy
Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCLIENT-685.
------------------------------------------
Resolution: Invalid
Neither Netscape draft, nor RFC2109, nor RFC2965 require all cookies be sent in one request header. Please use 'http.protocol.single-cookie-header' parameter if you want to force all cookies into one request header.
Oleg
> Problem using CookiePolicy.NETSCAPE policy
> -------------------------------------------
>
> Key: HTTPCLIENT-685
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-685
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpCookie
> Affects Versions: 3.0.1
> Reporter: Vladimir
> Priority: Minor
>
> Cookies are not sent correctly by httpclient.
> Here is a code snippet:
> ---------
> PostMethod postMethod = new PostMethod("http://someurl");
> postMethod.setParameter("email", "vslaykovsky@gmail.com");
> postMethod.setParameter("pass", "somepassword");
> HttpClient client = new HttpClient();
> client.getParams().setCookiePolicy(CookiePolicy.NETSCAPE);
> client.executeMethod(postMethod);
> String getarg = "http://someurl" + postMethod.getResponseHeader("Location").getValue();
> GetMethod get = new GetMethod(getarg);
> get.setFollowRedirects(true);
> client.executeMethod(get);
> ------
> After executing postMethod several cookies are injected in httpclient. After that get method must use those cookies and NETSCAPE policy, but using sniffer I see, that all cookies are separated in different lines instead of one line. For example:
> Needed:
> Cookie: first=value; second=second_value
> Actual:
> Cookie: first=value
> Cookie: second=second_value
> ------
> Only while writing this story, I've realized, that I'm using HttpClient 3.0.1, so this bug is probably already fixed. Sorry :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCLIENT-685) Problem using
CookiePolicy.NETSCAPE policy
Posted by "Vladimir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520189 ]
Vladimir commented on HTTPCLIENT-685:
-------------------------------------
Thank you! It's very helpful
> Problem using CookiePolicy.NETSCAPE policy
> -------------------------------------------
>
> Key: HTTPCLIENT-685
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-685
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpCookie
> Affects Versions: 3.0.1
> Reporter: Vladimir
> Priority: Minor
>
> Cookies are not sent correctly by httpclient.
> Here is a code snippet:
> ---------
> PostMethod postMethod = new PostMethod("http://someurl");
> postMethod.setParameter("email", "vslaykovsky@gmail.com");
> postMethod.setParameter("pass", "somepassword");
> HttpClient client = new HttpClient();
> client.getParams().setCookiePolicy(CookiePolicy.NETSCAPE);
> client.executeMethod(postMethod);
> String getarg = "http://someurl" + postMethod.getResponseHeader("Location").getValue();
> GetMethod get = new GetMethod(getarg);
> get.setFollowRedirects(true);
> client.executeMethod(get);
> ------
> After executing postMethod several cookies are injected in httpclient. After that get method must use those cookies and NETSCAPE policy, but using sniffer I see, that all cookies are separated in different lines instead of one line. For example:
> Needed:
> Cookie: first=value; second=second_value
> Actual:
> Cookie: first=value
> Cookie: second=second_value
> ------
> Only while writing this story, I've realized, that I'm using HttpClient 3.0.1, so this bug is probably already fixed. Sorry :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org
[jira] Commented: (HTTPCLIENT-685) Problem using
CookiePolicy.NETSCAPE policy
Posted by "Vladimir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HTTPCLIENT-685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520114 ]
Vladimir commented on HTTPCLIENT-685:
-------------------------------------
I've just checked this issue on svn sources. It is still not fixed
> Problem using CookiePolicy.NETSCAPE policy
> -------------------------------------------
>
> Key: HTTPCLIENT-685
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-685
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpCookie
> Affects Versions: 3.0.1
> Reporter: Vladimir
> Priority: Minor
>
> Cookies are not sent correctly by httpclient.
> Here is a code snippet:
> ---------
> PostMethod postMethod = new PostMethod("http://someurl");
> postMethod.setParameter("email", "vslaykovsky@gmail.com");
> postMethod.setParameter("pass", "somepassword");
> HttpClient client = new HttpClient();
> client.getParams().setCookiePolicy(CookiePolicy.NETSCAPE);
> client.executeMethod(postMethod);
> String getarg = "http://someurl" + postMethod.getResponseHeader("Location").getValue();
> GetMethod get = new GetMethod(getarg);
> get.setFollowRedirects(true);
> client.executeMethod(get);
> ------
> After executing postMethod several cookies are injected in httpclient. After that get method must use those cookies and NETSCAPE policy, but using sniffer I see, that all cookies are separated in different lines instead of one line. For example:
> Needed:
> Cookie: first=value; second=second_value
> Actual:
> Cookie: first=value
> Cookie: second=second_value
> ------
> Only while writing this story, I've realized, that I'm using HttpClient 3.0.1, so this bug is probably already fixed. Sorry :)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org