Max size on JSON response #2255
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Well... I fail to see the "JSON" specifics in your question, you are just calling https://mongoose.ws/documentation/#mg_http_reply Lines 336 to 352 in d013e0f Lines 26 to 43 in d013e0f Lines 17 to 42 in d013e0f |
Beta Was this translation helpful? Give feedback.
Well... I fail to see the "JSON" specifics in your question, you are just calling https://mongoose.ws/documentation/#mg_http_reply
Mongoose uses dynamic memory allocation. Your readJSON(), whatever it does, will return a
const char *
.mg_http_reply()
will grab that string and try to put it on Mongoose buffer to be sent to TCP, The buffer will try to resize to fit the contents, and if it can't, you'll see an out of memory message in the logmongoose/src/http.c
Lines 336 to 352 in d013e0f