-
Notifications
You must be signed in to change notification settings - Fork 986
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
URI validation fails when it contains reserved characters #1214
Comments
Hi @luizkowalski, the exception is coming from
Faraday does some internal magic on the request url by splitting and recombining it to help with some common transformations, and I presume at some point it may cause the faraday/lib/faraday/connection.rb Line 525 in c26df87
Using your example code, base would be #<URI::HTTPS https://service.com/> and url would be service:search?limit=50&offset=400 .Now, interestingly enough, if the second parameter of the + method for URI contains a : , it seems like the result is quite unexpected!
For some reason, the
This however doesn't work in all cases as you may need to append a relative path to the |
@iMacTia it worked now. The base URL is: |
@luizkowalski perfect, yes that's exactly what I meant with
As faraday assumes the provided URL is absolute if it starts with |
Basic Info
Issue description
One of the service providers I'm using has URLs like this:
https://service.com/service:search
. This is how we setup Faraday:and when I invoke it
but when I do this with the URL in question, I get this:
I assume it was something related to net/http adapter since it is the default adapter so I did the same call manually
and this actually works so I suspect that something in Faraday is validating this URL in a different way than net/http
The text was updated successfully, but these errors were encountered: