1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Use url.resolve for storageUrl to prevent problems with slashes.

This commit is contained in:
Simo Kinnunen 2014-12-17 21:35:17 +09:00
parent b2e114c9be
commit efa38d3e1a

View file

@ -1,4 +1,5 @@
var util = require('util')
var url = require('url')
var syrup = require('stf-syrup')
var Promise = require('bluebird')
@ -15,7 +16,7 @@ module.exports = syrup.serial()
var resolver = Promise.defer()
var req = request.post({
url: util.format('%ss/api/v1/%s', options.storageUrl, type)
url: url.resolve(options.storageUrl, util.format('s/api/v1/%s', type))
}
, function(err, res, body) {
if (err) {