X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FProxy.php;h=419289c39f6e2927b57871c20abec77e89d39880;hb=38fbe281f9f774e8c0c9df1f5d36a8ecee08f34f;hp=15ef1c44128b70639fc337ef560a56f8023647f4;hpb=75d3f5094bab92b42d98d35a7aab8419626fbe91;p=friendica.git diff --git a/src/Module/Proxy.php b/src/Module/Proxy.php index 15ef1c4412..419289c39f 100644 --- a/src/Module/Proxy.php +++ b/src/Module/Proxy.php @@ -1,6 +1,6 @@ getRequestInfo(); if (!DI::config()->get('system', 'proxify_content')) { Logger::notice('Proxy access is forbidden', ['request' => $request, 'agent' => $_SERVER['HTTP_USER_AGENT'] ?? '', 'accept' => $_SERVER['HTTP_ACCEPT'] ?? '']); @@ -53,7 +54,6 @@ class Proxy extends BaseModule } if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"])) { - header("HTTP/1.1 304 Not Modified"); header("Last-Modified: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); if (!empty($_SERVER["HTTP_IF_NONE_MATCH"])) { header("Etag: " . $_SERVER["HTTP_IF_NONE_MATCH"]); @@ -65,7 +65,7 @@ class Proxy extends BaseModule header_remove("Expires"); header_remove("Cache-Control"); } - exit; + throw new NotModifiedException(); } if (empty($request['url'])) { @@ -119,13 +119,13 @@ class Proxy extends BaseModule * ] * @throws \Exception */ - private static function getRequestInfo(array $parameters) + private function getRequestInfo() { $size = ProxyUtils::PIXEL_LARGE; $sizetype = ''; - if (!empty($parameters['url']) && empty($_REQUEST['url'])) { - $url = $parameters['url']; + if (!empty($this->parameters['url']) && empty($_REQUEST['url'])) { + $url = $this->parameters['url']; // thumb, small, medium and large. if (substr($url, -6) == ':micro') {