[Catalyst-commits] r9325 - Test-WWW-Mechanize-Catalyst/trunk/lib/Test/WWW/Mechanize

ash at dev.catalyst.perl.org ash at dev.catalyst.perl.org
Tue Feb 17 22:54:35 GMT 2009


Author: ash
Date: 2009-02-17 22:54:34 +0000 (Tue, 17 Feb 2009)
New Revision: 9325

Modified:
   Test-WWW-Mechanize-Catalyst/trunk/lib/Test/WWW/Mechanize/Catalyst.pm
Log:
Doc patch. kd++

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-17 22:49:25 UTC (rev 9324)
+++ Test-WWW-Mechanize-Catalyst/trunk/lib/Test/WWW/Mechanize/Catalyst.pm	2009-02-17 22:54:34 UTC (rev 9325)
@@ -142,8 +142,6 @@
     return Catalyst::Test::remote_request($request)
       if $ENV{CATALYST_SERVER};
 
-
-
     # If there's no Host header, set one.
     unless ($request->header('Host')) {
       my $host = $self->has_host
@@ -452,6 +450,21 @@
 successfully.  The HTTP::Response object returned by follow_link()
 is not available.
 
+=head1 CAVEATS
+
+=head2 External Redirects and allow_external
+
+If you use non-fully qualified urls in your test scripts (i.e. anything without
+a host, such as C<< ->get_ok( "/foo") >> ) and your app redirects to an
+external URL, expect to be bitten once you come back to your application's urls
+(it will try to request them on the remote server.) This is due to a limitation
+in WWW::Mechanize.
+
+One workaround for this is that if you are expecting to redirect to an external
+site, clone the TWMC obeject and use the cloned object for the external
+redirect.
+
+
 =head1 SEE ALSO
 
 Related modules which may be of interest: L<Catalyst>,




More information about the Catalyst-commits mailing list