Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Can not download a specific file; but it works fine with wget, curl or firefox #2030

@Skywalker13

Description

@Skywalker13

works:

wget http://curl.haxx.se/download/curl-7.40.0.tar.gz

empty file and no error:

 const fs = require ('fs');
 const request = require ('request');

 request
   .get('http://curl.haxx.se/download/curl-7.40.0.tar.gz')
   .on('error', function(err) {
     console.log(err)
   })
   .pipe(fs.createWriteStream('curl.tar.gz'));

Tested with request 2.67.0
node 4 and 5 on Debian Stretch amd64

Note that I've not this problem with many other URLs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions