ESPAsyncWebServer icon indicating copy to clipboard operation
ESPAsyncWebServer copied to clipboard

Fill buffer for a chunked response being called with buffer length of zero

Open LeeLeahy2 opened this issue 3 years ago • 4 comments

Occasionally, the user routine that is used to fill the buffer for a chunked response is called with with a buffer length of zero. Returning any data in this case causes a stack smash protect panic. Returning zero (0) violates the interface definition since zero indicates that there is no more user data and that the response is complete.

LeeLeahy2 avatar Jul 09 '22 15:07 LeeLeahy2

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 02 '22 00:11 stale[bot]

Who is supporting the ESPAsyncWebServer?

LeeLeahy2 avatar Nov 02 '22 03:11 LeeLeahy2

Have you tried returning RESPONSE_TRY_AGAIN as the content length? In that case it should ask you again after a bit of time, hopefully with a bit more space in the buffer. That would probably require something else reducing its ram usage in the meantime, but it might work.

ToMe25 avatar May 24 '23 18:05 ToMe25

[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future.

stale[bot] avatar May 24 '23 18:05 stale[bot]