Skip Menu |

This queue is for tickets about the Test-WWW-Mechanize-CGI CPAN distribution.

Report information
The Basics
Id: 26203
Status: new
Priority: 0/
Queue: Test-WWW-Mechanize-CGI

People
Owner: Nobody in particular
Requestors: PURDY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.1
Fixed in: (no value)



Subject: Losing session/cookies
I'm pretty neck-deep to write new or boil down existing code to a simplified test-case at this point, but if it will help, I will. Basically, I'm using this module to test a CGI::App subclass that uses the Authentication plugin. I'm able to successfully test invalid and valid logins, but when I follow links from the logged in page, it seems to not use and/or ignore existing authenticated sessions. I've run through the debugger and it seems that the cookie "jar" has two cookies after clicking BEFORE the click - a partial dump of the WWW::Mech object: '_headers' => HTTP::Headers=HASH(0xa086b10) 'content-base' => URI::http=SCALAR(0xa049434) -> REUSED_ADDRESS 'content-length' => 4368 'content-type' => 'text/html; charset=ISO-8859-1' 'date' => 'Mon, 09 Apr 2007 20:26:18 GMT' 'set-cookie' => 'QSR_Advertiser=772de4f75a99aa5d1a8275aac682feea; domain=qsrmagazine.com; path=/; expires=Tue, 08-Apr-2008 20:26:18 GMT' '_msg' => 'OK' '_protocol' => 'HTTP/1.1' '_rc' => 200 '_request' => HTTP::Request=HASH(0xa049d34) -> REUSED_ADDRESS 'stack_depth' => 0 'status' => 200 'timeout' => 180 'uri' => 'http://some.random.name/index.cgi' 'use_eval' => 1 AFTER the click (notice the 2nd cookie): '_headers' => HTTP::Headers=HASH(0x81614c8) 'content-base' => URI::http=SCALAR(0xa0bf678) -> REUSED_ADDRESS 'content-length' => 5448 'content-type' => 'text/html; charset=ISO-8859-1' 'date' => 'Mon, 09 Apr 2007 20:27:34 GMT' 'set-cookie' => ARRAY(0xa086f4c) 0 'QSR_Advertiser=0f5886f238fa08a6bca4686f35b9b294; domain=qsrmagazine.com; path=/; expires=Tue, 08-Apr-2008 20:27:34 GMT' 1 'QSR_Advertiser=; domain=qsrmagazine.com; path=/; expires=Sun, 08-Apr-2007 20:27:34 GMT' '_msg' => 'OK' '_protocol' => 'HTTP/1.1' '_rc' => 200 '_request' => HTTP::Request=HASH(0x866b644) -> REUSED_ADDRESS 'stack_depth' => 0 'status' => 200 'timeout' => 180 'uri' => 'http://some.random.name/advertising/client/index.cgi?rm=onesource' 'use_eval' => 1 Is this expected behavior and I should be doing something different? Again, I'm willing to write up a test case, if needed. I thought maybe at first blush, there might be something unsupported or obvious. Thanks, Jason