1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-09-16 09:06:18 +02:00

Fix comment typos and clarify HEAD response behavior.

This commit is contained in:
David Steele
2019-07-17 15:42:37 -04:00
parent eee67db4d6
commit 7662d32e60
2 changed files with 3 additions and 3 deletions

View File

@@ -385,7 +385,7 @@ httpClientRequest(
HTTP_HEADER_CONTENT_LENGTH);
}
// Was content returned in the response?
// Was content returned in the response? HEAD will report content but not actually return any.
bool contentExists = this->contentChunked || (this->contentSize > 0 && !strEq(verb, HTTP_VERB_HEAD_STR));
this->contentEof = !contentExists;

View File

@@ -142,7 +142,7 @@ testHttpServer(void)
"Connection:ack\r\n"
"\r\n");
// Head request with no content-length but no content
// Head request with content-length but no content
harnessTlsServerExpect(
"HEAD / HTTP/1.1\r\n"
"\r\n");
@@ -463,7 +463,7 @@ testRun(void)
strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{connection: 'ack', key1: '0', key2: 'value2'}",
" check response headers");
// Head request with no content-length but no content
// Head request with content-length but no content
TEST_RESULT_VOID(
httpClientRequest(client, strNew("HEAD"), strNew("/"), NULL, httpHeaderNew(NULL), NULL, true),
"head request with content-length");