8000 Router: constructUrl respect port by f3l1x · Pull Request #10 · nette/routing · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Router: constructUrl respect port #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 19 commits into from
Closed

Conversation

f3l1x
Copy link
Member
@f3l1x f3l1x commented Oct 12, 2021

@dg
Copy link
Member
dg commented Oct 12, 2021

This ip2long($host) needs to be called with host, the authority includes the port.

@@ -255,7 +255,7 @@ public function constructUrl(array $params, Nette\Http\UrlScript $refUrl): ?stri
$url = (($tmp = $refUrl->getAuthority()) ? "//$tmp" : '') . $url;

} else {
$host = $refUrl->getHost();
$host = $refUrl->getAuthority();
$parts = ip2long($host)
? [$host]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, calling $refUrl->getAuthority() this should be here

@f3l1x
Copy link
Member Author
f3l1x commented Oct 13, 2021

@dg Yep, I know. It's PoC if it's working like that. Should I continue on this and update ip2long?

@dg dg closed this in 0dab119 Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Route constructUrl incorrectly builds a URL on a non-standard port
4 participants
0