summaryrefslogtreecommitdiff
path: root/lib/Net/HTTP/Spore/Middleware/Auth
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Net/HTTP/Spore/Middleware/Auth')
-rw-r--r--lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm b/lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm
index ffff80b..9ec49a4 100644
--- a/lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm
+++ b/lib/Net/HTTP/Spore/Middleware/Auth/OAuth.pm
@@ -92,13 +92,18 @@ sub _base_string {
my $scheme = $req->scheme;
my $port = $req->port;
- if ($port == 80 and $scheme eq 'http'){
+ if ( $port == 80 && $scheme eq 'http' ) {
$port = undef;
}
- if (defined $scheme && $port == 443 and $scheme eq 'https'){
+ if ( defined $port
+ && defined $scheme
+ && $port == 443
+ && $scheme eq 'https' )
+ {
$port = undef;
}
+
my $uri =
( $scheme || 'https' ) . "://"
. $req->env->{SERVER_NAME}