commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [httpclient] session after autentication
Date Mon, 13 Oct 2003 16:09:23 GMT

1) Set up HttpClient to send requests via the proxy 
2) Use HTTP/1.0 (GetMethod#setHttp11(false))
3) Use strict mode (GetMethod#setStrictMode(true)). That will make HttpClient
put all cookies in one header.

Let me know how it all works out.


>-- Original Message --
>Reply-To: "Jakarta Commons Users List" <>
>From: "Albert Caramia" <>
>Subject: RE: [httpclient] session after autentication
>Date: Mon, 13 Oct 2003 17:28:07 +0200
>Hi Oleg,
>thanks for your time on my problem. I learn every email :-)
>So, I try with HTTPLook
>this is the get request from IE
>Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, 
>application/, application/, application/msword,
>Accept-Language: it,en;q=0.5
>Proxy-Connection: Keep-Alive
>User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
>Cookie: userid=xxx; userhash=70d52c3c; id_utente=109
>response (from cache I think)
>HTTP/1.1 304 Not Modified
>Via: 1.1 GTELP1
>Connection: Keep-Alive
>Proxy-Connection: Keep-Alive
>Date: Mon, 13 Oct 2003 14:56:10 GMT
>Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux)
>Keep-Alive: timeout=15, max=100
>ETag: "7b47f-c21-3c3fce01"
>and this is from httpclient
>GET /new/sx.php HTTP/1.1
>User-Agent: Jakarta Commons-HttpClient/2.0rc1
>Cookie: userid=xxx
>Cookie: userhash=70d52c3c
>Cookie: id_utente=109
>HTTP/1.1 302 Found
>Via: 1.1 GTELP1
>Connection: close
>Proxy-Connection: close
>Expires: Mon, 26 Jul 1997 05:00:00 GMT
>Date: Mon, 13 Oct 2003 15:00:57 GMT
>Location: index.php
>Content-Type: text/html
>Server: Apache/1.3.19 (Unix)  (Red-Hat/Linux)
>Last-Modified: Mon, 13 Oct 2003 15:00:57 GMT
>Cache-Control: no-cache, must-revalidate
>Pragma: no-cache
>I see some differences
>1.http/1.0 vs 1.1,
>2.full path in get,
>4.Cookies in line with ;
>any suggestion? how can I set the referer in my get method?
>>Reply-To: "Jakarta Commons Users List" <>
>>To: "Jakarta Commons Users List" <>
>>Subject: RE: [httpclient] session after autentication
>>Date: Mon, 13 Oct 2003 16:10:52 +0200
>>Possible, but unlikely. The server would not have returned the 
>>cookies in the first place, I suspect. It will not hurt trying, though.
>>It looks like you may have to sniff on the requests generated by the 
>>and see how they differ from those generated by HttpClient.
>Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message