Skip to content

Commit

Permalink
Follow redirects should work on PUT and POST requests as well. This i…
Browse files Browse the repository at this point in the history
…s more consistent to other frameworks, e.g. .NET
  • Loading branch information
janjongboom committed Nov 15, 2011
1 parent 62592e7 commit a06ad2f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,6 @@ Request.prototype.request = function () {
if (response.statusCode >= 300 &&
response.statusCode < 400 &&
self.followRedirect &&
self.method !== 'PUT' &&
self.method !== 'POST' &&
response.headers.location) {
if (self._redirectsFollowed >= self.maxRedirects) {
self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop."))
Expand Down

0 comments on commit a06ad2f

Please sign in to comment.