Explorar o código

don't check for size on head requests

Gil Pedersen %!s(int64=13) %!d(string=hai) anos
pai
achega
9bea261bad
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/reader.js

+ 1 - 1
lib/reader.js

@@ -79,7 +79,7 @@ function getFileStream(srcUrl, options, cb) {
       var size = res.headers['content-length'] ? parseInt(res.headers['content-length'], 10) : -1;
 
       // turn bad content-length into actual errors
-      if (size >= 0) {
+      if (size >= 0 && !options.probe) {
         var accum = 0;
         res.on('data', function(chunk) {
           accum += chunk.length;