mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
Fix typo in httpClientReponseHeader() function name.
Contributed by Josh Soref.
This commit is contained in:
parent
d1cc22f886
commit
8c9df8c290
@ -570,7 +570,7 @@ httpClientResponseCodeOk(const HttpClient *this)
|
|||||||
Get the response headers
|
Get the response headers
|
||||||
***********************************************************************************************************************************/
|
***********************************************************************************************************************************/
|
||||||
const HttpHeader *
|
const HttpHeader *
|
||||||
httpClientReponseHeader(const HttpClient *this)
|
httpClientResponseHeader(const HttpClient *this)
|
||||||
{
|
{
|
||||||
FUNCTION_TEST_BEGIN();
|
FUNCTION_TEST_BEGIN();
|
||||||
FUNCTION_TEST_PARAM(HTTP_CLIENT, this);
|
FUNCTION_TEST_PARAM(HTTP_CLIENT, this);
|
||||||
|
@ -82,7 +82,7 @@ Getters
|
|||||||
bool httpClientBusy(const HttpClient *this);
|
bool httpClientBusy(const HttpClient *this);
|
||||||
IoRead *httpClientIoRead(const HttpClient *this);
|
IoRead *httpClientIoRead(const HttpClient *this);
|
||||||
unsigned int httpClientResponseCode(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);
|
const String *httpClientResponseMessage(const HttpClient *this);
|
||||||
bool httpClientResponseCodeOk(const HttpClient *this);
|
bool httpClientResponseCodeOk(const HttpClient *this);
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ storageS3Request(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Output response headers
|
// Output response headers
|
||||||
const HttpHeader *responseHeader = httpClientReponseHeader(httpClient);
|
const HttpHeader *responseHeader = httpClientResponseHeader(httpClient);
|
||||||
const StringList *responseHeaderList = httpHeaderList(responseHeader);
|
const StringList *responseHeaderList = httpHeaderList(responseHeader);
|
||||||
|
|
||||||
if (strLstSize(responseHeaderList) > 0)
|
if (strLstSize(responseHeaderList) > 0)
|
||||||
@ -377,7 +377,7 @@ storageS3Request(
|
|||||||
{
|
{
|
||||||
// On success move the buffer to the calling context
|
// On success move the buffer to the calling context
|
||||||
result.httpClient = httpClient;
|
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());
|
result.response = bufMove(response, MEM_CONTEXT_OLD());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -470,7 +470,7 @@ testRun(void)
|
|||||||
TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "OK", " check response message");
|
TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "OK", " check response message");
|
||||||
TEST_RESULT_UINT(httpClientEof(client), true, " io is eof");
|
TEST_RESULT_UINT(httpClientEof(client), true, " io is eof");
|
||||||
TEST_RESULT_STR(
|
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");
|
" check response headers");
|
||||||
|
|
||||||
// Head request with content-length but no content
|
// 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(httpClientEof(client), true, " io is eof");
|
||||||
TEST_RESULT_BOOL(httpClientBusy(client), false, " client is not busy");
|
TEST_RESULT_BOOL(httpClientBusy(client), false, " client is not busy");
|
||||||
TEST_RESULT_STR(
|
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
|
// Head request with transfer encoding but no content
|
||||||
TEST_RESULT_VOID(
|
TEST_RESULT_VOID(
|
||||||
@ -493,7 +493,7 @@ testRun(void)
|
|||||||
TEST_RESULT_BOOL(httpClientEof(client), true, " io is eof");
|
TEST_RESULT_BOOL(httpClientEof(client), true, " io is eof");
|
||||||
TEST_RESULT_BOOL(httpClientBusy(client), false, " client is not busy");
|
TEST_RESULT_BOOL(httpClientBusy(client), false, " client is not busy");
|
||||||
TEST_RESULT_STR(
|
TEST_RESULT_STR(
|
||||||
strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{transfer-encoding: 'chunked'}",
|
strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{transfer-encoding: 'chunked'}",
|
||||||
" check response headers");
|
" check response headers");
|
||||||
|
|
||||||
// Error with content length 0
|
// Error with content length 0
|
||||||
@ -502,7 +502,7 @@ testRun(void)
|
|||||||
TEST_RESULT_UINT(httpClientResponseCode(client), 404, " check response code");
|
TEST_RESULT_UINT(httpClientResponseCode(client), 404, " check response code");
|
||||||
TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "Not Found", " check response message");
|
TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "Not Found", " check response message");
|
||||||
TEST_RESULT_STR(
|
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
|
// Error with content
|
||||||
Buffer *buffer = NULL;
|
Buffer *buffer = NULL;
|
||||||
@ -512,7 +512,7 @@ testRun(void)
|
|||||||
TEST_RESULT_UINT(httpClientResponseCode(client), 403, " check response code");
|
TEST_RESULT_UINT(httpClientResponseCode(client), 403, " check response code");
|
||||||
TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "Auth Error", " check response message");
|
TEST_RESULT_STR(strPtr(httpClientResponseMessage(client)), "Auth Error", " check response message");
|
||||||
TEST_RESULT_STR(
|
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");
|
TEST_RESULT_STR(strPtr(strNewBuf(buffer)), "CONTENT", " check response");
|
||||||
|
|
||||||
// Request with content using content-length
|
// Request with content using content-length
|
||||||
@ -526,7 +526,7 @@ testRun(void)
|
|||||||
BUFSTRDEF("012345678901234567890123456789"), true),
|
BUFSTRDEF("012345678901234567890123456789"), true),
|
||||||
"request with content length");
|
"request with content length");
|
||||||
TEST_RESULT_STR(
|
TEST_RESULT_STR(
|
||||||
strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{connection: 'close', content-length: '32'}",
|
strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{connection: 'close', content-length: '32'}",
|
||||||
" check response headers");
|
" check response headers");
|
||||||
TEST_RESULT_STR(strPtr(strNewBuf(buffer)), "01234567890123456789012345678901", " check response");
|
TEST_RESULT_STR(strPtr(strNewBuf(buffer)), "01234567890123456789012345678901", " check response");
|
||||||
TEST_RESULT_UINT(httpClientRead(client, bufNew(1), true), 0, " call internal read to check eof");
|
TEST_RESULT_UINT(httpClientRead(client, bufNew(1), true), 0, " call internal read to check eof");
|
||||||
@ -551,7 +551,7 @@ testRun(void)
|
|||||||
TEST_RESULT_VOID(
|
TEST_RESULT_VOID(
|
||||||
httpClientRequest(client, strNew("GET"), strNew("/"), NULL, NULL, NULL, false), "request with chunked encoding");
|
httpClientRequest(client, strNew("GET"), strNew("/"), NULL, NULL, NULL, false), "request with chunked encoding");
|
||||||
TEST_RESULT_STR(
|
TEST_RESULT_STR(
|
||||||
strPtr(httpHeaderToLog(httpClientReponseHeader(client))), "{transfer-encoding: 'chunked'}",
|
strPtr(httpHeaderToLog(httpClientResponseHeader(client))), "{transfer-encoding: 'chunked'}",
|
||||||
" check response headers");
|
" check response headers");
|
||||||
|
|
||||||
buffer = bufNew(35);
|
buffer = bufNew(35);
|
||||||
|
Loading…
Reference in New Issue
Block a user