hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zulfi Umrani" <zumr...@novell.com>
Subject Re: Cookie
Date Fri, 27 Jun 2003 15:10:03 GMT
I hung on to the HttpClient instance and seems like it is sending
cookies now. But it still did not work successfully, because Apache
Tomcat Server is returning a wiered message. When I do not send cookies,
it accepts the POST request. But as soon as cookie is sent, it sends
back 501! Attached is the wire log. I have canged the body of  HTTP
because of confidentiality. I also see whole bunch of [0x0]s being added
at the end of each body. Is there any way not to send them? Could they
be the cause of the problem?
I will appreciate a response.

Thanks.

>>> becke@u.washington.edu 6/26/2003 11:29:29 PM >>>
To see the network traffic you will need to enable the wire log.  Take

a look at http://jakarta.apache.org/commons/httpclient/logging.html for

details.

HttpClient handles cookies by default.  For more details please see 
http://jakarta.apache.org/commons/httpclient/cookies.html.  If the 
cookie guide does not help to resolve the problem please post a wire 
log containing the transaction in question.

Mike

On Thursday, June 26, 2003, at 07:09 PM, Zulfi Umrani wrote:

> I enable the logging for "info", but did not get any message on the
> console. And the cookies still are not handled automatically.
>
>>>> rana@solis.jp 6/26/2003 9:17:57 PM >>>
>> Is there an automatic way to handle cookies?
> According to whatever less I know about HttpClient, this is the
> default
> behavior. Cookies are handled automatically. If you put the logging
on
> as given on the link
> http://jakarta.apache.org/commons/httpclient/logging.html you will
see
> some entries like
> Set-Cookie: Name=...
> Which means that HttpClient is handling cookies for you.
>
> HTH.
>
> Regards,
> Amit.
>
>> -----Original Message-----
>> From: Zulfi Umrani [mailto:zumrani@novell.com] 
>> Sent: Friday, June 27, 2003 7:12 AM
>> To: commons-httpclient-dev@jakarta.apache.org 
>> Subject: Cookie
>>
>> Does any one know how can I manage cookies without having to get
the
>> cookies from HttpState and setting it back everytime I make a
> request?
>> Is there an automatic way to handle cookies? Alternatively, how do
I
> put
>> a cookie header on PostMethod? I have string representation of the
>> cookie, I would like to set that as a header on PostMethod. At
> present
>> it does not allow me to do so.
>>
>> Thanks.
>>
>>
>
---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> commons-httpclient-dev-unsubscribe@jakarta.apache.org 
>> For additional commands, e-mail:
>> commons-httpclient-dev-help@jakarta.apache.org 
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-httpclient-dev-unsubscribe@jakarta.apache.org 
> For additional commands, e-mail:
> commons-httpclient-dev-help@jakarta.apache.org 
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org 
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org 
>


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


Mime
View raw message