Skip to content

Commit

Permalink
In case of redirect HTTP code can be <300;399>
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored Oct 3, 2019
1 parent 01bc77c commit 125da08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Crawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function crawl(string $url): CrawledResult
$httpCode = $httpResponse->getHttpCode();
$headers = $httpResponse->getHeaders();

if ($httpCode > 300 && $httpCode < 399 && isset($headers['Location']) === true) {
if ($httpCode >= 300 && $httpCode <= 399 && isset($headers['Location']) === true) {
$this->addUrl(RelativeUrlToAbsoluteUrl::process($crawledUrl, $headers['Location']));
}

Expand Down

0 comments on commit 125da08

Please sign in to comment.