-
Notifications
You must be signed in to change notification settings - Fork 321
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
Subtle issue with normalizing URIs #206
Comments
Thanks for report. My bad. Will fix today. |
It should not send |
Actually I have misunderstood original code and wiped out things that were essential. Will provide a fix ASAP. |
Released as |
❤️ |
I ran into an issue today due to this commit. I often use Charles Proxy to inspect HTTP(S) requests. When proxying HTTPS request to, for example, https://www.google.com I see requests being made to The following code causes the problem: require "http"
HTTP.via("0.0.0.0", 8888).get "https://www.google.com", :ssl => { :verify_mode => OpenSSL::SSL::VERIFY_NONE } When doing the same thing with a persistent connection to http://www.google.com (plain HTTP) everything works as expected. The headline is Is |
@britishtea definitely seems like a bug, possibly related to Addressable? |
@Connorhd fixed issue reported by @britishtea in 2625436 |
Since 81509bc we've had issues with using this gem to communicate with elasticsearch. It seems that prior to this change, the request URI was being normalized correctly and thus not including the scheme and host segment. As is evidenced below:
And after 81509bc:
It seems some servers are strict in this regard. Elasticsearch apparently being one of them. 🙈
This is easily resolved by
uri.normalize.request_uri
instead of just normalizing the URI, but this causes some issues with proxying that I don't really understand.The text was updated successfully, but these errors were encountered: