You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Ross Rankin <ro...@bellsouth.net> on 2003/03/02 21:38:52 UTC

Cookie Header String

I had a new problem today, but unlike my last one, I figured it out today.
But I was wondering if it the way the HttpClient works, a setting, or
something I should be doing.

The HttpClient is creating a header like this:

Cookie: cookie1=blah1

Cookie: cookie2=blah2

Cookie: cookie3-blah3

Cookie: cookie4=blah4

 

But the browser sends cookies like this:

Cookie: cookie1=blah1; cookie2=blah2; cookie3=blah3; cookie4=blah4

 

Right now I cam just getting the cookies and creating a response header with
the array concatenated into the above format and the server accepts it.  

Is there an easier way?

 

Ross


Re: Cookie Header String

Posted by Oleg Kalnichevski <o....@dplanet.ch>.
Ross,
Just use strict mode. That will make HttpClient put all cookies into one
header
Oleg

On Sun, 2003-03-02 at 21:38, Ross Rankin wrote:
> I had a new problem today, but unlike my last one, I figured it out today.
> But I was wondering if it the way the HttpClient works, a setting, or
> something I should be doing.
> 
> The HttpClient is creating a header like this:
> 
> Cookie: cookie1=blah1
> 
> Cookie: cookie2=blah2
> 
> Cookie: cookie3-blah3
> 
> Cookie: cookie4=blah4
> 
>  
> 
> But the browser sends cookies like this:
> 
> Cookie: cookie1=blah1; cookie2=blah2; cookie3=blah3; cookie4=blah4
> 
>  
> 
> Right now I cam just getting the cookies and creating a response header with
> the array concatenated into the above format and the server accepts it.  
> 
> Is there an easier way?
> 
>  
> 
> Ross
>