-
Notifications
You must be signed in to change notification settings - Fork 3.2k
HEAD requests with Node v5 have issues with gzipped content and fail. #2045
Copy link
Copy link
Closed
Labels
Description
This script reproduces the issue:
var req = require('request');
req({
url: 'http://google.com',
method: 'HEAD',
headers: {},
followAllRedirects: false,
followRedirect: true,
jar: true,
timeout: 15000,
gzip: true,
rejectUnauthorized: false,
strictSSL: true
}, function (err, res, body) {
if (err) {
console.error(err.stack || err);
}
});Steps to reproduce:
aniket [/tmp/request-bug] -> node -v
v5.1.0
aniket [/tmp/request-bug] -> npm -v
3.3.12
aniket [/tmp/request-bug] -> cat node_modules/request/package.json| grep version
"version": "2.69.0"
aniket [/tmp/request-bug] -> node reproduce.js
Error: unexpected end of file
at Zlib._handle.onerror (zlib.js:363:17)
aniket [/tmp/request-bug] ->
Reactions are currently unavailable