-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
redirect location is being decoded before being followed #582
Comments
It appears that there's an option in the underlying Apache HTTPClient 4.5.x that normalizes the URIs. See https://github.com/apache/httpcomponents-client/blob/4.5.x/httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java#L162-L164 A quick test shows this behavior:
I think you should be able to get around this by passing in a custom |
Did a bit of a copy+paste of the I've opened a PR. |
Oh, and thank you for your reply, it was very helpful. |
Any idea when/if my change will make it into clj-http? |
@torkus sorry for the delay, 3.12.0 is out now 🎉 |
all good, thank you for your help, I appreciate it. |
um ... this is embarrassing, but I think I made a simple logic mistake. I had:
and
I'll open a fix and include a test this time. |
Fixed version here: #584 (no rush ;) |
I have this (roughly):
with this output:
and from the above we can see that this:
is redirected to:
which exists, but instead this is requested:
which does not exist, resulting in a 404.
Is this a bug somewhere?
Using
clj-http 3.11.0
,java 11
,clojure 1.10.1
The text was updated successfully, but these errors were encountered: