mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
fix fetching tarballs from npmjs registry
This commit is contained in:
parent
f38a897fa2
commit
16730bb7b4
1 changed files with 2 additions and 3 deletions
|
@ -36,7 +36,7 @@ Storage.prototype.request = function(options, cb) {
|
|||
headers.accept = headers.accept || 'application/json';
|
||||
headers['user-agent'] = headers['user-agent'] || this.userAgent;
|
||||
var req = request({
|
||||
url: this.config.url + options.uri,
|
||||
url: options.uri_full || (this.config.url + options.uri),
|
||||
method: options.method || 'GET',
|
||||
headers: headers,
|
||||
json: options.json || true,
|
||||
|
@ -165,12 +165,11 @@ Storage.prototype.get_tarball = function(name, filename) {
|
|||
}
|
||||
|
||||
Storage.prototype.get_url = function(url) {
|
||||
url = URL.parse(url);
|
||||
var stream = new mystreams.ReadTarballStream();
|
||||
stream.abort = function() {};
|
||||
|
||||
var rstream = this.request({
|
||||
uri: url.path,
|
||||
uri_full: url,
|
||||
encoding: null,
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue