diff options
author | franck cuny <franck@lumberjaph.net> | 2010-11-01 17:24:26 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2010-11-01 17:24:26 +0100 |
commit | cbc4dd479d7ef5bb6288b44678bd1c03a80eede6 (patch) | |
tree | 41c5e041ce411968c4a5053a43dda6144ab004bd | |
parent | Merge branch 'master' of github.com:franckcuny/net-http-spore (diff) | |
download | net-http-spore-cbc4dd479d7ef5bb6288b44678bd1c03a80eede6.tar.gz |
use new redirect port
-rw-r--r-- | lib/Net/HTTP/Spore/Middleware/Redirection.pm | 6 |
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{ |