From 7662d32e6020148d822fd5080f2a5ebda7ebe103 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 17 Jul 2019 15:42:37 -0400 Subject: [PATCH] Fix comment typos and clarify HEAD response behavior. --- src/common/io/http/client.c | 2 +- test/src/module/common/ioHttpTest.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/io/http/client.c b/src/common/io/http/client.c index 953c6fe0f..6e967e005 100644 --- a/src/common/io/http/client.c +++ b/src/common/io/http/client.c @@ -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; diff --git a/test/src/module/common/ioHttpTest.c b/test/src/module/common/ioHttpTest.c index 2cdb7b21a..c62dce776 100644 --- a/test/src/module/common/ioHttpTest.c +++ b/test/src/module/common/ioHttpTest.c @@ -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");