Allow empty params in GET request.

pull/1/head
Tatsuhiro Tsujikawa 2011-03-16 12:50:39 +09:00
parent da0ab67324
commit bb9ad97c5c
1 changed files with 5 additions and 3 deletions

View File

@ -644,12 +644,14 @@ decodeGetParams(const std::string& query)
} else {
jsonRequest = '{';
if(!method.empty()) {
strappend(jsonRequest, "\"method\":\"", method, "\",");
strappend(jsonRequest, "\"method\":\"", method, "\"");
}
if(!id.empty()) {
strappend(jsonRequest, "\"id\":\"", id, "\",");
strappend(jsonRequest, ",\"id\":\"", id, "\"");
}
if(!params.empty()) {
strappend(jsonRequest, ",\"params\":", jsonParam);
}
strappend(jsonRequest, "\"params\":", jsonParam);
jsonRequest += '}';
}
}