mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Use url.resolve for storageUrl to prevent problems with slashes.
This commit is contained in:
parent
b2e114c9be
commit
efa38d3e1a
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue