From 8c9df8c290f760b6a1f8a6a0acb6b4d9b8fa4056 Mon Sep 17 00:00:00 2001 From: Josh Soref Date: Mon, 26 Aug 2019 11:35:35 -0400 Subject: [PATCH] Fix typo in httpClientReponseHeader() function name. Contributed by Josh Soref. --- src/common/io/http/client.c | 2 +- src/common/io/http/client.h | 2 +- src/storage/s3/storage.c | 4 ++-- test/src/module/common/ioHttpTest.c | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/common/io/http/client.c b/src/common/io/http/client.c index 96c5c0c47..829004992 100644 --- a/src/common/io/http/client.c +++ b/src/common/io/http/client.c @@ -570,7 +570,7 @@ httpClientResponseCodeOk(const HttpClient *this) Get the response headers ***********************************************************************************************************************************/ const HttpHeader * -httpClientReponseHeader(const HttpClient *this) +httpClientResponseHeader(const HttpClient *this) { FUNCTION_TEST_BEGIN(); FUNCTION_TEST_PARAM(HTTP_CLIENT, this); diff --git a/src/common/io/http/client.h b/src/common/io/http/client.h index 118b5af75..30f8c443c 100644 --- a/src/common/io/http/client.h +++ b/src/common/io/http/client.h @@ -82,7 +82,7 @@ Getters bool httpClientBusy(const HttpClient *this); IoRead *httpClientIoRead(const HttpClient *this); unsigned int httpClientResponseCode(const HttpClient *this); -const HttpHeader *httpClientReponseHeader(const HttpClient *this); +const HttpHeader *httpClientResponseHeader(const HttpClient *this); const String *httpClientResponseMessage(const HttpClient *this); bool httpClientResponseCodeOk(const HttpClient *this); diff --git a/src/storage/s3/storage.c b/src/storage/s3/storage.c index ef7046f01..8ddcde5f3 100644 --- a/src/storage/s3/storage.c +++ b/src/storage/s3/storage.c @@ -352,7 +352,7 @@ storageS3Request( } // Output response headers - const HttpHeader *responseHeader = httpClientReponseHeader(httpClient); + const HttpHeader *responseHeader = httpClientResponseHeader(httpClient); const StringList *responseHeaderList = httpHeaderList(responseHeader); if (strLstSize(responseHeaderList) > 0) @@ -377,7 +377,7 @@ storageS3Request( { // On success move the buffer to the calling context result.httpClient = httpClient; - result.responseHeader = httpHeaderMove(httpHeaderDup(httpClientReponseHeader(httpClient), NULL), MEM_CONTEXT_OLD()); + result.responseHeader = httpHeaderMove(httpHeaderDup(httpClientResponseHeader(httpClient), NULL), MEM_CONTEXT_OLD()); result.response = bufMove(response, MEM_CONTEXT_OLD()); } diff --git a/test/src/module/common/ioHttpTest.c b/test/src/module/common/ioHttpTest.c index bc7330e3a..0acb61437 100644 --- a/test/src/module/common/ioHttpTest.c +++ b/test/src/module/common/ioHttpTest.c @@ -470,7 +470,7 @@ testRun(void) TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "OK", " check response message"); TEST_RESULT_UINT(httpClientEof(client), true, " io is eof"); TEST_RESULT_STR( - strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{connection: 'ack', key1: '0', key2: 'value2'}", + strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{connection: 'ack', key1: '0', key2: 'value2'}", " check response headers"); // Head request with content-length but no content @@ -482,7 +482,7 @@ testRun(void) TEST_RESULT_BOOL(httpClientEof(client), true, " io is eof"); TEST_RESULT_BOOL(httpClientBusy(client), false, " client is not busy"); TEST_RESULT_STR( - strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{content-length: '380'}", " check response headers"); + strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{content-length: '380'}", " check response headers"); // Head request with transfer encoding but no content TEST_RESULT_VOID( @@ -493,7 +493,7 @@ testRun(void) TEST_RESULT_BOOL(httpClientEof(client), true, " io is eof"); TEST_RESULT_BOOL(httpClientBusy(client), false, " client is not busy"); TEST_RESULT_STR( - strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{transfer-encoding: 'chunked'}", + strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{transfer-encoding: 'chunked'}", " check response headers"); // Error with content length 0 @@ -502,7 +502,7 @@ testRun(void) TEST_RESULT_UINT(httpClientResponseCode(client), 404, " check response code"); TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "Not Found", " check response message"); TEST_RESULT_STR( - strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{content-length: '0'}", " check response headers"); + strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{content-length: '0'}", " check response headers"); // Error with content Buffer *buffer = NULL; @@ -512,7 +512,7 @@ testRun(void) TEST_RESULT_UINT(httpClientResponseCode(client), 403, " check response code"); TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "Auth Error", " check response message"); TEST_RESULT_STR( - strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{content-length: '7'}", " check response headers"); + strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{content-length: '7'}", " check response headers"); TEST_RESULT_STR(strPtr(strNewBuf(buffer)), "CONTENT", " check response"); // Request with content using content-length @@ -526,7 +526,7 @@ testRun(void) BUFSTRDEF("012345678901234567890123456789"), true), "request with content length"); TEST_RESULT_STR( - strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{connection: 'close', content-length: '32'}", + strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{connection: 'close', content-length: '32'}", " check response headers"); TEST_RESULT_STR(strPtr(strNewBuf(buffer)), "01234567890123456789012345678901", " check response"); TEST_RESULT_UINT(httpClientRead(client, bufNew(1), true), 0, " call internal read to check eof"); @@ -551,7 +551,7 @@ testRun(void) TEST_RESULT_VOID( httpClientRequest(client, strNew("GET"), strNew("/"), NULL, NULL, NULL, false), "request with chunked encoding"); TEST_RESULT_STR( - strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{transfer-encoding: 'chunked'}", + strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{transfer-encoding: 'chunked'}", " check response headers"); buffer = bufNew(35);