PathTranslated
property PathTranslated: string read;
Example
procedure ScriptEvent(var Value: variant);
begin
if Request <> nil then
Value := Request.PathTranslated
else
Value := '';
end;
Usage
PathTranslated returns the same decoded Velox Document as PathInfo and does not translate it to a server filesystem path.
Additional Technical Info
In this Indy bridge, PathTranslated is assigned FRequestInfo.Document, exactly like PathInfo. The source explicitly notes that it cannot translate the URI to a path. The result is therefore the percent-decoded request-target path (without query), not a fully qualified Windows filesystem location.
Do not pass it directly to file functions or use it as proof that a resource resides beneath a web root. It can contain caller-controlled separators, dot segments or names that acquire special meaning in Windows/filesystem APIs. Indy's same decoder silently drops malformed percent escapes instead of rejecting them, so raw encodings can collapse to an unexpected decoded path. If an endpoint intentionally maps a route value to storage, validate the raw encoding, perform one well-defined decode/normalisation, join it to an approved root using filesystem-aware operations, resolve the final path and verify containment before access.
This behavior materially differs from the generic Embarcadero description, which reflects other WebBroker server adapters. In Velox, PathTranslated = PathInfo for the same live request. Use RawPathInfo when exact encoded input matters, but do not treat raw text as automatically safer.
Test Request for nil. Reading the property performs no filesystem lookup and does not establish that a path exists.
External references
Created 2026-07-15