You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by John Patterson <de...@hotmail.com> on 2004/05/26 07:58:55 UTC
HttpClient Mulitple Cookie lines
Hi,
HttpClient 2.0final is sending cookies to the server on Multiple lines ie:
Cookie: first=blah
Cookie: second=blah
This is not accepted by the server that I am interfacing with (WebLog I believe).
It only accepts cookies of the form:
Cookie: first=blah; second=blah
Which is how common browsers send them.
I have tried setting Method.setStrict(true) but this does not help. Neither does changing the CookiePolicy.
Any suggestions?
Thanks,
John.
RE(2): HttpClient Mulitple Cookie lines
Posted by Perttu Roger <ro...@rfv.sfa.se>.
Had the same problem with 2.0 myself.
try setStrictMode(true).
/Roger P
John Patterson (2004-05-26 08:36):
>Found a solution myself...
>
>I upgraded to HttpClient 3.0alpha and used
>Method.getParams().setParameter(HttpMethodParams.SINGLE_COOKIE_HEADER,
>Boolean.TRUE);
>
>This worked.
>
>----- Original Message -----
>From: "John Patterson" <de...@hotmail.com>
>To: <co...@jakarta.apache.org>
>Sent: Wednesday, May 26, 2004 12:58 PM
>Subject: HttpClient Mulitple Cookie lines
>
>
>Hi,
>
>HttpClient 2.0final is sending cookies to the server on Multiple lines ie:
>
>Cookie: first=blah
>Cookie: second=blah
>
>This is not accepted by the server that I am interfacing with (WebLog I
>believe).
>
>It only accepts cookies of the form:
>
>Cookie: first=blah; second=blah
>
>Which is how common browsers send them.
>
>I have tried setting Method.setStrict(true) but this does not help. Neither
>does changing the CookiePolicy.
>
>Any suggestions?
>
>Thanks,
>
>John.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: HttpClient Mulitple Cookie lines
Posted by John Patterson <de...@hotmail.com>.
Found a solution myself...
I upgraded to HttpClient 3.0alpha and used
Method.getParams().setParameter(HttpMethodParams.SINGLE_COOKIE_HEADER,
Boolean.TRUE);
This worked.
----- Original Message -----
From: "John Patterson" <de...@hotmail.com>
To: <co...@jakarta.apache.org>
Sent: Wednesday, May 26, 2004 12:58 PM
Subject: HttpClient Mulitple Cookie lines
Hi,
HttpClient 2.0final is sending cookies to the server on Multiple lines ie:
Cookie: first=blah
Cookie: second=blah
This is not accepted by the server that I am interfacing with (WebLog I
believe).
It only accepts cookies of the form:
Cookie: first=blah; second=blah
Which is how common browsers send them.
I have tried setting Method.setStrict(true) but this does not help. Neither
does changing the CookiePolicy.
Any suggestions?
Thanks,
John.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org