From cc8624d43c0f3a5de2eeaf4b7819f20e5eb343b6 Mon Sep 17 00:00:00 2001 From: freek Date: Mon, 16 Nov 2015 17:14:04 +0100 Subject: [PATCH] - Fix for normalizing relative links when using non-80 ports --- src/Crawler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Crawler.php b/src/Crawler.php index 00091af..ac70fb8 100644 --- a/src/Crawler.php +++ b/src/Crawler.php @@ -218,8 +218,10 @@ protected function hasAlreadyCrawled(Url $url) protected function normalizeUrl(Url $url) { if ($url->isRelative()) { + $url->setScheme($this->baseUrl->scheme) - ->setHost($this->baseUrl->host); + ->setHost($this->baseUrl->host) + ->setPort($this->baseUrl->port); } if ($url->isProtocolIndependent()) {