-
Notifications
You must be signed in to change notification settings - Fork 267
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
Ignore %2B in normalize #386
Comments
What do you expect to happen? What version of Addressable are you using? |
Sorry forgot to add the version but it is the most recent: 2.7.0 I passed him an already normalized url, my expectation would be that he would do nothing but he is removing characteres '%2B' and invalidating my url. Please correct me if I'm wrong, thanks! |
What does the URL look like before the first normalize? Did you normalize it with Addressable? Please share a complete code example (see https://guides.github.com/features/mastering-markdown/#examples for how to format code) |
Im not normalized, the AWS S3 already delivers the "normalized" link
Im not changed the original link.
valid_url = 'https://melianuncios-generic-s3-development.s3.us-east-2.amazonaws.com/dmfacessorios/MONITOR+FIXO%2BSENSOR+PRATA.jpg'
invalid_url = Addressable::URI.parse(valid_url).normalize.to_s
invalid_url => "https://melianuncios-generic-s3-development.s3.us-east-2.amazonaws.com/dmfacessorios/MONITOR+FIXO+SENSOR+PRATA.jpg" |
We are removing the default HTTP gem URL normalization because there is an upstream error which causes issues for `+` characters. sporkmonger/addressable#386
We are removing the default HTTP gem URL normalization because there is an upstream error which causes issues for `+` characters. sporkmonger/addressable#386
I think this issue is the same as #366 but I'll keep this one open until it has been addressed. |
When passing a string that contains '%2B' the normalize method remove '%2B'
Example:
url = 'https://melianuncios-generic-s3-development.s3.us-east-2.amazonaws.com/dmfacessorios/MONITOR+FIXO%2BSENSOR+PRATA.jpg' Addressable::URI.parse(url).normalize.to_s
Return: "https://melianuncios-generic-s3-development.s3.us-east-2.amazonaws.com/dmfacessorios/MONITOR+FIXO+SENSOR+PRATA.jpg"
I found this PR related: #99
Addressable version: 2.7.0
The text was updated successfully, but these errors were encountered: