MySQL 9.0.0
Source Code Documentation
http::base Namespace Reference

Namespaces

namespace  details
 
namespace  impl
 
namespace  method
 
namespace  status_code
 

Classes

class  Connection
 
class  ConnectionInterface
 
class  ConnectionStatusCallbacks
 
class  Headers
 headers of a HTTP response/request. More...
 
class  IOBuffer
 
class  Request
 
class  RequestHandler
 
class  Uri
 

Enumerations

enum  Pending { k_pending_none = 0 , k_pending_closing = 1 << 1 , k_pending_reading = 1 << 2 , k_pending_writing = 1 << 3 }
 

Functions

HTTP_COMMON_EXPORT bool compare_case_insensitive (const std::string &l, const std::string_view &r)
 
HTTP_COMMON_EXPORT time_t time_from_rfc5322_fixdate (const char *date_buf)
 convert a Date: header into a time_t. More...
 
HTTP_COMMON_EXPORT int time_to_rfc5322_fixdate (time_t ts, char *date_buf, size_t date_buf_len)
 convert time_t into a Date: header value. More...
 
HTTP_COMMON_EXPORT std::string http_uri_path_canonicalize (const std::string &uri_path)
 canonicalize a URI path. More...
 
static time_t time_from_struct_tm_utc (struct tm *t_m)
 

Enumeration Type Documentation

◆ Pending

Enumerator
k_pending_none 
k_pending_closing 
k_pending_reading 
k_pending_writing 

Function Documentation

◆ compare_case_insensitive()

bool http::base::compare_case_insensitive ( const std::string &  l,
const std::string_view &  r 
)

◆ http_uri_path_canonicalize()

std::string http::base::http_uri_path_canonicalize ( const std::string &  uri_path)

canonicalize a URI path.

input output
/ /
/./ /
// /
/../ /
/a/../ /
/../a/ /a/
/../a /a

◆ time_from_rfc5322_fixdate()

time_t http::base::time_from_rfc5322_fixdate ( const char *  date_buf)

convert a Date: header into a time_t.

Returns
a time_t representation of Date: header value
Exceptions
std::out_of_rangeon invalid formats

◆ time_from_struct_tm_utc()

static time_t http::base::time_from_struct_tm_utc ( struct tm *  t_m)
static

◆ time_to_rfc5322_fixdate()

int http::base::time_to_rfc5322_fixdate ( time_t  ts,
char *  date_buf,
size_t  date_buf_len 
)

convert time_t into a Date: header value.

Parameters
tstime in binary format which should be converted
date_bufbuffer to store text date
date_buf_lensize of buffer
Returns
operation result
Return values
>0 number of characters written to buffer, excluding null character
<0 error occurred