]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/Network.php
Hash the URL before using it as cache key in Util\Images::getInfoFromURLCached
[friendica.git] / src / Util / Network.php
index 9c7b6a8af8890957e5894a705798b79db5de52da..7c7269fa8f7b2f0cfcc63d08b97afee09a6d4525 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -25,6 +25,7 @@ use Friendica\Core\Hook;
 use Friendica\Core\Logger;
 use Friendica\DI;
 use Friendica\Model\Contact;
+use Friendica\Network\HTTPException\NotModifiedException;
 
 class Network
 {
@@ -434,7 +435,8 @@ class Network
         *
         * @param array $parsed URL parts
         *
-        * @return string The glued URL
+        * @return string The glued URL.
+        * @deprecated since version 2021.12, use a UriInterface object like GuzzleHttp\Psr7\Uri instead
         */
        public static function unparseURL(array $parsed)
        {
@@ -544,8 +546,7 @@ class Network
                header('Last-Modified: ' . $last_modified);
 
                if ($flag_not_modified) {
-                       header("HTTP/1.1 304 Not Modified");
-                       exit;
+                       throw new NotModifiedException();
                }
        }