-
Notifications
You must be signed in to change notification settings - Fork 18k
net/url: ParseRequestURI changes behavior from 1.9 with IRC URLs #23657
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
Comments
Is it assumed that
Edit: Looking at a couple other languages (ruby, java) these seem to parse that input as a fragment.
|
Note that this is about ParseRequestURI (IsRequestURL is in the govalidator package and calls url.ParseRequestURI). The relevant docs say:
And of course
url.Parse was happy in Go 1.9 and Go 1.10. url.ParseRequestURI was happy in Go 1.9 but silently converted the URL, when reprinting it with u.String, into It seems like this change is unfortunate and will break some code, but Go 1.10 is actually doing the right thing by rejecting # in userinfo, and Go 1.9 and earlier were not. |
Even govalidator says:
I don't believe that receiving |
@asaskevich, can you fix govalidator? |
Took me a few minutes but I think @bradfitz means fix the govalidator tests not to expect |
Is that even a valid IRC url? The channel usually goes in the path, like |
|
The previously-used URL format is not valid as per either of these two: https://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt https://www-archive.mozilla.org/projects/rt-messaging/chatzilla/irc-urls.html Further, Go’s net/url package no longer parses the syntax as of golang/go@ba1018b fixes asaskevich#250 related to golang/go#23657
Running Go 1.10 inside of Google revealed that this test now fails in Go 1.10:
https://github.com/asaskevich/govalidator
... due to ba1018b (https://go-review.googlesource.com/87038)
For #23392
Is that a valid URL?
The text was updated successfully, but these errors were encountered: