Skip to content

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

@jrasanen

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.

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