mirror of https://gitee.com/bigwinds/arangodb
parent
13774aadb3
commit
33bf19874e
|
@ -80,6 +80,7 @@ function RequestSuite () {
|
|||
expect(Number(res.headers['content-length'])).to.equal(res.rawBody.length);
|
||||
var obj = JSON.parse(res.body);
|
||||
expect(obj.path).to.equal(path);
|
||||
expect(obj.headers).not.to.have.property('content-type');
|
||||
},
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*jshint globalstrict: true, sub: true */
|
||||
/*jshint sub: true */
|
||||
/*global exports: true */
|
||||
'use strict';
|
||||
|
||||
|
@ -131,7 +131,11 @@ function request(req) {
|
|||
}
|
||||
}
|
||||
|
||||
let headers = {'content-type': contentType};
|
||||
const headers = {};
|
||||
|
||||
if (contentType) {
|
||||
headers['content-type'] = contentType;
|
||||
}
|
||||
|
||||
if (req.headers) {
|
||||
Object.keys(req.headers).forEach(function (name) {
|
||||
|
@ -140,7 +144,7 @@ function request(req) {
|
|||
}
|
||||
|
||||
if (req.auth) {
|
||||
headers['authorization'] = (
|
||||
headers['authorization'] = (//eslint-disable-line dot-notation
|
||||
req.auth.bearer ?
|
||||
'Bearer ' + req.auth.bearer :
|
||||
'Basic ' + new Buffer(
|
||||
|
@ -189,4 +193,4 @@ exports.Response = Response;
|
|||
};
|
||||
});
|
||||
|
||||
module.exports = exports;
|
||||
module.exports = exports;
|
||||
|
|
Loading…
Reference in New Issue