You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While using request to fetch the homepage of a website I got this strange issue on newer node versions, everything is fine on 4.6:
$ nvm run --lts=argon reproduceissue.js
Running node LTS "argon" -> v4.6.2 (npm v2.15.11)
working without gzip
working with gzip
$ nvm run --lts=boron reproduceissue.js
Running node LTS "boron" -> v6.9.1 (npm v3.10.8)
not working with gzip
{"errno":-5,"code":"Z_BUF_ERROR"}
working without gzip
Here's the code used to reproduce issue:
varrequest=require('request');request({url: 'http://www.mantovanispa.it',gzip: true},function(error,response,body){if(!error){console.log('working with gzip');}else{console.log('not working with gzip');console.log(JSON.stringify(error));}});request({url: 'http://www.mantovanispa.it'},function(error,response,body){if(!error){console.log('working without gzip');}else{console.log('not working without gzip');console.log(JSON.stringify(error));}});
The issue seems linked to gzip, maybe this site use a strange way to handle compression, but on older versions of node this won't happen.
The text was updated successfully, but these errors were encountered:
While using request to fetch the homepage of a website I got this strange issue on newer node versions, everything is fine on 4.6:
Here's the code used to reproduce issue:
The issue seems linked to gzip, maybe this site use a strange way to handle compression, but on older versions of node this won't happen.
The text was updated successfully, but these errors were encountered: