Permalink
Browse files

Merge pull request #4073 from colinschoen/colinschoen/enhancement/fix…

…-proxy

Fix image proxy from throwing 404 on initial image load.
  • Loading branch information...
Oldiesmann committed Jul 5, 2017
2 parents b150ffa + 9371921 commit 2e08ecec099211b162d6939bad3113d0d8de9f21
Showing with 3 additions and 3 deletions.
  1. +3 −3 proxy.php
View
@@ -101,7 +101,7 @@ public function serve()
// Did we get an error when trying to fetch the image
$response = $this->checkRequest();
if (is_int($response)) {
if (!$response) {
// Throw a 404
header('HTTP/1.0 404 Not Found');
exit;
@@ -174,7 +174,7 @@ protected function cacheImage($request)
return false;
if ($responseCode != 200) {
return $request->result('code');
return false;
}
$headers = $response['headers'];
@@ -193,7 +193,7 @@ protected function cacheImage($request)
'size' => $response['size'],
'time' => time(),
'body' => base64_encode($response['body']),
)));
))) === false ? 1 : null;
}
}

0 comments on commit 2e08ece

Please sign in to comment.