Open
Description
Given a valid URL like https://example.com/article/id%3A1.2%2F1/bar
, addressable's normalization replaces %3A
with a literal :
, and %2F
with a literal /
. Both of these replacements change the URL, meaning that requests for the URL may fail.
> Addressable::URI.normalized_encode("https://example.com/article/id%3A1.2%2F1/bar")
=> "https://example.com/article/id:1.2/1/bar"
Using URI#normalize
has the same issue with %3A
, but seems to preserve the %2F
correctly:
> Addressable::URI.parse("https://example.com/article/id%3A1.2%2F1/bar").normalize.to_s
=> "https://example.com/article/id:1.2%2F1/bar"
My understanding of RFC3986 is that reserved characters (including :
and /
) should not be decoded during normalization.
Activity