Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auto forwarding DELETE redirects #119

Closed
Raynos opened this issue Nov 28, 2011 · 1 comment
Closed

auto forwarding DELETE redirects #119

Raynos opened this issue Nov 28, 2011 · 1 comment

Comments

@Raynos
Copy link

Raynos commented Nov 28, 2011

We seem to have blocks on PUT and POST here

https://github.com/mikeal/request/blob/master/main.js#L339

  if (response.statusCode >= 300 &&
      response.statusCode < 400  &&
      self.followRedirect     &&
      self.method !== 'PUT' &&
      self.method !== 'POST' &&
      response.headers.location

Should we also block self.method !== 'DELETE' ?

@mikeal
Copy link
Member

mikeal commented Nov 28, 2011

good point.

the reason we block put and post is because it could be dangerous because the request carries write consequences. DELETE does as well so we should also block it.

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

No branches or pull requests

2 participants