mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-02 03:27:52 +08:00
Fix JSON-RPC error formatting
PUBLISHED_FROM=9af7e0a2a90fab6e012174c154f62ee29c8b879c
This commit is contained in:
parent
5f59b7e747
commit
c9fc7a1320
@ -8152,8 +8152,8 @@ int mg_rpc_create_error(char *buf, int len, struct mg_rpc_request *req,
|
||||
|
||||
n += json_emit(buf + n, len - n, "{s:s,s:V,s:{s:i,s:s,s:", "jsonrpc", "2.0",
|
||||
"id", req->id == NULL ? "null" : req->id->ptr,
|
||||
req->id == NULL ? 4 : req->id->len, "error", "code", code,
|
||||
"message", message, "data");
|
||||
req->id == NULL ? 4 : req->id->len, "error", "code",
|
||||
(long) code, "message", message, "data");
|
||||
va_start(ap, fmt);
|
||||
n += json_emit_va(buf + n, len - n, fmt, ap);
|
||||
va_end(ap);
|
||||
|
Loading…
x
Reference in New Issue
Block a user