Skip to content

Commit c51de5f

Browse files
authored
Handle HTTP redirection responses in Client.php
1 parent d82d09b commit c51de5f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/FeedIo/Adapter/Http/Client.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ protected function request(string $method, string $url, ?DateTime $modifiedSince
6262
case 200:
6363
case 304:
6464
return new Response($psrResponse, $duration);
65+
case 301:
66+
case 302:
67+
case 303:
68+
case 307:
69+
case 308:
70+
return $this->request($method, $psrResponse->getHeaderLine('Location'), $modifiedSince);
6571
case 404:
6672
throw new NotFoundException('not found', $duration);
6773
default:

0 commit comments

Comments
 (0)