mikeal/request — Issue #134: After downloading a file, the mime-type is "application/octet-stream"?
Author: felixchan
Created: 2011-12-12 23:45:50+00:00
State: open

Hi,

uri = 'http://www.sweetslyrics.com/images/img_gal/25646_christina-perri-213968.jpg';
request({
'method':'GET',
'uri': uri
},function(err, response, body){
console.log(body.toString('hex',0,4)); //should be "ffd8ffe0"
});

After I download the file, it changes the content-type to "application/octet-stream"? The file type is a JPG file.

(For my app, I want to check whether a file is an image)

Thanks!