got
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -17,2 +17,4 @@ 'use strict'; | ||
if (res.statusCode < 400 && res.statusCode >= 300 && res.headers.location) { | ||
res.destroy(); | ||
if (++redirectCount > 10) { | ||
@@ -28,2 +30,3 @@ cb(new Error('Redirected 10 times. Aborting.')); | ||
if (res.statusCode !== 200) { | ||
res.destroy(); | ||
cb(res.statusCode); | ||
@@ -30,0 +33,0 @@ return; |
{ | ||
"name": "got", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Simplified HTTP/HTTPS GET requests", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
2067
36