RawPathInfo
property RawPathInfo: string read;
Example
procedure ScriptEvent(var Value: variant);
begin
if Request <> nil then
Value := Request.RawPathInfo
else
Value := '';
end;
Usage
RawPathInfo returns Velox's encoded request target after query separation, before the URI path is percent-decoded into PathInfo.
Additional Technical Info
RawPathInfo returns TIdHTTPRequestInfo.URI. Indy removes the query at ? and stores the remaining request target before TIdURI percent-decodes components into PathInfo. The property therefore preserves encoded path octets and excludes Query.
For the usual origin-form request it is a slash-led encoded path. HTTP also permits other request-target forms; an absolute-form target can leave more than a path in this stored value, and the asterisk form is *. Do not assume it always names a local route or begins with /.
Raw does not mean safe or byte-for-byte request line. Indy has already tokenised the request and separated the query, and Unicode string representation/transport handling has occurred. Do not use it as a filesystem path or open redirect target. If a signature protocol requires exact canonical request-target data, implement the protocol's specified canonicalisation at the correct server boundary.
Compare routing paths only after one controlled decoding/normalisation step and reject ambiguous encodings, encoded separators and dot traversal as appropriate. Avoid decoding both RawPathInfo and PathInfo in different layers. Test Request for nil.
External references
Created 2026-07-15