Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
Fix RFC 7230 violation
Browse files Browse the repository at this point in the history
See nodejs/node#47528 for more details
See me-no-dev/ESPAsyncWebServer#1301 for original PR from @zalupoi
  • Loading branch information
zalupoi authored and mathieucarbou committed Sep 3, 2024
1 parent 0f71c51 commit 9c0fb7a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/WebResponses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,7 @@ size_t AsyncAbstractResponse::_ack(AsyncWebServerRequest* request, size_t len, u
free(buf);
return 0;
}
outLen = sprintf_P((char*)buf + headLen, PSTR("%x"), readLen) + headLen;
while (outLen < headLen + 4)
buf[outLen++] = ' ';
outLen = sprintf((char*)buf+headLen, "%04x", readLen) + headLen;
buf[outLen++] = '\r';
buf[outLen++] = '\n';
outLen += readLen;
Expand Down

0 comments on commit 9c0fb7a

Please sign in to comment.