8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 740fc0b + 8b77d91 commit 64b62dcCopy full SHA for 64b62dc
libraries/WebServer/src/Parsing.cpp
@@ -187,7 +187,8 @@ bool WebServer::_parseRequest(NetworkClient &client) {
187
_currentRaw->status = RAW_WRITE;
188
189
while (_currentRaw->totalSize < _clientContentLength) {
190
- _currentRaw->currentSize = client.readBytes(_currentRaw->buf, HTTP_RAW_BUFLEN);
+ size_t read_len = std::min(_clientContentLength - _currentRaw->totalSize, (size_t)HTTP_RAW_BUFLEN);
191
+ _currentRaw->currentSize = client.readBytes(_currentRaw->buf, read_len);
192
_currentRaw->totalSize += _currentRaw->currentSize;
193
if (_currentRaw->currentSize == 0) {
194
_currentRaw->status = RAW_ABORTED;
0 commit comments