diff options
author | franck cuny <franck@lumberjaph.net> | 2011-07-11 10:40:39 +0200 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2011-07-26 13:20:00 +0200 |
commit | cdf0c1f28306bf7f69ab4c9e05adade7d0b24edc (patch) | |
tree | 418717b7735eb0a2b416479fd957791f46420844 | |
parent | add spore.userinfo (diff) | |
download | net-http-spore-cdf0c1f28306bf7f69ab4c9e05adade7d0b24edc.tar.gz |
userinfo if available
Signed-off-by: franck cuny <franck@lumberjaph.net>
-rw-r--r-- | lib/Net/HTTP/Spore/Request.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore/Request.pm b/lib/Net/HTTP/Spore/Request.pm index d65e0e9..3551e12 100644 --- a/lib/Net/HTTP/Spore/Request.pm +++ b/lib/Net/HTTP/Spore/Request.pm @@ -202,7 +202,11 @@ sub _uri_base { my $uri = ( $env->{'spore.url_scheme'} || "http" ) . "://" - .($env->{'spore.userinfo'} . '@'|| '') + . ( + defined $env->{'spore.userinfo'} + ? $env->{'spore.userinfo'} . '@' + : '' + ) . ( $env->{HTTP_HOST} || (( $env->{SERVER_NAME} || "" ) . ":" |