Skip to content

POST 301 redirects don't respect "agent" property (when using Request library) #9

Description

@jrasanen

When POST returns 301, the following GET isn't using the same agent setting.

var options = {
    url: 'http://website/',
    method: 'POST',
    headers: headers,
    followAllRedirects: true,
    agent: new Socks5ClientHttpAgent({socksHost: '127.0.0.1', socksPort: 9050}),
    form: {
      ...
    }
}
// POST returns 301 /index.php
request.post(options, function (err, httpResponse, body) {...});

With this example POST goes through TOR but the following GET doesn't.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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