1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-06-20 01:17:49 +02:00

Clarify zero-size chunk comment in HTTP response parsing.

The previous "still zero" wording leaned on the reader tracking that contentRemaining was zero on entry and remained zero after parsing the next chunk size. State the actual meaning instead: a zero-size chunk terminates the response.
This commit is contained in:
David Steele
2026-06-14 10:14:19 +07:00
parent e166a33f48
commit dde263d699
+1 -1
View File
@@ -145,7 +145,7 @@ httpResponseRead(THIS_VOID, Buffer *const buffer, const bool block)
// Read length of next chunk // Read length of next chunk
this->contentRemaining = cvtZToUInt64Base(strZ(strTrim(ioReadLine(rawRead))), 16); this->contentRemaining = cvtZToUInt64Base(strZ(strTrim(ioReadLine(rawRead))), 16);
// If content remaining is still zero then eof // A zero-size chunk terminates the response
if (this->contentRemaining == 0) if (this->contentRemaining == 0)
this->contentEof = true; this->contentEof = true;
} }