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

Report information
The Basics
Id:
37689
Status:
resolved
Priority:
Low/Low

People
Owner:
Nobody in particular
Requestors:
kane [...] cpan.org(email delivery suspended)
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
0.42
Fixed in:
0.50_2



Subject: TWMC doesn't work nice with cookies
I've worked around that changing '_make_request' as follows, but this should probably be integrated in TWMC: ### XXX this needs to be set for Test::WWW::Mech::Cat, as using a ### non-schemed URI makes HTTP::Cookies not add a cookie to the ### header. Setting this var prefixes every path with the hostname ### XXX at least broken in 0.42. Fix is to add to T:W:M:C->_make_request, { my $code = Test::WWW::Mechanize::Catalyst->can( '_make_request' ); no warnings 'redefine'; *Test::WWW::Mechanize::Catalyst::_make_request = sub { my ( $self, $request ) = @_; ### build a new uri, adding the hostname if( not $request->uri->can('host') or $request->uri->host ne 'localhost' ) { ### if there's no leading slash, make sure we add it my $delim = $request->uri->as_string =~ m|^/| ? '' : '/'; $request->uri( URI->new( TEST_HOSTNAME .$delim. $request->uri ) ); } $code->( $self, $request ); } }
Fixed as part of the refactor, and available now on cpan as v0.50


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.