Skip to content

Commit 5051f80

Browse files
committed
Correctly support form POST with text/plain content type
Fixes #279
1 parent c5b8b2c commit 5051f80

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/WebRequest.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,10 @@ void AsyncWebServerRequest::_onData(void *buf, size_t len) {
185185
_isPlainPost = true;
186186
} else if (_contentType == T_text_plain && __is_param_char(((char *)buf)[0])) {
187187
size_t i = 0;
188-
while (i < len && __is_param_char(((char *)buf)[i++]));
188+
char ch;
189+
do {
190+
ch = ((char *)buf)[i];
191+
} while (i++ < len && __is_param_char(ch));
189192
if (i < len && ((char *)buf)[i - 1] == '=') {
190193
_isPlainPost = true;
191194
}

0 commit comments

Comments
 (0)