up link is relative

This commit is contained in:
Girish Ramakrishnan
2016-03-29 14:02:53 -07:00
parent 3fbeb2a1c1
commit 9e8179a235
+2 -2
View File
@@ -344,9 +344,9 @@ Acme.prototype.downloadChain = function (linkHeader, callback) {
var linkInfo = parseLinks(linkHeader);
if (!linkInfo || !linkInfo.up) return new AcmeError(AcmeError.EXTERNAL_ERROR, 'Failed to parse link header when downloading certificate chain');
debug('downloadChain: downloading from %s', linkInfo.up);
debug('downloadChain: downloading from %s', this.caOrigin + linkInfo.up);
superagent.get(linkInfo.up).buffer().parse(function (res, done) {
superagent.get(this.caOrigin + linkInfo.up).buffer().parse(function (res, done) {
var data = [ ];
res.on('data', function(chunk) { data.push(chunk); });
res.on('end', function () { res.text = Buffer.concat(data); done(); });