Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
i have a perl app that behaves strange. it happens when i try to login and then redirect to the front page upon success.
the problem is that the cookie is somehow lost. strange thing is that it works for firefox but not IE.
code is simple as:
here is FF header:my $cookie = $q->cookie( -name => 'auth_tkt', -value => $tkt, -expires => '+1h', ); $q->redirect( -uri => $uri, -cookie => $cookie );
here is IE headerPOST /app/account/process_login HTTP/1.1 Host: www.example.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7 +) Gecko/20070914 Firefox/2.0.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9 +,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://www.example.com/app/account/login Content-Type: application/x-www-form-urlencoded Content-Length: 40 back=&username=testuser&password=1234567 HTTP/1.x 302 Found Date: Fri, 12 Oct 2007 00:39:23 GMT Server: Apache/1.3.36 (Unix) mod_auth_tkt/2.0.0rc2 mod_perl/1.29 Set-Cookie: auth_tkt=YTg3OWYyZjVlYmQ5ZTllM2Q3NWExNzdmMTRhMjI3ZGI0NzBlY +zIzYnRlc3R1c2VyITI%3D; path=/; expires=Fri, 12-Oct-2007 01:39:23 GMT Location: /app Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/plain ---------------------------------------------------------- http://www.example.com/app GET /app HTTP/1.1 Host: www.example.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7 +) Gecko/20070914 Firefox/2.0.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9 +,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://www.example.com/app/account/login Cookie: auth_tkt=YTg3OWYyZjVlYmQ5ZTllM2Q3NWExNzdmMTRhMjI3ZGI0NzBlYzIzY +nRlc3R1c2VyITI%3D HTTP/1.x 200 OK Date: Fri, 12 Oct 2007 00:39:24 GMT Server: Apache/1.3.36 (Unix) mod_auth_tkt/2.0.0rc2 mod_perl/1.29 Keep-Alive: timeout=15, max=98 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=ISO-8859-1 ----------------------------------------------------------
POST /app/account/process_login HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, applicati +on/msword, application/x-shockwave-flash, application/vnd.ms-excel, a +pplication/vnd.ms-powerpoint, */* Referer: http://www.example.com/app/account/login Accept-Language: en-us,en;q=0.5 Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .N +ET CLR 1.0.3705; .NET CLR 1.1.4322) Host: www.example.com Content-Length: 40 Connection: Keep-Alive Cache-Control: no-cache back=&username=testuser&password=1234567 HTTP/1.1 302 Found Date: Fri, 12 Oct 2007 00:01:20 GMT Server: Apache/1.3.36 (Unix) mod_auth_tkt/2.0.0rc2 mod_perl/1.29 Set-Cookie: auth_tkt=NmY4ZDFiZDZhODgxZTk0ZTkwNDIyZjU5MmRmNGMwY2Q0NzBlY +jk1MXRlc3R1c2VyITI%3D; path=/; expires=Fri, 12-Oct-2007 01:01:21 GMT Location: /app Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/plain GET /app HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, applicati +on/msword, application/x-shockwave-flash, application/vnd.ms-excel, a +pplication/vnd.ms-powerpoint, */* Referer: http://www.example.com/app/account/login Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .N +ET CLR 1.0.3705; .NET CLR 1.1.4322) Host: www.example.com Connection: Keep-Alive Cache-Control: no-cache HTTP/1.1 200 OK Date: Fri, 12 Oct 2007 00:01:21 GMT Server: Apache/1.3.36 (Unix) mod_auth_tkt/2.0.0rc2 mod_perl/1.29 Keep-Alive: timeout=15, max=98 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html; charset=ISO-8859-1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: [OT] 302 redirect after login result cookie lost?
by atemon (Chaplain) on Oct 12, 2007 at 02:49 UTC | |
by tinita (Parson) on Oct 12, 2007 at 12:31 UTC | |
|
Re: [OT] 302 redirect after login result cookie lost?
by tinita (Parson) on Oct 12, 2007 at 12:26 UTC | |
|
Re: [OT] 302 redirect after login result cookie lost?
by Anonymous Monk on Oct 12, 2007 at 14:32 UTC | |
|
Re: [OT] 302 redirect after login result cookie lost?
by jhourcle (Prior) on Oct 12, 2007 at 12:07 UTC | |
|
Re: [OT] 302 redirect after login result cookie lost?
by Anonymous Monk on Oct 12, 2007 at 19:19 UTC | |
by thoglette (Scribe) on Apr 28, 2009 at 04:47 UTC |