Skip to content

Commit

Permalink
Adding url to redirect error for better debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed Sep 17, 2012
1 parent f462bd3 commit 8a82c5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ Request.prototype.start = function () {
(self.followRedirect && (self.method !== 'PUT' && self.method !== 'POST' && self.method !== 'DELETE'))) &&
response.headers.location) {
if (self._redirectsFollowed >= self.maxRedirects) {
self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop."))
self.emit('error', new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+self.uri.href))
return
}
self._redirectsFollowed += 1
Expand Down

0 comments on commit 8a82c5b

Please sign in to comment.