Skip to content

Commit

Permalink
Fix a regression introduced by cba36ce
Browse files Browse the repository at this point in the history
Request.prototype.init() should not clear self.method if it is already
set.  This is relevant when retrying requests with proper authentication
(the retries are handled similarly to redirects, but should keep the
same request method).
  • Loading branch information
nylen committed Apr 1, 2013
1 parent bff3e0b commit c40993f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Request.prototype.init = function (options) {
var self = this
if (!options) options = {}

self.method = options.method || 'GET'
if (!self.method) self.method = options.method || 'GET'

debug(options)
if (!self.pool && self.pool !== false) self.pool = globalPool
Expand Down

0 comments on commit c40993f

Please sign in to comment.