diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-08-28 16:05:09 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-08-28 17:15:35 +0200 |
commit | 611f470879633a3d02e185029cafc24b60bd803b (patch) | |
tree | bfea8e135b2c0a8e9b392aa2ddf6aa553053af16 /admin | |
parent | a36ed2078ac3891af18ff575b57d4e8175596e74 (diff) |
#915 set maximum REST API response to 64 Kbytes
The existing 4 Kbytes might not be enough to store the results of the
GET /clients request, extend it up to 64 Kbytes.
Diffstat (limited to 'admin')
-rw-r--r-- | admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp index c7e6cac3..0d2bc66a 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp +++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp @@ -3951,9 +3951,11 @@ static int og_client_not_authorized(struct og_client *cli) return -1; } +#define OG_MSG_RESPONSE_MAXLEN 65536 + static int og_client_ok(struct og_client *cli, char *buf_reply) { - char buf[4096] = {}; + char buf[OG_MSG_RESPONSE_MAXLEN] = {}; int err = 0, len; len = snprintf(buf, sizeof(buf), @@ -3977,9 +3979,9 @@ enum og_rest_method { static int og_client_state_process_payload_rest(struct og_client *cli) { + char buf_reply[OG_MSG_RESPONSE_MAXLEN] = {}; struct og_msg_params params = {}; enum og_rest_method method; - char buf_reply[4096] = {}; const char *cmd, *body; json_error_t json_err; json_t *root = NULL; |