Skip to content

Commit

Permalink
some servers use HTTP_HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
smalyshev committed Jun 14, 2012
1 parent ec2c5c5 commit 580cddd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Zend/Oauth/Provider.php
Expand Up @@ -260,7 +260,7 @@ protected function getRequestUrl()
if(empty($_SERVER['SERVER_PORT']) || empty($_SERVER['HTTP_HOST']) || empty($_SERVER['REQUEST_URI'])) { if(empty($_SERVER['SERVER_PORT']) || empty($_SERVER['HTTP_HOST']) || empty($_SERVER['REQUEST_URI'])) {
return Zend_Uri_Http::fromString("http://localhost/"); return Zend_Uri_Http::fromString("http://localhost/");
} }
if($_SERVER['SERVER_PORT'] == 443 || (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')) { if($_SERVER['SERVER_PORT'] == 443 || (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (!empty($_SERVER['HTTP_HTTPS']) && $_SERVER['HTTP_HTTPS'] == 'on')) {
$proto = 'https'; $proto = 'https';
} }
return Zend_Uri_Http::fromString("$proto://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"); return Zend_Uri_Http::fromString("$proto://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}");
Expand Down

0 comments on commit 580cddd

Please sign in to comment.