wuchengwei / node-wget

A download tool with support for http/https proxy.
MIT License
64 stars 38 forks source link

follow redirect #3

Open crodas opened 10 years ago

crodas commented 10 years ago

Follow redirect, very simple approach

ghost commented 10 years ago

@crodas I see an error with this:

opts =
  from: 'https://github.com/caolan/async/archive/v0.2.5.zip'
  to: '/Users/franklovecchio/test/node_modules/async.zip'

download = wget.download opts.from, opts.to, { }

download.on 'error', (error) -> throw new Error error
download.on 'end', () ->

Error:

wget/lib/wget.js:57
        if (res.header.location) {
                      ^
TypeError: Cannot read property 'location' of undefined
gnestor commented 7 years ago

@ghost I'm getting the same error