mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-06-20 01:17:49 +02:00
Rename http/Http to HTTP in comments and messages.
HTTP is an acronym so it should be capitalized. Coding conventions dictate otherwise for function and type names but that should not have been propagated to comments and messages.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Client Cache
|
||||
HTTP Client Cache
|
||||
***********************************************************************************************************************************/
|
||||
#include "build.auto.h"
|
||||
|
||||
@@ -23,7 +23,7 @@ struct HttpClientCache
|
||||
const String *caFile;
|
||||
const String *caPath;
|
||||
|
||||
List *clientList; // List of http clients
|
||||
List *clientList; // List of HTTP clients
|
||||
};
|
||||
|
||||
OBJECT_DEFINE_FREE(HTTP_CLIENT_CACHE);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Client Cache
|
||||
HTTP Client Cache
|
||||
|
||||
Cache http clients and return one that is not busy on request.
|
||||
Cache HTTP clients and return one that is not busy on request.
|
||||
***********************************************************************************************************************************/
|
||||
#ifndef COMMON_IO_HTTP_CLIENT_CACHE_H
|
||||
#define COMMON_IO_HTTP_CLIENT_CACHE_H
|
||||
@@ -25,7 +25,7 @@ HttpClientCache *httpClientCacheNew(
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
// Get an http client from the cache
|
||||
// Get an HTTP client from the cache
|
||||
HttpClient *httpClientCacheGet(HttpClientCache *this);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Client
|
||||
HTTP Client
|
||||
***********************************************************************************************************************************/
|
||||
#include "build.auto.h"
|
||||
|
||||
@@ -324,17 +324,17 @@ httpClientRequest(
|
||||
|
||||
// Check status ends with a CR and remove it to make error formatting easier and more accurate
|
||||
if (!strEndsWith(status, CR_STR))
|
||||
THROW_FMT(FormatError, "http response status '%s' should be CR-terminated", strPtr(status));
|
||||
THROW_FMT(FormatError, "HTTP response status '%s' should be CR-terminated", strPtr(status));
|
||||
|
||||
status = strSubN(status, 0, strSize(status) - 1);
|
||||
|
||||
// Check status is at least the minimum required length to avoid harder to interpret errors later on
|
||||
if (strSize(status) < sizeof(HTTP_VERSION) + 4)
|
||||
THROW_FMT(FormatError, "http response '%s' has invalid length", strPtr(strTrim(status)));
|
||||
THROW_FMT(FormatError, "HTTP response '%s' has invalid length", strPtr(strTrim(status)));
|
||||
|
||||
// Check status starts with the correct http version
|
||||
if (!strBeginsWith(status, HTTP_VERSION_STR))
|
||||
THROW_FMT(FormatError, "http version of response '%s' must be " HTTP_VERSION, strPtr(status));
|
||||
THROW_FMT(FormatError, "HTTP version of response '%s' must be " HTTP_VERSION, strPtr(status));
|
||||
|
||||
// Read status code
|
||||
status = strSub(status, sizeof(HTTP_VERSION));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Client
|
||||
HTTP Client
|
||||
|
||||
A robust HTTP client with connection reuse and automatic retries.
|
||||
|
||||
@@ -76,7 +76,7 @@ HttpClient *httpClientNew(
|
||||
/***********************************************************************************************************************************
|
||||
Functions
|
||||
***********************************************************************************************************************************/
|
||||
// Is the http object busy?
|
||||
// Is the HTTP object busy?
|
||||
bool httpClientBusy(const HttpClient *this);
|
||||
|
||||
// Mark the client as done if read is complete
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Common
|
||||
HTTP Common
|
||||
***********************************************************************************************************************************/
|
||||
#include "build.auto.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Common
|
||||
|
||||
Http common functions.
|
||||
HTTP Common
|
||||
***********************************************************************************************************************************/
|
||||
#ifndef COMMON_IO_HTTP_COMMON_H
|
||||
#define COMMON_IO_HTTP_COMMON_H
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Header
|
||||
HTTP Header
|
||||
***********************************************************************************************************************************/
|
||||
#include "build.auto.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Header
|
||||
HTTP Header
|
||||
|
||||
Object to track HTTP headers. Headers can be marked as redacted so they are not logged.
|
||||
***********************************************************************************************************************************/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Query
|
||||
HTTP Query
|
||||
***********************************************************************************************************************************/
|
||||
#include "build.auto.h"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***********************************************************************************************************************************
|
||||
Http Query
|
||||
HTTP Query
|
||||
|
||||
Object to track HTTP queries and output them with proper escaping.
|
||||
***********************************************************************************************************************************/
|
||||
@@ -39,7 +39,7 @@ HttpQuery *httpQueryMove(HttpQuery *this, MemContext *parentNew);
|
||||
//Put a query item
|
||||
HttpQuery *httpQueryPut(HttpQuery *this, const String *header, const String *value);
|
||||
|
||||
// Render the query for inclusion in an http request
|
||||
// Render the query for inclusion in an HTTP request
|
||||
String *httpQueryRender(const HttpQuery *this);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct StorageReadS3
|
||||
StorageReadInterface interface; // Interface
|
||||
StorageS3 *storage; // Storage that created this object
|
||||
|
||||
HttpClient *httpClient; // Http client for requests
|
||||
HttpClient *httpClient; // HTTP client for requests
|
||||
} StorageReadS3;
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
@@ -39,7 +39,7 @@ Macros for function logging
|
||||
objToLog(value, "StorageReadS3", buffer, bufferSize)
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Mark http client as done so it can be reused
|
||||
Mark HTTP client as done so it can be reused
|
||||
***********************************************************************************************************************************/
|
||||
OBJECT_DEFINE_FREE_RESOURCE_BEGIN(STORAGE_READ_S3, LOG, logLevelTrace)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ Storage type
|
||||
STRING_EXTERN(STORAGE_S3_TYPE_STR, STORAGE_S3_TYPE);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
S3 http headers
|
||||
S3 HTTP headers
|
||||
***********************************************************************************************************************************/
|
||||
STRING_STATIC(S3_HEADER_CONTENT_SHA256_STR, "x-amz-content-sha256");
|
||||
STRING_STATIC(S3_HEADER_DATE_STR, "x-amz-date");
|
||||
@@ -86,7 +86,7 @@ struct StorageS3
|
||||
{
|
||||
STORAGE_COMMON_MEMBER;
|
||||
MemContext *memContext;
|
||||
HttpClientCache *httpClientCache; // Http client cache to service requests
|
||||
HttpClientCache *httpClientCache; // HTTP client cache to service requests
|
||||
StringList *headerRedactList; // List of headers to redact from logging
|
||||
|
||||
const String *bucket; // Bucket to store data in
|
||||
@@ -288,7 +288,7 @@ storageS3Request(
|
||||
this, verb, httpUriEncode(uri, true), query, storageS3DateTime(time(NULL)), requestHeader,
|
||||
body == NULL || bufUsed(body) == 0 ? HASH_TYPE_SHA256_ZERO_STR : bufHex(cryptoHashOne(HASH_TYPE_SHA256_STR, body)));
|
||||
|
||||
// Get an http client
|
||||
// Get an HTTP client
|
||||
HttpClient *httpClient = httpClientCacheGet(this->httpClientCache);
|
||||
|
||||
// Process request
|
||||
@@ -904,7 +904,7 @@ storageS3New(
|
||||
.signingKeyDate = YYYYMMDD_STR,
|
||||
};
|
||||
|
||||
// Create the http client cache used to service requests
|
||||
// Create the HTTP client cache used to service requests
|
||||
driver->httpClientCache = httpClientCacheNew(
|
||||
host == NULL ? driver->bucketEndpoint : host, driver->port, timeout, verifyPeer, caFile, caPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user