mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
post body might not be sent with the headers
since optimistic_yield() was implemented, at this point we might not have the body yet, so we should give it a chance to be sent and put in the buffer
This commit is contained in:
parent
1031e26cf0
commit
1c3225f387
@ -108,6 +108,10 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
|
||||
|
||||
if (!isForm){
|
||||
if (searchStr != "") searchStr += '&';
|
||||
//some clients send headers first and data after (like we do)
|
||||
//give them a chance
|
||||
int tries = 100;//100ms max wait
|
||||
while(!client.available() && tries--)delay(1);
|
||||
size_t plainLen = client.available();
|
||||
char *plainBuf = (char*)malloc(plainLen+1);
|
||||
client.readBytes(plainBuf, plainLen);
|
||||
|
Loading…
x
Reference in New Issue
Block a user