summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-11-01 17:24:26 +0100
committerfranck cuny <franck@lumberjaph.net>2010-11-01 17:24:26 +0100
commitcbc4dd479d7ef5bb6288b44678bd1c03a80eede6 (patch)
tree41c5e041ce411968c4a5053a43dda6144ab004bd
parentMerge branch 'master' of github.com:franckcuny/net-http-spore (diff)
downloadnet-http-spore-cbc4dd479d7ef5bb6288b44678bd1c03a80eede6.tar.gz
use new redirect port
-rw-r--r--lib/Net/HTTP/Spore/Middleware/Redirection.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Net/HTTP/Spore/Middleware/Redirection.pm b/lib/Net/HTTP/Spore/Middleware/Redirection.pm
index 07046d8..d80c47c 100644
--- a/lib/Net/HTTP/Spore/Middleware/Redirection.pm
+++ b/lib/Net/HTTP/Spore/Middleware/Redirection.pm
@@ -28,8 +28,10 @@ sub call {
                   )
                 {
                     my $uri = URI->new($location);
-                    $req->env->{HTTP_HOST} = $uri->host;
-                    $req->env->{PATH_INFO} = $uri->path;
+                    $req->env->{HTTP_HOST}   = $uri->host;
+                    $req->env->{PATH_INFO}   = $uri->path;
+                    $req->env->{SERVER_PORT} = $uri->port;
+                    $req->env->{SERVER_NAME} = $uri->host;
                     $res = $self->_request($req);
                     $nredirect++;
                 }else{