[prev in list] [next in list] [prev in thread] [next in thread]
List: httpclient-commons-dev
Subject: RE: Question about cookies and Netscape-Enterprise/6.0 server
From: "Kalnichevski, Oleg" <oleg.kalnichevski () bearingpoint ! com>
Date: 2004-05-19 8:04:35
Message-ID: 825BF35A92B3F0479CC164ECBBE9376EE3B6A4 () kccxoex06 ! corp ! kpmgconsulting ! com
[Download RAW message or body]
Chris,
In the 'strict' mode HttpClient 2.0 will send all cookies as one request header. I \
believe that should take care of the problem. Some older HTTP servers appear to have \
issues with multiple Netscape-style (version 0) 'cookie' request headers.
HttpClient 3.0 provides a granular option to control the representation of cookies.
HTH
Oleg
-----Original Message-----
From: Chris Lamprecht [mailto:clamprecht@elitemail.org]
Sent: Wednesday, May 19, 2004 8:50
To: Commons HttpClient Project
Subject: Question about cookies and Netscape-Enterprise/6.0 server
I'm using HttpClient 2.0-final to do a form-based login to a
Netscape-Enterprise 6.0 server (according to the HTTP headers). It uses
cookies to maintain the session.
When I run HttpClient in RFC2109 cookie mode, it works fine. However, when
I switch it to either compatibility or NETSCAPE_DRAFT mode, the server seems
to ignore the cookies that HttpClient sends it. (The server acts like the
client isn't logged in).
I used Mozilla's LiveHTTPHeaders plugin to see what Mozilla sends when I log
in using Mozilla , and the Cookie: header line is as follows:
Cookie: NSC_vuejsfdu_443=c0a8061300bb;
FC=AQEBBwID6QIQRUYzQjVGQjIxxEYzNEY0OQMJY2wxMCAgICAgBAoxMDg0OTQ5Mzk0BQ02Ni4yN
S4xMzUuMTg0BgQwU1RBCgFZCxhDaHJpc3RvcGhlciBNIExhbXByZWNodCAIgK91mi9dn0bezpWdS
OT6xTLQtpKhlyRPYs+k2+fO0fTNBQmoYD3bgefyNTlxIxRxk9p86yrOPn27LNkhUeliJlg/X+oa5
/KZ0HAWOMUIK9OvJ6yFab7WZBR1Tll6TM85yriPLSBMpNSDsV03jEkHw/h7MqRztV9EVjsU92zJG
cj/; TS=20040519011947;
SC=AQEBBwID6QIQRUYzQjVGQjIxxEYzNEY0OQYkMUU0RUE1NzA2QzQ2M0E2NkY2MUY3RDg4MDA5M
jk5MUU5MzVBBAoxMDg0OTQ5Mzk0BQ02Ni4yNS4xMzUuMTg0CgFZCIC9uBG2A5H+exOVvOEm72d9X
4oikfjht7oIFztnGUU8xmXwnFCa7XQvy/cazgK1LTePofwUKhKD//izihmmqv6RlNpdbowSa0h8D
XZtqNFKtbUj8PP5Jk9y7ZKiiRKWXYx20tlQUlo5Iig0Ts9qizm6q8PamYursfYK9lielyXPYQ==;
PDLK=NONE; DOC=/registrar/reg/Pregistration.WBX
(That should all be on a single line).
The only difference I can see in HttpClient's wire log is that it puts one
cookie per line, and it doesn't end each cookie with a semicolon:
> > "GET /registrar/reg/Pregistration.WBX HTTP/1.1[\r][\n]"
> > "Accept: image/gif, image/x-xbitmap, image/jpeg, */*[\r][\n]"
> > "Accept-Language: en-us[\r][\n]"
> > "Accept-Encoding: gzip, deflate[\r][\n]"
> > "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR
1.0.3705)[\r][\n]"
> > "Host: xxxxx.yyyyy.edu[\r][\n]"
> > "Cookie: DOC=/index.html[\r][\n]"
> > "Cookie: PDLK=NONE[\r][\n]"
> > "Cookie:
SC=AQEBBwID6QIQRUYzQjVGQjIxNEYzNEY0OQYkOEM2RTI3RUM3MjQ4RDk4NTE5MDg5N0Y5QzhBQ
UVBODRCNjBDBAoxMDg0OTUwNTIzBQ02Ni4yNS4xMzUuMTg0CgFZCICgWfx0cCCdeTwbxBYeff42i
fXV/WWc26YqHzXnfl4CDNQazbhF3obVB6ve7SXMawMqHHfsPgcIpEbr5K5UjEcQyHO365s2OWnez
4ZiKiTtCS/dmHp+s8i5EIU/BiBJfUMmRxZ31Ll38js0OpUo5P518rZoN8g9waJCjfY2nm/kNg==[
\r][\n]"
> > "Cookie: TS=20040519013842[\r][\n]"
> > "Cookie:
FC=AQEBBwID6QIQRUYzQjVGQjIxNEYzNEY0OQMJY2wxMCAgICAgBAoxMDg0OTUwNTIzBQ02Ni4yN
S4xMzUuMTg0BgQwU1RBCgFZCxhDaHJpc3RvcGhlciBNIExhbXByZWNodCAIgLex5Xy9IKo6MG5SN
qeXcvQkqkm2SWeN50sDjvhWSAQPf1DKYpJaHaF2QF7NhQ8XyXVyDJmXzFz17wTPUUu6d/eqfoWmT
+J1N9gqycS7SjT8mb+7FPMoCxbt6iMiux0Gx40Gkepxbu+w3MhK+6FM549oWVGqgTSrHqL8+xgbT
3x3[\r][\n]"
> > "Cookie: NSC_vuejsfdu_443=c0a8061301bb[\r][\n]"
(Note: I am intentionally setting the headers to appear like a normal
browser; that's why it says MSIE for User-Agent)
Any ideas why the server only recognizes RFC2109?
This isn't necessarily a big problem for me, since RFC2109 works, but I'm
trying to emulate a browser as _exactly_ as possible. Thanks for your help.
Chris
---------------------------------------------------------------------
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic