[Catalyst-commits] r9170 - in Test-WWW-Mechanize-Catalyst/trunk:
lib/Test/WWW/Mechanize t
ash at dev.catalyst.perl.org
ash at dev.catalyst.perl.org
Mon Feb 2 22:37:44 GMT 2009
Author: ash
Date: 2009-02-02 22:37:44 +0000 (Mon, 02 Feb 2009)
New Revision: 9170
Modified:
Test-WWW-Mechanize-Catalyst/trunk/lib/Test/WWW/Mechanize/Catalyst.pm
Test-WWW-Mechanize-Catalyst/trunk/t/multi_content_type.t
Log:
Fix auth bug exposed by t/multi_content_type.t
Modified: Test-WWW-Mechanize-Catalyst/trunk/lib/Test/WWW/Mechanize/Catalyst.pm
===================================================================
--- Test-WWW-Mechanize-Catalyst/trunk/lib/Test/WWW/Mechanize/Catalyst.pm 2009-02-02 22:37:40 UTC (rev 9169)
+++ Test-WWW-Mechanize-Catalyst/trunk/lib/Test/WWW/Mechanize/Catalyst.pm 2009-02-02 22:37:44 UTC (rev 9170)
@@ -28,8 +28,13 @@
return $self->SUPER::_make_request($request);
}
}
-
- my @creds = $self->get_basic_credentials( "Basic", $request->uri );
+
+ my $uri = $request->uri;
+ if ($uri->as_string =~ m{^/}) {
+ $uri->scheme('http');
+ $uri->host('localhost');
+ }
+ my @creds = $self->get_basic_credentials( "Basic", $uri );
$request->authorization_basic( @creds ) if @creds;
my $response = Test::WWW::Mechanize::Catalyst::Aux::request($request);
Modified: Test-WWW-Mechanize-Catalyst/trunk/t/multi_content_type.t
===================================================================
--- Test-WWW-Mechanize-Catalyst/trunk/t/multi_content_type.t 2009-02-02 22:37:40 UTC (rev 9169)
+++ Test-WWW-Mechanize-Catalyst/trunk/t/multi_content_type.t 2009-02-02 22:37:44 UTC (rev 9170)
@@ -15,7 +15,7 @@
BEGIN {
diag(
- "###################################################################\n",
+ "\n###################################################################\n",
"Starting an external Catalyst HTTP server on port $PORT\n",
"To change the port, please set the TWMC_TEST_PORT env variable.\n",
"(The server will be automatically shut-down right after the tests).\n",
More information about the Catalyst-commits
mailing list