Skip to content

Commit

Permalink
Update libraries/WebServer/src/Parsing.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Saavedra Vaz <[email protected]>
  • Loading branch information
socram8888 and lucasssvaz authored Dec 13, 2024
1 parent 784ef0f commit c562aec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libraries/WebServer/src/Parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,8 @@ bool WebServer::_parseRequest(NetworkClient &client) {
_currentHandler->raw(*this, _currentUri, *_currentRaw);
_currentRaw->status = RAW_WRITE;

while (1) {
while (_currentRaw->totalSize < _clientContentLength) {
size_t read_len = std::min(_clientContentLength - _currentRaw->totalSize, (size_t) HTTP_RAW_BUFLEN);
if (read_len == 0) {
break;
}
_currentRaw->currentSize = client.readBytes(_currentRaw->buf, read_len);
_currentRaw->totalSize += _currentRaw->currentSize;
if (_currentRaw->currentSize == 0) {
Expand Down

0 comments on commit c562aec

Please sign in to comment.