Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 22398
Status: rejected
Priority: 0/
Queue: WWW-Mechanize

Owner: Nobody in particular
Requestors: beckman [...]

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

Subject: local/back test fails if hostname doesn't resolve
Download (untitled) / with headers
text/plain 991b
In t/local/back this code is executed: my $server404 = HTTP::Daemon->new or die; my $server404url = $server404->url; die 'Cannot fork' if (! defined (my $pid404 = fork())); END { local $?; kill KILL => $pid404; # Extreme prejudice intended, because we do not # want the global cleanup to be done twice. } if (! $pid404) { # Fake HTTP server code: a true 404-compliant server! while ( my $c = $server404->accept() ) { while ( $c->get_request() ) { $c->send_response( new HTTP::Response(404) ); $c->close(); } } } $mech->get($server404url); is( $mech->status, 404 , '404 check'); If you print the $server404url, instead of it being http://localhost:43210/ it is and this test will fail if does not resolve to the local box IP. I'm not sure where the hostname is determined, but it should test against localhost, not the box hostname. This will prevent DNS issues from affecting tests.

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to