Browse Source

Check that res.statusCode in 200..299 range

http2
Vsevolod Strukchinsky 11 years ago
parent
commit
e7359757b1
  1. 2
      index.js

2
index.js

@ -42,7 +42,7 @@ module.exports = function (url, opts, cb) {
return; return;
} }
if (res.statusCode !== 200) { if (res.statusCode < 200 || res.statusCode > 299) {
res.destroy(); res.destroy();
cb(res.statusCode); cb(res.statusCode);
return; return;

Loading…
Cancel
Save