You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm observing in my use case that the initial call to 'recv' in function 'do_respond' in httpd.c in some cases does not return all bytes of the incoming message. This is usual behavior for sockets and a loop is usually applied to continue receiving until all data has arrived.
The ensuing code apparently assumes that a full request is received in the single call to 'recv'.
If this is not the case - as happens in my use case - the solution will somehow involve looking at the 'Content-Length' of the request receive data continuously until all data has arrived.
I'm raising this issue to get feedback if there is something I have completely misunderstood? I'm worried that I have misunderstood something basic, since this must be an issue that 'everyone' will encounter if the PICO server is used beyond small examples.
If it is indeed an issue, then there is an option here to get the solution I'll be making back into the repo if this is valuable in general?
The text was updated successfully, but these errors were encountered:
I'm observing in my use case that the initial call to 'recv' in function 'do_respond' in httpd.c in some cases does not return all bytes of the incoming message. This is usual behavior for sockets and a loop is usually applied to continue receiving until all data has arrived.
The ensuing code apparently assumes that a full request is received in the single call to 'recv'.
If this is not the case - as happens in my use case - the solution will somehow involve looking at the 'Content-Length' of the request receive data continuously until all data has arrived.
I'm raising this issue to get feedback if there is something I have completely misunderstood? I'm worried that I have misunderstood something basic, since this must be an issue that 'everyone' will encounter if the PICO server is used beyond small examples.
If it is indeed an issue, then there is an option here to get the solution I'll be making back into the repo if this is valuable in general?
The text was updated successfully, but these errors were encountered: