Skip to content
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

better URI syntax complience #96

Closed
wants to merge 1 commit into from
Closed

better URI syntax complience #96

wants to merge 1 commit into from

Conversation

@dstrop
Copy link

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

This comment has been minimized.

Copy link
Contributor

Majkl578 commented Jul 27, 2016

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

This comment has been minimized.

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
Projects
None yet
3 participants
You can’t perform that action at this time.