Skip to content

Commit c4156ec

Browse files
committed
Respect port numbers in buildUrl()
BuildUrl() does not support the full list of URL parts that parse_url() provided. Need to at least support port numbers (issue found when running automated testing in a sandbox, where the scraper target was on not-port-80)
1 parent 6e6c07b commit c4156ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Url.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,10 @@ protected function buildUrl()
419419
$url .= $this->info['host'];
420420
}
421421

422+
if (isset($this->info['port'])) {
423+
$url .= ':' . $this->info['port'];
424+
}
425+
422426
$url .= $this->getPath();
423427

424428
if (!empty($this->info['query'])) {

0 commit comments

Comments
 (0)