Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

download 404 #48

Open
huanghaiyang opened this issue Aug 29, 2016 · 0 comments
Open

download 404 #48

huanghaiyang opened this issue Aug 29, 2016 · 0 comments

Comments

@huanghaiyang
Copy link

huanghaiyang commented Aug 29, 2016

in lib/follow-redirects.js line 128:

`
// Make a new option object for next request from old options object
// Break url in parts
var searchname = url.parse(redirectUrl).search;
var hostname = url.parse(redirectUrl).hostname;
var pathname = url.parse(redirectUrl).pathname;

var redirectOptions = options;
redirectOptions.reqUrl = redirectUrl;
redirectOptions.hostname = hostname;
redirectOptions.path = pathname + searchname;

var out = module.exports[proto].get(redirectOptions, redirectCallback(reqUrl, redirect), redirect);
`

when searchname is null ,it will download from http://120.52.72.22:80/dl.google.com/c3pr90ntc0td/closure-compiler/compiler-latest.tar.gznull

please fix this bug with :

redirectOptions.path = pathname + (searchname? searchname: '');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant