mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
lets make it possible to parse multiline plain post
This commit is contained in:
parent
f7212154a6
commit
cca89efbd2
@ -109,12 +109,19 @@ bool ESP8266WebServer::_parseRequest(WiFiClient& client) {
|
||||
if (!isForm){
|
||||
if (searchStr != "") searchStr += '&';
|
||||
String bodyLine = client.readStringUntil('\r');
|
||||
#ifdef DEBUG
|
||||
DEBUG_OUTPUT.print("Plain: ");
|
||||
DEBUG_OUTPUT.println(bodyLine);
|
||||
#endif
|
||||
if(bodyLine.startsWith("{") || bodyLine.startsWith("[") || bodyLine.indexOf('=') == -1){
|
||||
//plain post json or other data
|
||||
searchStr += "plain=";
|
||||
searchStr += bodyLine;
|
||||
searchStr += client.readString();
|
||||
} else {
|
||||
searchStr += bodyLine;
|
||||
client.readStringUntil('\n');
|
||||
}
|
||||
searchStr += bodyLine;
|
||||
client.readStringUntil('\n');
|
||||
}
|
||||
_parseArguments(searchStr);
|
||||
if (isForm){
|
||||
|
Loading…
x
Reference in New Issue
Block a user