Skip to content

Commit

Permalink
Allow for more redirecting responses in subrequests to be followed.
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-vessey committed Jan 20, 2025
1 parent 1f41fa9 commit 97fc549
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ public function resolve(NodeInterface $node, ImageStyleInterface $style): Cachea
->setAutoLastModified()
->addCacheableDependency($generated_url);
}
elseif ($response instanceof CacheableResponseInterface && ((int) ($response->getStatusCode() / 100)) === 3) {
return $response;
}
elseif ($response->getStatusCode() === 503) {
$after = $response->headers->get('Retry-After');
if ($after === NULL) {
Expand All @@ -79,6 +82,7 @@ public function resolve(NodeInterface $node, ImageStyleInterface $style): Cachea
continue;
}
}

throw $this->getExceptionFromResponse($response, $generated_url);
}

Expand Down

0 comments on commit 97fc549

Please sign in to comment.