From: Matthew Exon Date: Mon, 1 Jul 2024 06:07:39 +0000 (+0200) Subject: Use last URL from redirect chain X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1049ac4779d37fe80adef4bbe5a01efbe03892b5;p=friendica.git Use last URL from redirect chain --- diff --git a/src/Network/HTTPClient/Response/GuzzleResponse.php b/src/Network/HTTPClient/Response/GuzzleResponse.php index d277f2a8df..6dbccbff9f 100644 --- a/src/Network/HTTPClient/Response/GuzzleResponse.php +++ b/src/Network/HTTPClient/Response/GuzzleResponse.php @@ -89,7 +89,7 @@ class GuzzleResponse extends Response implements ICanHandleHttpResponses, Respon $headersRedirect = $response->getHeader(RedirectMiddleware::HISTORY_HEADER) ?? []; if (count($headersRedirect) > 0) { - $this->redirectUrl = $headersRedirect[0]; + $this->redirectUrl = end($headersRedirect); $this->isRedirectUrl = true; } }