Skip to main content

ContentVersion

property ContentVersion: string read;

Example

procedure ScriptEvent(var Value: variant);
begin
if Request <> nil then
Value := Request.ContentVersion
else
Value := '';
end;

Usage

ContentVersion looks up the legacy nonstandard raw-header key CONTENT_VERSION, so a normal Content-Version field remains invisible.

Additional Technical Info

ContentVersion is a legacy WebBroker-compatible property with a bridge-specific defect. TIdHTTPAppRequest.GetStringVariable queries Indy's raw headers using the exact field name CONTENT_VERSION (underscore). Header-name comparison is case-insensitive, but underscore and hyphen are different characters. A conventional Content-Version field therefore does not populate this property.

Only a nonstandard incoming field literally named CONTENT_VERSION can normally produce a value. The returned text is unparsed and selected from the first matching field. Velox does not interpret it, perform version negotiation or connect it to ProtocolVersion.

Do not use this property for new API versioning. Use an explicitly governed endpoint path, media-type parameter or purpose-built header and document its validation/fallback rules. Existing scripts that rely on ContentVersion should be reviewed because an empty result is expected for the normal hyphenated header.

Treat any nonempty value as untrusted. Test Request for nil. The Embarcadero page describes the intended Content-Version abstraction; the underscore lookup is the actual Velox/Indy implementation quirk.

External references

Created 2026-07-15