Open
Description
As it stands now, following a redirect only returns the final response, and there is no way to determine what URL that response maps to. For example, the following call hits tinfoil-fake-site.com
, but follows a redirect, and ends up on https://tinfoilsecurity.com
HTTPoison.request(:get, "tinfoil-fake-site.com", "", [], [hackney: [{:follow_redirect, true}]])
Since the final response does not have a location header (As it shouldn't!), we have no way of determining what page we ended up on.
The Hackney documentation claims that the "Last Location is stored in the location property of the client state," but I don't believe we have access to this from HTTPoison
.
I'll let you know if I find a way of accessing this information. I'm also happy to contribute a fix upstream if you have any ideas on a possible solution!
Metadata
Metadata
Assignees
Labels
No labels