When I request images using node request library of the given url, the images loaded are not complete. After storing the loaded image it looks like https://ibb.co/i5xVAR
However the request finishes without an error and has status code 200. For me it seems that the ssl connection gets closed. Other tools like browser or curl transfer the image complete.
const request = require('request');
const r1 = request({
url: 'https://open.hpi.de/files/f1d16619-9813-4d59-96b3-d84908929b23',
encoding: 'binary'
}, (err, response, body) => {
if (err) {
console.log(err);
return;
}
// complete file should be loaded
// content and body length should match
// read ECONNRESET should not be thrown
console.log('body length', body.length);
console.log('response content length', response.headers['content-length']);
});