Skip to content

Commit c10bf7e

Browse files
Improve comments for remainingBodyLength() to cover all states
Co-authored-by: uNetworkingAB <110806833+uNetworkingAB@users.noreply.github.com>
1 parent 17888d4 commit c10bf7e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/HttpParser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ struct HttpParser {
615615
}
616616

617617
public:
618-
/* Returns the remaining body length if set via content-length, or UINT64_MAX if transfer-encoding is chunked */
618+
/* Returns the remaining body length if set via content-length, UINT64_MAX if transfer-encoding is chunked, or 0 if no body */
619619
uint64_t remainingBodyLength() {
620620
if (isParsingChunkedEncoding(remainingStreamingBytes)) {
621621
return UINT64_MAX;

src/HttpResponse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ struct HttpResponse : public AsyncSocket<SSL> {
488488
return httpResponseData->offset;
489489
}
490490

491-
/* Get the remaining body length, or UINT64_MAX if transfer-encoding is chunked */
491+
/* Get the remaining body length if set via content-length, UINT64_MAX if transfer-encoding is chunked, or 0 if no body */
492492
uint64_t remainingBodyLength() {
493493
HttpResponseData<SSL> *httpResponseData = getHttpResponseData();
494494

0 commit comments

Comments
 (0)