Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Mobile.HTTPSv3

Feature notes: TLS implementation notes (RFC map) · Asynchronous QUIC server and HTTP/3 component

Classes, interfaces and records

classTsmHTTPSv3 — component reference

(no public members)

classtHTTP3Limits

inherits from TPersistent

The bounds TsmHTTPSv3 enforces; HTTP.txt section 20.2 lists each one and the rules for combining them. Change them only while the associated QUIC server is inactive: setters raise eQuicAsyncServer while it is active, and for a value out of range; an inconsistent combination raises when Server is assigned or the server activates. Each new connection takes a copy of them. Ordinary handlers get the whole request body in memory, so MaxBodyBytes and the body budgets bound an upload; a response from a file or owned stream is read in pieces as QUIC can send it.

constructor Create(aOwner: TsmHTTPSv3); procedure Assign(aSource: TPersistent); override; function Snapshot: tHttp3ServerLimits; property TotalBodyBytes: Int64 read fTotalBodyBytes write SetTotalBodyBytes default 268435456;
Request-body and response memory held at once across all connections of this component; BodyBytesHeld and ResponseBytesHeld show current use. A request whose body, or a memory response, would go over is aborted with H3_EXCESSIVE_LOAD. A response sent from a file or owned stream is not counted by its length.
property TotalResponseBytes: Int64 read fTotalResponseBytes write SetTotalResponseBytes default 268435456; property MaxHeaderBlockBytes: Integer read fValues.MaxHeaderBlockBytes write SetMaxHeaderBlockBytes default 65536; property MaxFieldSectionBytes: Integer read fValues.MaxFieldSectionBytes write SetMaxFieldSectionBytes default 65536; property SendWindowBytes: Integer read fValues.SendWindowBytes write SetSendWindowBytes default 65536;
QUIC physical send allocations retained until ACK/reset acknowledgement, shared by all streams. Range 16384 (one source piece)..3145728 (host pool 4 MiB less initial receive credit 1 MiB). Full description »
property MaxBufferedSendBytes: Integer read fValues.MaxBufferedSendBytes write SetMaxBufferedSendBytes default 262144; property MaxActiveRequests: Integer read fValues.MaxActiveRequests write SetMaxActiveRequests default 100; property MaxRequests: Integer read fValues.MaxRequests write SetMaxRequests default 1000;
One block grants MaxRequests cumulative client-bidi streams, including skipped IDs. Match the first block to the host's initial grant (1000). Full description »
property MinRequestBlockAgeMSec: Integer read fValues.MinRequestBlockAgeMSec write SetMinRequestBlockAgeMSec default 60000;
Range 0..86400000; 0 always renews when records permit. Set it to allow human client users but rule out bots: a browser user does not open 1000 requests in 60 seconds, while a bot or scraper does. GOAWAY makes it reconnect through admission, Retry and the peer filter. The block start time and opened-stream counter reset after each successful renewal.
property MaxPeerUniStreams: Integer read fValues.MaxPeerUniStreams write SetMaxPeerUniStreams default 64; property MaxBodyBytes: Integer read fValues.MaxBodyBytes write SetMaxBodyBytes default 8388608; property MaxConnectionBodyBytes: Integer read fValues.MaxConnectionBodyBytes write SetMaxConnectionBodyBytes default 8388608; property MaxMemoryResponseBytes: Integer read fValues.MaxMemoryResponseBytes write SetMaxMemoryResponseBytes default 16777216; property MaxUnproductiveFrames: Integer read fValues.MaxUnproductiveFrames write SetMaxUnproductiveFrames default 4096; property QpackTableCapacity: Integer read fValues.QpackTableCapacity write SetQpackTableCapacity default 0; property QpackBlockedStreams: Integer read fValues.QpackBlockedStreams write SetQpackBlockedStreams default 0; property MaxQpackBlockedBytes: Integer read fValues.MaxQpackBlockedBytes write SetMaxQpackBlockedBytes default 262144; property MaxPushes: Integer read fValues.MaxPushes write SetMaxPushes default 0;
Server push (deprecated). 0, the default, disables it; a positive value is the most pushes one connection may make. The client must also allow pushes, and a handler chooses each pushed resource.
property MaxActivePushes: Integer read fValues.MaxActivePushes write SetMaxActivePushes default 8;
Deprecated - server push only.
property MaxPushBufferedBytes: Integer read fValues.MaxPushBufferedBytes write SetMaxPushBufferedBytes default 262144;
Deprecated - server push only.
property PushTimeoutMSec: Integer read fValues.PushTimeoutMSec write SetPushTimeoutMSec default 10000;
Deprecated - server push only.
property HeaderTimeoutMSec: Integer read fValues.HeaderTimeoutMSec write SetHeaderTimeoutMSec default 10000;
Absolute deadlines for a request's headers and for its buffered body and trailers; arriving bytes do not extend them. 0 disables one (a negative value stores 0). HTTP.txt section 20.4.
property RequestTimeoutMSec: Integer read fValues.RequestTimeoutMSec write SetRequestTimeoutMSec default 30000;

classTsmHTTPSv3 — component reference

inherits from TComponent

implements iQuicAppProtocolComponent, iHttpAltSvcSource

constructor Create(aOwner: TComponent); override; destructor Destroy; override; procedure BindToServer(aServer: TComponent);
Called by TsmAsyncQUICServer as it activates, so that a plugin loaded from a form is registered whatever the DFM declaration order. You do not call it: assigning Server registers the plugin. » member page
function AppProtocol: iQuicAppProtocol; function AltSvcEndpoint: iHttpAltSvcEndpoint;
What TsmHTTPSv1dot1/TsmHTTPSv2 read when their AltSvc.Source is this component, so you rarely call it. TryGetPort is True, with the bound UDP port, while Server is active and serving this plugin. A retained reference stays valid after this component is freed and then reports unavailable. » member page
procedure AddHandler(const aPath: string; const aHandler: iHttpRequestHandler); procedure AddEvent(const aPath: string; aEvent: tHttpRequestEvent); procedure AddFile(const aReqPath, aPhysicalFile: string); procedure AddFiles(const aMap: array of THttpFileMap); property BodyBytesHeld: Int64 read GetBodyBytesHeld; property ResponseBytesHeld: Int64 read GetResponseBytesHeld; property Router: iHttpRouter read GetRouter write SetRouter; property SessionProvider: iHttpSessionProvider read GetSessionProvider write SetSessionProvider; property Server: TsmAsyncQUICServer read fServer write SetServer; property Limits: tHTTP3Limits read fLimits write SetLimits; property EnableEarlyData: Boolean read fEnableEarlyData write SetEnableEarlyData default False;
Set True to accept QUIC 0-RTT early data from resuming clients. False, the default, refuses 0-RTT on the whole endpoint. Full description »
property EarlyDataPolicy: StreamSec.Http.Server.tEarlyDataPolicy read fEarlyDataPolicy write SetEarlyDataPolicy default edpRefuse;
Which requests received as 0-RTT are dispatched (see tEarlyDataPolicy). edpRefuse, the default, answers 425 (Too Early) with Cache-Control: no-store, so the client retries after its handshake. Full description »
property OnRequest: tHttpRequestEvent read GetOnRequest write SetOnRequest;
Called for a request no route matched; routes added with AddHandler, AddEvent, AddFile or AddFiles take precedence, and with neither the request gets 404. The same handler can serve the TCP components too (aRequest.NegotiatedProtocol is h3 here). Runs on a connection worker of Server and holds it until it returns. » member page