mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
Use url.resolve for storageUrl to prevent problems with slashes.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user