-
Notifications
You must be signed in to change notification settings - Fork 47
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
Are hostnames with underscores / ampersands legit? #141
Comments
Ampersand is the similar case:
|
git bisect shows the following commit makes this change: d7dc19a So URI 0.13.0 uses RFC2396 by default, 1.0.0 and above switched into RFC3986 as default. Actually the following code behaves the same both on URL 0.13.0 and 1.0.2:
With URI 1.0.2:
|
Maybe it is better that this line is updated ?? Line 6 in e46960a
|
I have found this one, which seems to confirm the change is intentional. However, the ampersand is not covered. |
So I think the actual change is that URI 0.13.0 follows (is expected to follow) RFC2396, while 1.0.2 follow RFC3986 , so for ampersand (or other characters) we have to refer to RFC itself. And: Then (maybe I can misread these) rfc2396 seems to be saying that ampersand is in |
So there is this commit itroducing the rfc3986 parser and also flipping the "underscore" test case. This also works for Ruby 3.4 as well as the older rubies the same:
What changes it this:
Therefore I'm going back to globalid and one of the possible solutions for them would be to explicitly keep using the |
@voxik wrote:
That's correct. The reason is that URIs (in theory even for schemes such as http(s)) may be used with systems that use something else than the DNS. |
Testing globalid Ruby 3.4, there some issues such as:
Digging closer into this test error, I have spotted this difference:
vs
As you can see, for the URI 0.13.1, the underscore is not allowed, while with URI 1.0.2 underscore works just fine. Is that expected?
The text was updated successfully, but these errors were encountered: