hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: Cookie Issues
Date Fri, 27 Jun 2003 18:21:35 GMT
Yep, that should do it.

Mike

ross_r@bellsouth.net wrote:
> So a post.setRequestHeader should do the trick?  I'll give it a shot.
> 
> Ross  
> 
> -----Original Message-----
> From: Michael Becke [mailto:becke@u.washington.edu] 
> Sent: Friday, June 27, 2003 1:51 PM
> To: Commons HttpClient Project
> Subject: Re: Cookie Issues
> 
> The cookies appear to be working correctly. I think the problem is that 
> the POST cgi requires a referer header.  Generally this is the URL of 
> the page containing the HTML form doing the post.  Take a look at 
> http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#z14 for more on the 
> referer header.
> 
> Mike
> 
> Ross Rankin wrote:
> 
>>Here's the trace and what my proxy says on a browser run post for
>>comparison.  I looked through the trace and I'm not sure what the issue
> 
> is,
> 
>>I thought I might find it, but I didn't.  Thanks for any help you can
>>provide.
>>
>>Ross
>>
>>-----Original Message-----
>>From: Michael Becke [mailto:becke@u.washington.edu] 
>>Sent: Friday, June 27, 2003 12:01 PM
>>To: Commons HttpClient Project
>>Subject: Re: Cookie Issues
>>
>>Ross,
>>
>>Cookies are automatically stored in an HttpClient's instance of 
>>HttpState.  If you use the same instance of HttpClient to execute the 
>>GET on the initial page and the POST all should be automatically handled.
>>
>>Please post a wire log showing the GET and POST if the cookie handling 
>>continues to not work (see 
>>http://jakarta.apache.org/commons/httpclient/logging.html).
>>
>>Mike
>>
>>ross_r@bellsouth.net wrote:
>>
>>
>>>I guessing that I am not doing something right.  I have a site which has a
>>>session id that it sends as a cookie.  I get the cookie when I get the
>>>initial page.  I then have to send a post and send that cookie back.
>>>However I get back a error message from the server which says no session
>>
>>id.
>>
>>
>>>Now I did a trace and it just send back "HTTP/1.1 499 Data Error
>>>NoSessionId" Not very helpful.  
>>>
>>>
>>>
>>>Is there something that I need to do other than
>>>"client.getState().getCookies" when I get the first page to make sure that
>>>the cookies are sent back with the post data?
>>>
>>>
>>>
>>>Thanks,
>>>
>>>
>>>
>>>Ross Rankin
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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