Skip to content

Commit

Permalink
Change redirect url (from headers['Location']) from array to string (#…
Browse files Browse the repository at this point in the history
…43734)

* Change redirect url (from headers['Location']) from array to string
* Update SocketTransport.php
  • Loading branch information
janschoenherr authored Jul 3, 2024
1 parent 46b3dff commit 807d71d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/src/Http/Transport/SocketTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public function request($method, UriInterface $uri, $data = null, array $headers
$content = $this->getResponse($content);

// Follow Http redirects
if ($content->code >= 301 && $content->code < 400 && isset($content->headers['Location'])) {
return $this->request($method, new Uri($content->headers['Location']), $data, $headers, $timeout, $userAgent);
if ($content->code >= 301 && $content->code < 400 && isset($content->headers['Location'][0])) {
return $this->request($method, new Uri($content->headers['Location'][0]), $data, $headers, $timeout, $userAgent);
}

return $content;
Expand Down

0 comments on commit 807d71d

Please sign in to comment.