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 | e80c85fbff66f7fc2995d10186a4513c7cec76bf (patch) | |
tree | 06f5ce3dde95624f0191bc083302ebe7a465ce31 /sources | |
parent | 7e6ba45f953474033618db5172c7ea5b63dc7b9c (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 'sources')
-rw-r--r-- | sources/ogAdmServer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index c7e6cac..0d2bc66 100644 --- a/sources/ogAdmServer.cpp +++ b/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; |