mirror of https://gitee.com/bigwinds/arangodb
Stricter RFC 3986 compliance for querystrings.
This commit is contained in:
parent
15435982f6
commit
576f4f4064
|
@ -100,7 +100,11 @@ function querystringify(query, useQuerystring) {
|
||||||
if (typeof query === 'string') {
|
if (typeof query === 'string') {
|
||||||
return query.charAt(0) === '?' ? query.slice(1) : query;
|
return query.charAt(0) === '?' ? query.slice(1) : query;
|
||||||
}
|
}
|
||||||
return (useQuerystring ? querystring : qs).stringify(query);
|
return (useQuerystring ? querystring : qs).stringify(query)
|
||||||
|
.replace(/[!'()*]/g, function(c) {
|
||||||
|
// Stricter RFC 3986 compliance
|
||||||
|
return '%' + c.charCodeAt(0).toString(16);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function request(req) {
|
function request(req) {
|
||||||
|
|
Loading…
Reference in New Issue