Skip to main content

pv1_0

pv1_0 = 0

Example

procedure UseLegacyHTTP(Client: TvxHTTP);
begin
Client.ProtocolVersion := pv1_0;
Client.Get('http://legacy.example.invalid/status');
end;

Usage

pv1_0 selects an HTTP/1.0 request line and Velox's legacy method and connection-handling rules for a Velox HTTP client.

Scope and quirks

  • This value controls the outbound HTTP/1.x request line and several Velox compatibility branches. It does not force the server to reply using HTTP/1.0.
  • Velox recognises response versions 1.0 and 1.1; an unrecognised version is reported as pv1_0. That fallback does not prove the peer actually sent HTTP/1.0.
  • HTTP version is separate from TLS version. Selecting pv1_0 does not weaken, enable or repair TLS by itself.
  • This two-value enum cannot request HTTP/2 or HTTP/3, and it does not perform protocol negotiation.
  • Redirect, authentication, proxy, timeout and content-framing behavior remain controlled by their own settings and by the remote peer.

Additional Technical Info

pv1_0 selects the HTTP/1.0 branch of Indy's TIdHTTPProtocolVersion. When assigned to TvxHTTP.ProtocolVersion, the next request line ends in HTTP/1.0.

Use it only for a known legacy endpoint. A new TvxHTTP and a new Velox HTTP transport both default to pv1_1.

Supported methods

The compiled Velox Indy source rejects TRACE, PUT, OPTIONS, DELETE and PATCH when this value is selected. It raises an exception before writing the request. The same check applies when a custom method or method override has one of those names.

GET, HEAD and POST are not rejected by this gate. A particularly important Velox modification disables Indy's old behavior that temporarily forced every POST to HTTP/1.0: POST now preserves whichever value the caller selected. The commented legacy block does not execute, and the hoKeepOrigProtocol option is irrelevant to this modified path.

Connection handling

HTTP/1.0 normally treats each connection as non-persistent unless persistence is requested. Before a direct request, Indy adds Connection: keep-alive if no Connection value is present. For a plain HTTP proxy it similarly adds Proxy-Connection: keep-alive, despite the latter being a nonstandard compatibility header.

After a response, Indy's HTTP/1.0 branch keeps the socket only when the corresponding response header explicitly equals keep-alive; otherwise it closes. The branch is selected from the configured request version, not the independently parsed response version. Velox's TvxHTTP wrapper then disconnects unconditionally in a finally block after every request that reaches method dispatch, so a connection is not reused by the next wrapper call even when both peers accepted keep-alive.

Related entries

External references

Created 2026-07-15