mirror of https://github.com/aria2/aria2
Allow empty params in GET request.
parent
da0ab67324
commit
bb9ad97c5c
|
@ -644,12 +644,14 @@ decodeGetParams(const std::string& query)
|
||||||
} else {
|
} else {
|
||||||
jsonRequest = '{';
|
jsonRequest = '{';
|
||||||
if(!method.empty()) {
|
if(!method.empty()) {
|
||||||
strappend(jsonRequest, "\"method\":\"", method, "\",");
|
strappend(jsonRequest, "\"method\":\"", method, "\"");
|
||||||
}
|
}
|
||||||
if(!id.empty()) {
|
if(!id.empty()) {
|
||||||
strappend(jsonRequest, "\"id\":\"", id, "\",");
|
strappend(jsonRequest, ",\"id\":\"", id, "\"");
|
||||||
|
}
|
||||||
|
if(!params.empty()) {
|
||||||
|
strappend(jsonRequest, ",\"params\":", jsonParam);
|
||||||
}
|
}
|
||||||
strappend(jsonRequest, "\"params\":", jsonParam);
|
|
||||||
jsonRequest += '}';
|
jsonRequest += '}';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue