Skip to content

Commit

Permalink
Revert fda3415 (it was something different)
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiu-cristea authored Nov 20, 2024
1 parent 979bc34 commit 417edec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ARC2.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public static function getIncPath($f = '')
public static function getScriptURI()
{
if (isset($_SERVER) && (isset($_SERVER['SERVER_NAME']) || isset($_SERVER['HTTP_HOST']))) {
$server_proto = strtolower($_SERVER['SERVER_PROTOCOL'] ?? 'http');
$proto = preg_replace('/^([a-z]+)\/.*$/', '\\1', $server_proto);
$proto = preg_replace('/^([a-z]+)\/.*$/', '\\1', strtolower($_SERVER['SERVER_PROTOCOL'] ?? 'http'));
$port = $_SERVER['SERVER_PORT'];
$server = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
$script = $_SERVER['SCRIPT_NAME'];
Expand All @@ -68,8 +67,7 @@ public static function getScriptURI()
public static function getRequestURI()
{
if (isset($_SERVER) && isset($_SERVER['REQUEST_URI'])) {
$server_proto = strtolower($_SERVER['SERVER_PROTOCOL'] ?? 'http');
return preg_replace('/^([a-z]+)\/.*$/', '\\1', $server_proto).
return preg_replace('/^([a-z]+)\/.*$/', '\\1', strtolower($_SERVER['SERVER_PROTOCOL'] ?? 'http')).
'://'.(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']).
(80 != $_SERVER['SERVER_PORT'] ? ':'.$_SERVER['SERVER_PORT'] : '').
$_SERVER['REQUEST_URI'];
Expand Down

0 comments on commit 417edec

Please sign in to comment.