You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Roland Weber <RO...@de.ibm.com> on 2003/09/01 13:46:02 UTC

Re: regression in cookie handling from 2.0 alpha3 to 2.0 rc 1 ?

Hi Eric,

I encountered the same problem. HttpClient is currently rather an
HttpUserAgent and not designed for use in a proxy. I was waiting
for the discussion on 3.0 architecture to start to raise this issue :-)

For example, you will also run into problems when you try to
handle 100-continue responses the way a proxy should.

regards,
  Roland






Eric Bloch <bl...@laszlosystems.com>
26.08.2003 03:10
Please respond to "Commons HttpClient Project"
 
        To:     Commons HttpClient Project 
<co...@jakarta.apache.org>
        cc: 
        Subject:        Re: regression in cookie handling from 2.0 alpha3 
to 2.0 rc 1 ?


Hi Adrian,

Thanks for the quick response! 

My problem is that I don't have a 'Cookie' object.  I only have the text 
string for the name of the cookie and its value and I couldn't see any 
easy way for me to construct up a Cookie object from that... or any 
exposed http cookie header (not set-cookie header) parsing that would 
make it easy for me to construct up the Cookie object from my text (I"m 
essentially reading a 'cookie' header myself and proxying the cookie 
over to another http server via the httpclient library).  Parsing the 
cookie could actually be wasted cycles, too, because I don't maintain 
any state between requests; I create and destroy an HttpClient for each 
request (GetMethod) I execute.  I'm happy with my current workaround, 
but it means I'll have to make sure the implementation bits don't change 
too much between revs, as you guys continue on. 

Again, thanks for your time and nice work!

-Eric


Adrian Sutton wrote:

>Hi Eric,
> 
>
>>If I manually set a "cookie" header on a request (for example, if I'm
>>proxying a request myself), HttpMethodBase will always clobber it during
>>addCookieRequestHeader(). I would think that it should merge in any
>>client state cookies to the header I add, rather than clobbering mine.
>> 
>>
>
>You should add cookies using the HttpState.addCookie method rather than
>adding it directly as a header, then it won't be clobbered and will be
>correctly merged into any other cookies being sent.
>
>We don't consider the current behaviour a bug, though if enough people
>requested it I imagine it would be possible to change.
>
>Regards,
>
>Adrian Sutton.
>
>----------------------------------------------
>Intencha "tomorrow's technology today"
>Ph: 38478913 0422236329
>Suite 8/29 Oatland Crescent
>Holland Park West 4121
>Australia QLD
>www.intencha.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: 
commons-httpclient-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: 
commons-httpclient-dev-help@jakarta.apache.org
> 
>

-- 
Eric Bloch
Laszlo Systems, Inc.
1040 Mariposa Street, SF, CA 94107

voice: 415.241.2721
fax:   415.865.2914
email: bloch@lzlo.com

---

Laszlo allows Behr to deliver a breakthrough experience with ColorSmart by
BEHR application.

http://www.behr.com

 




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