diff options
author | Andrew Dolgov <[email protected]> | 2020-09-15 08:00:18 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2020-09-15 08:00:18 +0300 |
commit | 478850ae6f56edaf1cd8bbc172b16e1cc2a59e7d (patch) | |
tree | 55a5b948b00ca72955814ac6d618ea0ee52739e9 | |
parent | 027b9cd6b23cb35a39491a6df35fc8e7046bad4e (diff) |
never print received data directly, always redirect to cached_url
-rw-r--r-- | init.php | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -151,10 +151,7 @@ class Api_Resize_Media extends Plugin { $data = fetch_file_contents(["url" => $url, "max_size" => MAX_CACHE_FILE_SIZE]); if ($data) { - if ($this->cache->put($local_filename, $data)) { - - if ($this->cache->exists($resized_filename)) { header("Location: " . $this->cache->getUrl($resized_filename)); return; @@ -176,9 +173,6 @@ class Api_Resize_Media extends Plugin { return; } } - - } else { - print $data; } } else { global $fetch_last_error; |