Skip to main content

TIdHTTPProtocolVersion

TIdHTTPProtocolVersion = (pv1_0, pv1_1)

Example

procedure ConfigureHTTP(Client: TvxHTTP);
begin
Client.ProtocolVersion := pv1_1;
end;

Usage

TIdHTTPProtocolVersion selects the HTTP/1.0 or HTTP/1.1 request version exposed by a TvxHTTP client.

Members

ValueOrdinalMeaning
pv1_00Write HTTP/1.0; restrict five methods and use explicit keep-alive compatibility rules.
pv1_11Write HTTP/1.1; this is the Velox default.

Behavior and boundaries

  • The selected member controls the exact HTTP version written in the outbound request. Velox does not negotiate the highest supported version before sending.
  • POST preserves the selected member; it is not forced to HTTP/1.0.
  • TRACE, PUT, OPTIONS, DELETE and PATCH require pv1_1 in this Velox. GET, HEAD and the modified POST path accept either member.
  • For pv1_0, Velox adds a keep-alive request header when none is present and requires an explicit keep-alive response header. For pv1_1, it assumes persistence unless a close header or socket state says otherwise.
  • Keep-alive behaviour uses the configured request version rather than the response version. TvxHTTP disconnects after each completed script request and does not reuse the socket across calls.
  • A server can answer using a different HTTP/1.x version. Velox reports an unrecognised response version as pv1_0.
  • Do not downgrade as a TLS workaround; HTTP and TLS versions are separate. This enum also cannot select HTTP/2 or HTTP/3.
  • Changing the property affects subsequent request construction. It does not renegotiate a completed request or reset headers, authentication, redirects, proxy settings, cookies or content.

Additional Technical Info

TIdHTTPProtocolVersion is the two-value Indy request-version selector exposed by TvxHTTP.ProtocolVersion. A new TvxHTTP instance, a new Velox HTTP transport and the underlying Indy client all default to pv1_1.

This selector covers only HTTP/1.0 and HTTP/1.1. It does not enable HTTP/2 or HTTP/3, and it does not by itself define redirect, proxy, authentication, timeout or TLS behavior.

Related Code Library entries

External references

Created 2026-07-15