Skip to content

Conversation

@dstrop
Copy link

@dstrop dstrop commented Jul 27, 2016

Nette\Http\Url::getHostUrl() returns '//' when no scheme or host is suplied.
Which is slightly annoing for me and it goes against URI syntax 'scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]'.

better URI syntax complience
@Majkl578
Copy link
Contributor

Leading // is mandatory if authority is present in the URI (regardless if scheme is present or not), as per RFC 3986.

Also PSR-7 follows this:

If an authority is present, it MUST be prefixed by "//".

@dg
Copy link
Member

dg commented Sep 26, 2016

For http: it should be omitted, for file: is should not https://en.wikipedia.org/wiki/File_URI_scheme.

@dg dg closed this in 59c955d Sep 26, 2016
dg added a commit that referenced this pull request Sep 27, 2016
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.

3 participants