What it does
- Synchronous client with a connection pool, and an asynchronous one on the event loop
- Server-Sent Events
- GET, POST and the other methods, gzip and deflate responses, plain HTTP when asked
- Chain, dates and name always checked, with no unverified mode
- Optional SPKI pin, checked before the request goes out
- System roots, private CA or pinned certificate
- Responses per RFC 9112: chunked, Content-Length, 1xx
- Header and body size caps, connect and read timeouts
Measured
- 106 cross-checks against an in-house TLS 1.3 server, with the request checked byte for byte
- 24 interoperability cases against a Python HTTPS server (OpenSSL 3.5) and <code>openssl s_server</code>
- 1,000 concurrent asynchronous requests over at most 32 connections
- Zero allocation after warm-up, synchronous and asynchronous
- Three requests to the same host over a single TLS handshake
Known limits
- HTTP/1.1 only: no HTTP/2, redirects, proxy, cookies or WebSocket
- No client certificate (mTLS). The <code>tls</code> limits apply here
- Name resolution blocks and has no deadline of its own
- The C layer exposes only the older <code>CWeb</code> client: GET and POST over HTTPS
The module has two HTTP clients:
- **The
Ethereal::Httpclient** (http_*.hpp): part of the core and always built, with no CMake option. HTTP/1.1 over plain TCP or TLS 1.3, any method and any header, gzip and deflate in the response, a keep-alive pool, four time limits, cancellation, a synchronous and an asynchronous client, and a parser for Server-Sent Events. New code should use this one. - **
Ethereal::Web::CWeb** (web-*.hpp): the older HTTPS client, optional, behindETHEREAL_BUILD_HTTP. It is described at the end of this page.
The two share only the folder: different headers, namespaces and result codes.
---
The Ethereal::Http client
The client writes the request, reads the response as it arrives and hands the head and each piece of the body to a handler. TLS is the library's own tls module and gzip and deflate come from the compression module: nothing else to link. Include http_inc.hpp, which brings in the five http_*.hpp headers (not web-inc.hpp, which is the older client's).
#include <ethereal/cpp/http/http_inc.hpp>
namespace Http = Ethereal::Http;
static bool OnData( void * pUser, std::string_view Data )
{
static_cast< std::string * >( pUser )->append( Data );
return true; // false stops the request
}
Http::CClient Client; // holds the pool: keep it and reuse it
const Http::SHeader aHeaders[] = { { "Content-Type", "application/json" } };
const std::string_view sJson = "{\"user\":\"ana\"}";
Http::SRequest Request;
Request.sMethod = "POST";
Request.sUrl = "https://api.example.com/v1/login";
Request.Headers = aHeaders;
Request.Body = { sJson.data(), sJson.size() };
std::string sBody;
Http::SResponseHandler Handler;
Handler.pUser = &sBody;
Handler.pfnData = &OnData;
Http::SResult Result;
if( Client.Send( Request, Handler, Result ) != Http::EStatus::eOk )
printf( "%s: %s\n", Http::StatusName( Result.eStatus ), Result.pErrorText );
else
printf( "%u %s\n", Result.uHttpStatus, sBody.c_str() );The request
- URL. Absolute
http://orhttps://(ParseUrl), port 80 or 443 when absent, an IPv6 literal in brackets, the fragment dropped. Another scheme iseUnsupported. A URL with user information (user@host) is refused, because credentials in a URL end up in logs, and so is a query with no path (http://host?x). - Method and headers are free.
Host,Content-LengthandTransfer-Encodingare written by the client and refused inHeaders. Every byte is checked before connecting: a CR or LF in a value (header injection), another control byte or DEL iseInvalidArgument, and nothing connects. - Body.
Bodygoes withContent-Length. POST, PUT and PATCH without a body sendContent-Length: 0, the other methods send none. For a chunked body,pfnBodySourceis called until it setsbEnd.BodyandpfnBodySourcetogether are refused. Accept-Encoding: gzip, deflategoes out unlessHeadershas one (bAcceptCompressed), and the response is decoded (bDecode). AConnection: closeinHeaderskeeps the connection out of the pool. Over TLS, ALPN offershttp/1.1.Fetchwrites the body into the caller's buffer instead of a handler. When it does not fit, the result iseBufferTooSmall, the connection is closed, anduBodySizeis what fit.
The result
Send returns the status it puts in SResult::eStatus. **eOk means a complete response arrived, whatever its status code**: a 404 or a 500 is eOk with uHttpStatus, and what to do with it (retry, wait for retry-after) is up to the caller. pfnHead receives the CResponseReader with the status and the headers before the body.
EStatus | When |
|---|---|
eOk | the response arrived in full |
eInvalidArgument | a bad URL, method or header, refused before connecting |
eOutOfMemory, eNotLicensed | the allocator returned null, or no license was accepted and the evaluation ended |
eBufferTooSmall | the body did not fit (Fetch), or the buffer given to a writer is short |
eLimitExceeded | the response passed one of the SLimits |
eMalformed | the response breaks the protocol (status line, header, chunk size, gzip stream) |
eTruncated | the connection closed before the response ended |
eUnsupported | another scheme, a transfer coding other than chunked, a content coding the reader does not decode, a 101 |
eInvalidState | a call out of order (a reader fed without Begin or after eDone, a Start on a closing client) |
eResolveFailed, eConnectFailed, eIoError | the name did not resolve, no address accepted TCP, or the connection failed after it was established (SResult::Net) |
eTlsFailed | certificate, pin, alert or protocol (SResult::Tls) |
eTimedOut | a time limit ran out: SResult::eTimeout says which, TimeoutName names it |
eCancelled | the token was raised, Cancel was called, or a handler returned false |
SResult also has uBodyBytes (after decoding), bReused, bRetried, pErrorText (English, for a log, never null) and three times in nanoseconds from the call: uConnectNs (zero on a pooled connection), uFirstByteNs and uTotalNs.
Time limits and cancellation
STimeouts | Default | Counts |
|---|---|---|
uConnectMs | 30,000 ms | waiting for a free connection of the pool, the name lookup, TCP and the TLS handshake |
uFirstByteMs | 0 | from the end of the request to the first byte of the response |
uIdleMs | 0 | between two pieces of the response, restarted by each read that brings bytes |
uTotalMs | 0 | the whole request, from the call to the end of the response |
Zero is no limit. Only the connection has one by default, because a server such as a language model can take minutes before the first byte. Set the others for what you call.
CCancelToken::Cancel stops a request from any thread. The request sees it within SClientOptions::uWakeMs (20 ms), closes its connection and returns eCancelled. One token can serve several requests, and Reset lowers it. The name is resolved with getaddrinfo, which blocks and has no time limit of its own: CClient checks the connection limit and the token when it returns, and CAsyncClient runs it on a thread of the client with the connection limit applying.
Connections and the pool
- The pool key is scheme, host (without case) and port.
uMaxConnectionsPerHost(default 6) counts the connections in use and the idle ones, and a request that finds them all busy waits within its connection limit. An idle connection staysuMaxIdleMs(default 30,000 ms, zero keeps none). - A connection goes back to the pool when its response ended and both sides allow another request (
CResponseReader::KeepAlive). An idle connection the server closed is noticed before it is used. - A request whose pooled connection closes before any byte of the response is sent again once, on a new connection: always for GET, HEAD, PUT, DELETE, OPTIONS and TRACE, for POST and PATCH only with
bRetryNonIdempotent(RFC 9110, section 9.2.2), never with a body source. CloseIdle,IdleCount,OpenCountandStats(SClientStats, withuTlsHandshakes,uReusedanduStaleRetriesamong the counters) show the pool.- Happy Eyeballs (RFC 8305). For a name with IPv6 and IPv4 addresses, the families alternate, the next attempt starts
uAttemptDelayMs(250 ms) later or at once when one fails, up to 16 addresses, and the first to connect wins. TLS runs only on the winner. Measured withlocalhostand a server on IPv4 only: 277 ms on Windows (::1first, IPv4 250 ms later and winning), 3 ms on Linux.
HTTPS
- TLS 1.3 only, from the [
tlsmodule](tls.md), with no client certificate option. A server that speaks only TLS 1.2 fails witheTlsFailed.pTrustStorenull uses the roots of the operating system, loaded on the first https request. ATls::CTrustStoregiven there must outlive the client. eVerifyisTls::eVerifyChainby default: chain, dates and host name.bUsePinwithaPinSha256(SHA-256 of the DER SubjectPublicKeyInfo of the leaf) adds a pin.Tls::eVerifyPinOnlyis for a self-signed server whose key is known in advance.- A body delimited by the close, over a TLS connection that closes without close_notify, is
eTruncated: someone in the path may have cut it.CWebaccepts that case.
The asynchronous client
CAsyncClient takes the same SRequest, STimeouts, SClientOptions and SResult, with the same pool and Happy Eyeballs, without a thread per request. It owns a Network::CEventLoop and runs it on one thread: its own (the default), or the caller's through Run( uTimeoutMs ) when built with bOwnThread false.
Start( Request, Handler, Timeouts, &Id )returns at once. It writes the head and copies the body, so the request can go away.eOkmeansSAsyncHandler::pfnDonecomes exactly once, and any other status means no callback comes. A body source is called on the loop thread.- Every callback runs on the loop thread, one at a time, and must not block. Callbacks may call
StartandCancel.Cancel( Id )is safe from any thread and does nothing once the request ended. ScheduleandUnschedulerun a function on the loop thread after a delay (a retry, a rate limit pause). When the client closes, the functions still scheduled run at once so their owners can clean up. A timer of the client also closes expired idle connections.- The destructor ends the requests still running (
pfnDonewitheCancelled), closes the connections and joins the threads. It must not run from inside a callback. - Measured: 1000 requests at once from 4 threads, limited to 32 connections, took 41 ms (MSVC, Release), with exactly 32 connections opened.
The messages without the network (for your own transport)
- **
WriteRequestHead** writes anSRequestHeadinto the caller's buffer. An empty buffer measures, a short one giveseBufferTooSmallwith the exact size, and a refused byte writes nothing. A chunked body isWriteChunkHeader, the data andkChunkEndper chunk, thenkLastChunk. - **
CResponseReader** is a pull reader. AfterBegin( bHeadRequest ), eachNext( In, uConsumed, Event, bEof )returnsEEvent::eNeedMore,eHeaders,eData(a decoded piece inSEvent::Data) oreDone, with the same result for any slicing of the same bytes. The head is copied into the reader, and a body without coding is a view into the input. A failure is sticky untilBegin(Status,ErrorText,ErrorOffset).
The reader follows RFC 9112: no body for HEAD, 204 and 304, then chunked over Content-Length, then until the close. A lone LF ends a line, obs-fold becomes spaces, 1xx responses are skipped, 101 is eUnsupported and trailers are discarded. gzip, x-gzip and deflate (zlib or raw) are decoded. Other codings are eUnsupported, or pass as they are with SetDecode( false ) (ECoding::eOther). The limits are SClientOptions::Limits for the clients and SetLimits for the reader:
SLimits | Default |
|---|---|
uMaxLineBytes | 8 KiB per line |
uMaxHeaderBytes | 64 KiB for the header section (and, apart, the trailers) |
uMaxHeaders | 100 fields |
uMaxBodyBytes | 64 MiB, counted after decoding (0 is no limit) |
uMaxExpansionRatio | 1024, decoded over compressed, against decompression bombs (0 is no limit) |
uMaxInterim | 16 interim (1xx) responses |
uDecodeBufferBytes | 16 KiB, the buffer the decoded body comes out of |
Server-Sent Events
CSseParser reads text/event-stream (WHATWG HTML) from slices of any size, for example the pieces pfnData receives, with the same events for any slicing. Next( In, uConsumed, Event, bEvent ) eats input until an event goes out or the input ends. An SSseEvent has sType, sData and sId, as views valid until the next Next.
- Lines end with CRLF, LF or a lone CR, also when split across slices. A UTF-8 BOM at the start is dropped, a line starting with
:is a comment, the fields areevent,data,idandretry(others are ignored), and one space after the colon is dropped. - The
datalines are joined with LF, and the event goes out at the empty line. An event without data does not go out, and one cut by the end of the stream never does.sTypeis"message"without aneventfield. LastEventIdis the value to send asLast-Event-IDon a reconnection,RetryMsthe time the stream asked for (-1 when none).Resetstarts a new stream and keeps both by default.- A line, the data of an event, a type and an id are limited to
CSseParser::kDefaultMaxEventBytes(1 MiB) or the constructor's value. Passing it iseLimitExceeded, sticky untilReset. - The bytes are not decoded: whoever reads the text checks the UTF-8. The data of an event that came whole in one slice, in one
dataline, is a view into the input. Line ends are found 16 bytes at a time with SSE2 on x64 (and x86 built with SSE2), byte by byte elsewhere.
Threads and memory
CClientcan be called from several threads at once, and must not be destroyed while a request runs.CResponseReaderandCSseParserare for one thread at a time.- The buffers come from the caller's
Memory::IAllocator(null isMemory::DefaultAllocator), grow by doubling up to the limits and are kept byBeginandReset.Releasegives them back. - After warm-up, nothing is allocated per request in the writer, the reader, the SSE parser and both clients over plain HTTP. Over TLS it depends on the TLS engine and is not checked.
There is no C layer for this client yet. ethereal/c/http/http.h is the C layer of CWeb.
How this was verified
- The reader and the SSE parser give the same result in 43 slicings of every case (whole, byte by byte, primes, 40 random sizes up to 64 bytes). 67 malformed responses give the expected status, each limit is checked at its boundary, the writer refuses every forbidden byte, and a failure at each allocation in turn leaks nothing. libFuzzer: 65 minutes, 21.7 million executions, no finding. Line coverage: reader 96.8%, SSE parser 98.1%, writer 100%.
- The two clients against a local HTTP/1.1 and TLS server on 127.0.0.1: reuse (three TLS requests, one handshake), bodies up to 300 KiB, wrong host, missing root, wrong pin, the server closing mid-body, stale connections, each time limit, cancellation in each phase, idle expiry, and no connection left outside the pool.
CClientran 200 requests from 8 threads,CAsyncClient1000 from 4 threads, and its destructor cancelled 20 requests in flight in under 2 s. - Zero warnings with MSVC (
/W4 /WX) and GCC 13 (-Wpedantic -Werror). No finding with ASan, UBSan and TSan.
Known limits
- HTTP/1.1 only (no HTTP/2), no automatic redirects (a 3xx goes back to the caller), no proxy, no cookies, no authentication beyond headers, no WebSocket, no server.
brandzstdare not decoded. The loop ofCAsyncClientruns on one thread and is not shared with other uses.
---
Web::CWeb, the older client
Ethereal::Web::CWeb is the older optional HTTPS client, kept for existing code: new code should use the Ethereal::Http client above.
Synchronous HTTPS client (Ethereal::Web::CWeb). It builds an HTTP/1.1 request, sends it over TLS 1.3 and reads the entire response: status, header fields and body. The TLS is the one from the library's own tls module: no OpenSSL, no system TLS library, nothing to link. The same code runs on Windows, Linux and macOS.
The module is optional: -DETHEREAL_BUILD_HTTP=ON. When disabled, none of it goes into the binary.
#include <ethereal/cpp/http/web-inc.hpp>
using namespace Ethereal::Web;
CWeb & Web = CWeb::Instance();
if( Web.Initialize() != 0 ) // network up and system roots loaded
return 1;
CWebRequest Request;
Request.SetDomain( "api.example.com" );
Request.SetTargetPath( "/v1/" );
Request.SetTargetFileName( "login" );
Request.SetRequestMethod( ERequestMethodID::ePOST );
Request.SetContentType( EContentTypeID::eJSON );
Request.PushKeyPair( "user", "ana" ); // after everything is configured
CWebAnswer Answer;
const int iResult = Web.SynchronousRequest( &Request, Answer );
if( iResult != eWebOk )
printf( "%s: %s\n", WebResultName( iResult ), Answer.GetErrorDetail() );
else if( Answer.GetStatusCode() == 200 )
printf( "%s\n", Answer.GetBody() );Always include web-inc.hpp: it brings in the entire module in the right order.
---
The API
| Piece | What it does |
|---|---|
CWeb::Instance() | the backend, only one per process |
Initialize() / Deinitialize() | brings the network up and down. The first Initialize loads the system roots |
AddTrustedRootsPem( pem ) / AddTrustedRootDer( der ) | adds roots (or a self-signed certificate, which is valid on its own) |
LoadSystemRoots() / ClearTrustedRoots() / GetTrustedRootCount() | system roots again, empty store, count |
SetSpkiPin( sha256 ) / ClearSpkiPin() / HasSpkiPin() | optional pin: SHA-256 of the server's SubjectPublicKeyInfo (DER) |
SetMaxAnswerBodyBytes( n ) | ceiling for the response body (default 16 MiB, 0 goes back to the default) |
SynchronousRequest( &Request, Answer ) | one request, one connection. Returns an EWebResult as int |
CWebRequest | domain, port (0 = 443), path, file name, GET/POST method, content type, charset, keep-alive, timeouts, key/value pairs |
CWebAnswer | GetStatusCode, GetStatusLine, GetStatusText, GetBody (three forms), GetBodyLength, GetHeaderCount, GetHeaderName, GetHeaderValue, GetHeader( name ), GetErrorDetail |
WebResultName( code ) | readable name of a code, for the log |
The request that goes out is the one the owner built: the line METHOD target HTTP/1.1, Host, User-Agent: pin-client/1.0, Accept: */*, Content-Type with the charset, X-Client-Ts (seconds since 1970), X-Client-Nonce (12 bytes from the system CSPRNG in hexadecimal), Connection, Content-Length and the body. Host carries the port when it is not 443, and an IPv6 literal goes in square brackets.
Server authentication
The chain, the dates and the host name are always checked against the root store. There is no mode without verification. The pin, when configured, is checked on top of that, inside the handshake and before any byte of the request goes out.
For a server with a self-signed certificate, put the certificate itself in the store with AddTrustedRootsPem (pinned certificate). To trust only a private CA and none from the system, ClearTrustedRoots() and then AddTrustedRootsPem.
TLS only
The connection is always TLS 1.3, on any port. There is no plaintext HTTP: the module exists for an authenticated channel (pin, nonce, timestamp), and a plaintext mode would send the nonce and the body in the clear. A server that only speaks HTTP, or only TLS 1.2, fails in the handshake (code 3).
Threads
Several threads can call SynchronousRequest at the same time, each with its own request and its own response. The configuration calls (roots, pin, ceiling) can come from any thread at any time and take effect from the next request. Internally, the published store is immutable: whoever changes it makes a copy and swaps the pointer, and the request in progress continues with the version it took. Tested with TSan (6 threads making requests and one adding roots).
A CWebRequest or a CWebAnswer cannot be used by two threads at the same time.
---
Result codes
SynchronousRequest returns an int from EWebResult. An HTTP error status (404, 500) is not a failure: the response was read, the code is eWebOk and the status is in GetStatusCode().
| Code | Name | When |
|---|---|---|
| -2 | eWebNullRequest | the request pointer is null |
| -1 | eWebRequestError | the request has a configuration error (GetRequestIssuedErrorCode) |
| 0 | eWebOk | response read in full |
| 1 | eWebConnectFailed | the name did not resolve, or the TCP connection was refused or has no route |
| 2 | eWebNotInitialized | Initialize was not called |
| 3 | eWebHandshakeFailed | the handshake failed: server alert, server without TLS 1.3, connection dropped |
| 4 | eWebPinMismatch | the server key does not match the pin |
| 5 | eWebSendFailed | sending the request failed |
| 6 | eWebReceiveFailed | receiving failed (transport or TLS error) |
| 7 | eWebCertificateRejected | unknown root, wrong name, outside the dates, bad signature |
| 8 | eWebTimeout | a timeout expired (connection, handshake or waiting for data) |
| 9 | eWebMalformedAnswer | the response violates HTTP/1.1 (see below) |
| 10 | eWebAnswerTooLarge | header above 64 KiB, more than 256 fields, body above the ceiling |
| 11 | eWebAnswerTruncated | the connection ended before the end announced by Content-Length or by the last chunk |
| 12 | eWebInvalidTarget | domain, path, file name or charset cannot go into a request |
| 13 | eWebInternal | local failure (memory, randomness source) |
| 14 | eNotLicensed | no license was accepted and the evaluation period ended |
On failure, GetErrorDetail() describes it: the TLS status (certificate_rejected: sent unknown_ca (unknown issuer)) or what was wrong in the response (bad chunk size). It never carries the body.
Initialize returns 0 (success), 1 (already initialized) or 2 (the network did not come up). A system without roots is not an error: a warning goes to the log.
---
Reading the response (RFC 9112)
- Status line
HTTP/1.x NNN text, code from 100 to 599, optional text. 1xx responses (100, 103) are skipped, up to 8. 101 is refused: this client never requests a protocol switch. - Fields
Name: value: the name is a token, with no space before the colon, the value has no control character. Continuation on a new line (obs-fold) is refused. A lone LF is accepted as the end of a line. - The body: 204 and 304 have no body.
Transfer-Encodingwins overContent-Length, and onlychunkedis accepted, as the last encoding (the client does not request compression). WithContent-Length, repeated values must be equal. With neither, the body runs until the end of the connection. - Chunks: hexadecimal size with up to 15 digits, extensions after
;ignored, trailers read and discarded (up to 64 KiB). - A body delimited by the end of the connection accepts the end with or without close_notify. Many servers close the TCP connection without it, and browsers accept that. Whoever needs a guaranteed size sends
Content-Lengthorchunked: in those cases, a connection that ends early is code 11. - One connection per request, closed with close_notify at the end, even with keep-alive.
---
Timeouts
| Timeout | Default | Where it applies |
|---|---|---|
SetConnectionTimeoutTime | 30,000 ms | the TCP connection and, again, the entire handshake |
SetReadTimeoutTime | 60,000 ms | each send and each wait for response data |
The read timeout is a limit without data, not a total limit for the request. A server that sends one byte every 59 s holds the request, up to the body ceiling. 0 uses the default.
---
What was verified, and against what
- The functional suite: 106 checks. An in-house TLS 1.3 server on a thread, on 127.0.0.1, with P-256 certificates built in the test in DER and signed by
P256::Sign(root, good leaf withlocalhostand127.0.0.1, leaf for another host, leaf from another root). The server keeps the request bytes, and the test checks the request byte for byte (line,Hostwith the port,User-Agent,Accept,Content-Type,X-Client-Tswithin the second,X-Client-Noncewith 24 digits and different on each request,Connection,Content-Length), the POST body as a form, JSON and XML (with the escapes), the responses withContent-Length, chunked (extension, uppercase hexadecimal, trailer), end by connection close with and without close_notify, HTTP/1.0 with a lone LF, 404, 204, 1xx, status without text, 3 MiB of binary data (with zeros) byContent-Lengthand in chunks of random sizes, the ceilings in the three framings, 19 malformed responses, 7 cuts midway, right and wrong pin (the request does not go out), wrong host and unknown root (the request does not go out), thelocalhostname through the DNS SAN, read and handshake timeouts, connection refused, invalid targets (space, line break, scheme, charset with a line break), empty store, root by PEM, and 24 requests from 6 threads with roots being added at the same time. - Interoperability: 24 cases, against a Python HTTPS server (
http.server+ssl, TLS 1.3 minimum, OpenSSL 3.5 underneath) with P-256 and RSA 2048 certificates generated byopensslin a temporary folder, and againstopenssl s_server -tls1_3 -WWW(HTTP/1.0, body until the end of the connection). The Python server checks the request fields and the bytes of the three POSTs. It includes right and wrong pin, wrong host, unknown root, timeout, body ceiling, keep-alive and 1 MiB. - AddressSanitizer and ThreadSanitizer clean, and the module also built together with the Guard.
---
C layer
Header ethereal/c/http/http.h, 19 ETLC_Http* functions. On top of CWeb: ETLC_HttpInitialize, the roots, the pin and the body ceiling (process-wide, as in C++), and ETLC_HttpRequest, which receives the method, URL (https://host[:port][/path][?query]), content type, charset, timeouts, keep-alive and the body (raw bytes or key and value pairs) and returns a response handle with the status, status text, header fields (by index and by name) and body (without a copy or copied into the caller's buffer). The description of a failure comes truncated into the caller's buffer together with the full size, and ETLC_HttpLastError delivers it in full, with the required-size rule.
Left out is what C++ does not do: http:// (returns ETLC_ERR_UNSUPPORTED), methods other than GET and POST, and request header fields chosen by the caller.
The C layer is tested in C11 and C17 against an HTTPS server on a thread, on 127.0.0.1, built with the network and TLS C layers. GET, POST JSON, raw POST with a zero byte, chunked response, 404, unknown root, wrong pin, closed port and the URLs that do not form a request.
---
Known limits
- Only GET and POST, only HTTP/1.1, one connection per request (no reuse with keep-alive), no automatic redirection, no proxy, no compression, no cookies.
- The read timeout is per wait, not total.
- Client certificates (mTLS) do not exist: TLS sends an empty Certificate when the server requests one.
- The TLS limits apply here: TLS 1.3 only, no session resumption (each request does the full handshake), no OCSP. See the [
tlsmodule](tls.md) page. - The request body and the response body are kept in
std::string. The forms that returnCAString(StrA,GetBody( CAString & ),GetStatusLine( CAString & )) go throughCAString, which today loses text of exactly 64 characters (Assignwrites the terminator outside the SSO buffer and clearsbUsingSSO) and on a move assignment of short text (it copies 65 bytes from a 64-byte buffer). Prefer thestd::stringandconst char *forms until this is fixed in thestringmodule.
---
The legacy outside the build
http-request.hpp/.cpp and http-job-manager.hpp/.cpp (namespace ns_api, classes c_api_*) come from another project: they use ChilKat (ckhttp, UnlockBundle), VMProtect (vmp_begin_mutat_sec) and a pb_defs.hpp that does not exist here. They are dead code. They stay in the folder, unchanged, and outside the ETHEREAL_SOURCES_HTTP list and the installation.