You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, this definitely looks like a problem. Could you try to produce a more condensed test-case that duplicates the issue? Basically, I need the simplest URI that fails in this manner.
Wait, no... actually I didn't look at this closely enough. This is working very much as intended. You've probably just misunderstood what's actually happening here.
That second URI resolves to a network-path reference with a host and path of "". This essentially means that the joined URI resolves to "http://", which is not a valid URI. However, the other examples you gave resolve to valid URIs: "http://example.com/", "http://example.com/?a", and "http:///" respectively.
The following code:
Addressable::URI.join "http://www.good.is/post/sponsored-post-how-corporations-are-harnessing-the-power-of-renewable-energy/", "//"
Gives:
Absolute URI missing hierarchical segment: 'http://' (Addressable::URI::InvalidURIError)
This doesn't happen with any of the following:
Addressable::URI.join "http://www.good.is/post/sponsored-post-how-corporations-are-harnessing-the-power-of-renewable-energy/", "/"
Addressable::URI.join "http://www.good.is/post/sponsored-post-how-corporations-are-harnessing-the-power-of-renewable-energy/", "/?a"
Addressable::URI.join "http://www.good.is/post/sponsored-post-how-corporations-are-harnessing-the-power-of-renewable-energy/", "///"
The text was updated successfully, but these errors were encountered: