If you're using Tomcat 6, it's a lot stricter (by default) with the cookie encoding supported. I've had issues with using the '=' character there myself and had to URL encode the cookie in order to make it work (or just switch back to Tomcat 5.5 or another app server).
Thanks, Sam On 5 February 2010 21:35, booddu <[email protected]> wrote: > > Oleg, > > Thanks for your response. > I checked the http ssl log and the cookie seem to be right there. > The cookie is getting truncated somewhere between httpd and tomcat... > So, No bug in httpclient...confirmed. > > Thanks, > Pravin > > Here is the ssl log.... > > 10.5.110.20 - - [05/Feb/2010:13:27:11 -0800] "POST > /login/j_acegi_security_check > HTTP/1.1" 302 - "JSESSIONID=D2D93907B80B89765370763BB04DAEF1" > > 10.5.110.20 - - [05/Feb/2010:13:27:12 -0800] "GET /home HTTP/1.1" 200 16428 > "$Ve > rsion=1; > SCSID=\"G28VrWTZoyaL3RVwQeAasqN1Ug+LwNomnrjQvi/mhWYvfVIaZ3ykt9uZxb0M6MS > 2lSol4Sb37RDXND+CFa3ECQ==\"; $Path=\"/\"; $Domain=\".p.sugarsync.com\", > $Version > =1; > SCSSID=\"ILtbzzmQpzcPSCe6kX9tnHeD5/nPDtkIGfuQrLVUtCgjFvabLdSvkjoIOU87gThvwT3 > UNw+bsoq2YY8Aocd01g==\"; $Path=\"/\"; $Domain=\".p.sugarsync.com\"" > > 10.5.110.20 - - [05/Feb/2010:13:27:12 -0800] "GET /files HTTP/1.1" 302 - > "SCSID= > G28VrWTZoyaL3RVwQeAasqN1Ug+LwNomnrjQvi/mhWYvfVIaZ3ykt9uZxb0M6MS2lSol4Sb37RDXND+C > Fa3ECQ==; > SCSSID=ILtbzzmQpzcPSCe6kX9tnHeD5/nPDtkIGfuQrLVUtCgjFvabLdSvkjoIOU87gTh > vwT3UNw+bsoq2YY8Aocd01g==; SC_LR=; > JSESSIONID=BA4AD2DFCAEF93214D3763CD75E05D79" > > > > > > > olegk wrote: >> >> booddu wrote: >>> Notice the "==" characters in the end of the cookie value... >>> Tomcat gets the right cookie value with this wire/header httpClient log >>> >>> 2010/02/03 15:07:08.311-0800 DEBUG;[conn.tsccm.ConnPoolByRoute:505] >>> Creating >>> new connection [HttpRoute[{s}->https://nnr1.p.sugarsync.com]] >>> 2010/02/03 15:07:08.398-0800 >>> DEBUG;[client.protocol.RequestAddCookies:131] >>> CookieSpec selected: best-match >>> 2010/02/03 15:07:08.399-0800 >>> DEBUG;[client.protocol.RequestAddCookies:178] >>> Cookie [version: 1][name: SCSID][value: >>> Q6S1yizKQZ7MgKFJkFFMIzT6ikFqy9Agv1wYhVp3JOHsn3jSrQQGgRuDCq1LH4yJCTV93RPtKC+xfQZS5AlXCA==][domain: >>> .p.sugarsync.com][path: /][expiry: null] match >>> [(secure)nnr1.p.sugarsync.com:443/home] >>> 2010/02/03 15:07:08.400-0800 >>> DEBUG;[client.protocol.RequestAddCookies:178] >>> Cookie [version: 1][name: SCSSID][value: >>> c+++ZH6rN1Y91USqBYRRDDDK8B7dG/siKZ4+OAs9v9a/NPYa++DZY+QB8A1Y6UCTs0ytZx7T3SOT57K1IDHfCA==][domain: >>> .p.sugarsync.com][path: /][expiry: null] match >>> [(secure)nnr1.p.sugarsync.com:443/home] >>> 2010/02/03 15:07:08.402-0800 DEBUG;[impl.client.DefaultHttpClient:483] >>> Attempt 1 to execute request >>> 2010/02/03 15:07:08.403-0800 >>> DEBUG;[impl.conn.DefaultClientConnection:244] >>> Sending request: GET /home HTTP/1.1 >>> 2010/02/03 15:07:08.404-0800 DEBUG;[apache.http.wire:78] >> "GET /home >>> HTTP/1.1[EOL]" >>> 2010/02/03 15:07:08.405-0800 DEBUG;[apache.http.wire:78] >> "Host: >>> nnr1.p.sugarsync.com[EOL]" >>> 2010/02/03 15:07:08.406-0800 DEBUG;[apache.http.wire:78] >> "Connection: >>> Keep-Alive[EOL]" >>> 2010/02/03 15:07:08.407-0800 DEBUG;[apache.http.wire:78] >> "User-Agent: >>> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) >>> Gecko/2009021910 >>> Firefox/3.0.7[EOL]" >>> 2010/02/03 15:07:08.407-0800 DEBUG;[apache.http.wire:78] >> "Cookie: >>> $Version=1; >>> SCSID="Q6S1yizKQZ7MgKFJkFFMIzT6ikFqy9Agv1wYhVp3JOHsn3jSrQQGgRuDCq1LH4yJCTV93RPtKC+xfQZS5AlXCA=="; >>> $Path="/"; $Domain=".p.sugarsync.com"[EOL]" >>> 2010/02/03 15:07:08.409-0800 DEBUG;[apache.http.wire:78] >> "Cookie: >>> $Version=1; >>> SCSSID="c+++ZH6rN1Y91USqBYRRDDDK8B7dG/siKZ4+OAs9v9a/NPYa++DZY+QB8A1Y6UCTs0ytZx7T3SOT57K1IDHfCA=="; >>> $Path="/"; $Domain=".p.sugarsync.com"[EOL]" >>> 2010/02/03 15:07:08.412-0800 DEBUG;[apache.http.wire:78] >> "Cookie2: >>> $Version=1[EOL]" >>> 2010/02/03 15:07:08.413-0800 DEBUG;[apache.http.wire:78] >> "[EOL]" >>> 2010/02/03 15:07:08.414-0800 DEBUG;[apache.http.headers:248] >> GET /home >>> HTTP/1.1 >>> 2010/02/03 15:07:08.414-0800 DEBUG;[apache.http.headers:251] >> Host: >>> nnr1.p.sugarsync.com >>> 2010/02/03 15:07:09.076-0800 DEBUG;[apache.http.headers:251] >> >>> Connection: >>> Keep-Alive >>> 2010/02/03 15:07:09.077-0800 DEBUG;[apache.http.headers:251] >> >>> User-Agent: >>> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) >>> Gecko/2009021910 >>> Firefox/3.0.7 >>> 2010/02/03 15:07:09.078-0800 DEBUG;[apache.http.headers:251] >> Cookie: >>> $Version=1; >>> SCSID="Q6S1yizKQZ7MgKFJkFFMIzT6ikFqy9Agv1wYhVp3JOHsn3jSrQQGgRuDCq1LH4yJCTV93RPtKC+xfQZS5AlXCA=="; >>> $Path="/"; $Domain=".p.sugarsync.com" >>> 2010/02/03 15:07:09.079-0800 DEBUG;[apache.http.headers:251] >> Cookie: >>> $Version=1; >>> SCSSID="c+++ZH6rN1Y91USqBYRRDDDK8B7dG/siKZ4+OAs9v9a/NPYa++DZY+QB8A1Y6UCTs0ytZx7T3SOT57K1IDHfCA=="; >>> $Path="/"; $Domain=".p.sugarsync.com" >>> 2010/02/03 15:07:09.080-0800 DEBUG;[apache.http.headers:251] >> Cookie2: >>> $Version=1 >>> >>> >>> With following wire/header log, tomcat is not getting the "==" at the end >>> of >>> the cookie value, consequently invalidating the session. >>> >>> 2010/02/03 15:07:10.813-0800 DEBUG;[conn.tsccm.ConnPoolByRoute:505] >>> Creating >>> new connection [HttpRoute[{s}->https://nnr1.p.sugarsync.com]] >>> 2010/02/03 15:07:10.852-0800 >>> DEBUG;[client.protocol.RequestAddCookies:131] >>> CookieSpec selected: best-match >>> 2010/02/03 15:07:10.853-0800 >>> DEBUG;[client.protocol.RequestAddCookies:178] >>> Cookie [version: 1][name: SCSID][value: >>> Q6S1yizKQZ7MgKFJkFFMIzT6ikFqy9Agv1wYhVp3JOHsn3jSrQQGgRuDCq1LH4yJCTV93RPtKC+xfQZS5AlXCA==][domain: >>> .p.sugarsync.com][path: /][expiry: null] match >>> [(secure)nnr1.p.sugarsync.com:443/files] >>> 2010/02/03 15:07:10.854-0800 >>> DEBUG;[client.protocol.RequestAddCookies:178] >>> Cookie [version: 1][name: SCSSID][value: >>> c+++ZH6rN1Y91USqBYRRDDDK8B7dG/siKZ4+OAs9v9a/NPYa++DZY+QB8A1Y6UCTs0ytZx7T3SOT57K1IDHfCA==][domain: >>> .p.sugarsync.com][path: /][expiry: null] match >>> [(secure)nnr1.p.sugarsync.com:443/files] >>> 2010/02/03 15:07:10.854-0800 >>> DEBUG;[client.protocol.RequestAddCookies:178] >>> Cookie [version: 0][name: SC_LR][value: ][domain: p.sugarsync.com][path: >>> /][expiry: Wed Feb 03 16:07:09 PST 2010] match >>> [(secure)nnr1.p.sugarsync.com:443/files] >>> 2010/02/03 15:07:10.855-0800 >>> DEBUG;[client.protocol.RequestAddCookies:178] >>> Cookie [version: 0][name: JSESSIONID][value: >>> DCBACF89AFE615F37DB16480F79833A0][domain: nnr1.p.sugarsync.com][path: >>> /][expiry: null] match [(secure)nnr1.p.sugarsync.com:443/files] >>> 2010/02/03 15:07:10.856-0800 DEBUG;[impl.client.DefaultHttpClient:483] >>> Attempt 1 to execute request >>> 2010/02/03 15:07:10.857-0800 >>> DEBUG;[impl.conn.DefaultClientConnection:244] >>> Sending request: GET /files HTTP/1.1 >>> 2010/02/03 15:07:10.858-0800 DEBUG;[apache.http.wire:78] >> "GET /files >>> HTTP/1.1[EOL]" >>> 2010/02/03 15:07:10.859-0800 DEBUG;[apache.http.wire:78] >> "Host: >>> nnr1.p.sugarsync.com[EOL]" >>> 2010/02/03 15:07:10.859-0800 DEBUG;[apache.http.wire:78] >> "Connection: >>> Keep-Alive[EOL]" >>> 2010/02/03 15:07:10.860-0800 DEBUG;[apache.http.wire:78] >> "User-Agent: >>> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) >>> Gecko/2009021910 >>> Firefox/3.0.7[EOL]" >>> 2010/02/03 15:07:10.861-0800 DEBUG;[apache.http.wire:78] >> "Cookie: >>> SCSID=Q6S1yizKQZ7MgKFJkFFMIzT6ikFqy9Agv1wYhVp3JOHsn3jSrQQGgRuDCq1LH4yJCTV93RPtKC+xfQZS5AlXCA==; >>> SCSSID=c+++ZH6rN1Y91USqBYRRDDDK8B7dG/siKZ4+OAs9v9a/NPYa++DZY+QB8A1Y6UCTs0ytZx7T3SOT57K1IDHfCA==; >>> SC_LR=; JSESSIONID=DCBACF89AFE615F37DB16480F79833A0[EOL]" >>> 2010/02/03 15:07:10.863-0800 DEBUG;[apache.http.wire:78] >> "Cookie2: >>> $Version=1[EOL]" >>> 2010/02/03 15:07:10.864-0800 DEBUG;[apache.http.wire:78] >> "[EOL]" >>> 2010/02/03 15:07:10.876-0800 DEBUG;[apache.http.headers:248] >> GET >>> /files >>> HTTP/1.1 >>> 2010/02/03 15:07:10.877-0800 DEBUG;[apache.http.headers:251] >> Host: >>> nnr1.p.sugarsync.com >>> 2010/02/03 15:07:10.878-0800 DEBUG;[apache.http.headers:251] >> >>> Connection: >>> Keep-Alive >>> 2010/02/03 15:07:10.879-0800 DEBUG;[apache.http.headers:251] >> >>> User-Agent: >>> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) >>> Gecko/2009021910 >>> Firefox/3.0.7 >>> 2010/02/03 15:07:10.879-0800 DEBUG;[apache.http.headers:251] >> Cookie: >>> SCSID=Q6S1yizKQZ7MgKFJkFFMIzT6ikFqy9Agv1wYhVp3JOHsn3jSrQQGgRuDCq1LH4yJCTV93RPtKC+xfQZS5AlXCA==; >>> SCSSID=c+++ZH6rN1Y91USqBYRRDDDK8B7dG/siKZ4+OAs9v9a/NPYa++DZY+QB8A1Y6UCTs0ytZx7T3SOT57K1IDHfCA==; >>> SC_LR=; JSESSIONID=DCBACF89AFE615F37DB16480F79833A0 >> >> >> What makes you think HttpClient truncates anything? I see nothing wrong >> with the cookie >> >> Oleg >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> >> > > -- > View this message in context: > http://old.nabble.com/HttpClient-truncates-cookie-value-%22%3D%3D%22-tp27462800p27474226.html > Sent from the HttpClient-User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
