Skip to content

Commit

Permalink
check $vars['SERVER_PORT'] presense (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
gurucomkz authored and robbieaverill committed Oct 20, 2022
1 parent c0a6a01 commit 4ce354d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HttpRequestAdapter.php
Expand Up @@ -79,7 +79,7 @@ public function getUri($path)
$vars = $this->getServerVars();

$uri = '';
$protocol = (isset($vars['HTTPS']) || $vars['SERVER_PORT'] === '443') ? 'https' : 'http';
$protocol = isset($vars['HTTPS']) || (isset($vars['SERVER_PORT']) && $vars['SERVER_PORT'] === '443') ? 'https' : 'http';
$uri .= $protocol . '://';

if (!empty($vars['PHP_AUTH_USER'])) {
Expand Down

0 comments on commit 4ce354d

Please sign in to comment.