diff options
author | franck cuny <franck@lumberjaph.net> | 2011-05-29 13:56:43 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2011-07-26 13:20:00 +0200 |
commit | 7843de57f5d639b05b8024f1ec43dcb9ffb00463 (patch) | |
tree | 6792a41d37806d83f6f04ee0196c1f59a27c0a51 | |
parent | add tests for middleware Auth::Header (diff) | |
download | net-http-spore-7843de57f5d639b05b8024f1ec43dcb9ffb00463.tar.gz |
add spore.userinfo
Signed-off-by: franck cuny <franck@lumberjaph.net>
-rw-r--r-- | lib/Net/HTTP/Spore/Meta/Method.pm | 1 | ||||
-rw-r--r-- | lib/Net/HTTP/Spore/Request.pm | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/Net/HTTP/Spore/Meta/Method.pm b/lib/Net/HTTP/Spore/Meta/Method.pm index 5c59dcf..2e55a89 100644 --- a/lib/Net/HTTP/Spore/Meta/Method.pm +++ b/lib/Net/HTTP/Spore/Meta/Method.pm @@ -210,6 +210,7 @@ sub wrap { 'spore.payload' => $payload, 'spore.errors' => *STDERR, 'spore.url_scheme' => $base_url->scheme, + 'spore.userinfo' => $base_url->userinfo, 'spore.formats' => $formats, }; diff --git a/lib/Net/HTTP/Spore/Request.pm b/lib/Net/HTTP/Spore/Request.pm index a401dcc..d65e0e9 100644 --- a/lib/Net/HTTP/Spore/Request.pm +++ b/lib/Net/HTTP/Spore/Request.pm @@ -202,11 +202,13 @@ sub _uri_base { my $uri = ( $env->{'spore.url_scheme'} || "http" ) . "://" + .($env->{'spore.userinfo'} . '@'|| '') . ( $env->{HTTP_HOST} || (( $env->{SERVER_NAME} || "" ) . ":" . ( $env->{SERVER_PORT} || 80 ) ) ) . ( $env->{SCRIPT_NAME} || '/' ); + return $uri; } |