8000 When following redirects, I'd like to be able to access the final location · Issue #90 · edgurgel/httpoison · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
When following redirects, I'd like to be able to access the final location #90
Open
@QuinnWilton

Description

@QuinnWilton

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0