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 2010/02/03 15:07:10.880-0800 DEBUG;[apache.http.headers:251] >> Cookie2: $Version=1 Character "=" seems to be a valid character. Please help, Thanks, Pravin -- View this message in context: http://old.nabble.com/HttpClient-truncates-cookie-value-%22%3D%3D%22-tp27462800p27462800.html Sent from the HttpClient-User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org