lwazi 1.2.5 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -342,9 +342,16 @@ class NavigationCrawler
|
|
|
342
342
|
$parts = parse_url($full);
|
|
343
343
|
$scheme = $parts['scheme'] ?? 'http';
|
|
344
344
|
$host = $parts['host'] ?? parse_url($this->rootUrl, PHP_URL_HOST);
|
|
345
|
+
$port = $parts['port'] ?? parse_url($this->rootUrl, PHP_URL_PORT);
|
|
345
346
|
$path = $parts['path'] ?? '/';
|
|
346
347
|
|
|
347
|
-
|
|
348
|
+
$url = $scheme . '://' . $host;
|
|
349
|
+
if ($port && (($scheme === 'http' && $port !== 80) || ($scheme === 'https' && $port !== 443))) {
|
|
350
|
+
$url .= ':' . $port;
|
|
351
|
+
}
|
|
352
|
+
$url .= $path;
|
|
353
|
+
|
|
354
|
+
return $url;
|
|
348
355
|
}
|
|
349
356
|
|
|
350
357
|
protected function isInternal(string $url): bool
|