Orbit Framework 2.0.0
A high-performance asynchronous C++20 HTTP server framework.
Loading...
Searching...
No Matches
orbit::middleware::detail Namespace Reference

Classes

class  ChunkedDecoder
 Incremental decoder for a chunked upstream response body. More...
 
struct  ProxiedRequest
 An owned copy of the parts of a request the proxy forwards. The original HttpRequest, and the connection buffer its headers point into, are gone long before the asynchronous upstream connect completes. More...
 

Functions

std::string url_encode (const std::string &value)
 application/x-www-form-urlencoded / URI component encoding (RFC 3986 unreserved kept).
 
std::string url_decode (const std::string &value)
 Decodes XX escapes and '+' as space.
 
std::string pkce_challenge (const std::string &verifier)
 RFC 7636 S256: base64url(SHA-256(verifier)) without padding.
 
ProxiedRequest snapshot_request (const http::HttpRequest &request)
 
std::string build_upstream_request (const ProxiedRequest &request, const std::string &host, int port, const std::string &strip_prefix, bool trust_forwarded_headers)
 Serializes the request sent upstream. Hop-by-hop headers are dropped case-insensitively, Host and Content-Length are set by the proxy, and client-supplied forwarding headers are replaced unless trust_forwarded_headers is true, in which case they are extended.
 

Function Documentation

◆ build_upstream_request()

std::string orbit::middleware::detail::build_upstream_request ( const ProxiedRequest &  request,
const std::string &  host,
int  port,
const std::string &  strip_prefix,
bool  trust_forwarded_headers 
)

Serializes the request sent upstream. Hop-by-hop headers are dropped case-insensitively, Host and Content-Length are set by the proxy, and client-supplied forwarding headers are replaced unless trust_forwarded_headers is true, in which case they are extended.

◆ pkce_challenge()

std::string orbit::middleware::detail::pkce_challenge ( const std::string &  verifier)
private

RFC 7636 S256: base64url(SHA-256(verifier)) without padding.

◆ snapshot_request()

ProxiedRequest orbit::middleware::detail::snapshot_request ( const http::HttpRequest &  request)

◆ url_decode()

std::string orbit::middleware::detail::url_decode ( const std::string &  value)
private

Decodes XX escapes and '+' as space.

◆ url_encode()

std::string orbit::middleware::detail::url_encode ( const std::string &  value)
private

application/x-www-form-urlencoded / URI component encoding (RFC 3986 unreserved kept).