Subject: | Base incorrect after redirected request |
One of my tests runs through a number of local actions of the form:
/search?query=test&source=web
The source parameter controls where a request is redirected. The
destination can be a remote host, e.g.:
http://search.ufl.edu/web?query=test
If I attempt to run another test against a local action after such a
redirection, such as:
$mech->get_ok("/search?query=test&source=news");
the request base appears to still be the base from the redirection. In
this case the URL ends up being:
http://search.ufl.edu/search?query=test&source=news
instead of:
http://localhost/search?query=test&source=news
For now I've specified localhost explicitly but the documentation
implies this is optional.
Relevant versions include:
$ perl -MTest::WWW::Mechanize::Catalyst\ 999
Test::WWW::Mechanize::Catalyst version 999 required--this is only
version 0.39.
$ perl -MTest::WWW::Mechanize\ 999
Test::WWW::Mechanize version 999 required--this is only version 1.14.
$ perl -MWWW::Mechanize\ 999
WWW::Mechanize version 999 required--this is only version 1.30.
$ perl -MLWP\ 999
LWP version 999 required--this is only version 5.805.