Splitting the resource request into more usable pieces
This note describes the steps taken by the server to split the raw request path into a resource path, a query string, and key-value parameters.
:path pseudo-header contains the requested resource path and any query-string values. Each of the following operations are performed by the Raw Path handler, immediately after the Resource Mask handler has performed any rewrite operations:
- The raw pseudo-header is split into two halves at the first occurrence of a QUESTION-MARK.
- The query string, when present, is decomposed into one or more key-value pairs, which are stored in a parameter map.
- The resource path is canonicalized in order to prevent misuse.
Software engineers who are developing dynamic modules can access this parsed data via the
WorkOrder object. These values are apropos to this handler:
_resourcePath: the portion of the request header's
:paththat contains the resource path without any query-string.
_queryString: a String that contains the unparsed query-string portion of the request header's
_parameterMap: an ES6 Map, where the keys and values are Strings that have been obtained by decomposing the query-string portion of the request's
:pathheader, and reversing any url-encoding that may have existed.
_resourcePath variable contains any relative path parts (
../), they are normalized by the handler prior to storage. If the normalization yields an absolute file-system path that is outside the website's declared
document-root, the request is rejected with a status code
400 and an information header of
If the resource path length is longer than 255 characters, the request is rejected with a status code
414 and an information header of
There are no configurable options associated with this handler.
Key points to remember:
- The raw path handler is called after the Resource Mask handler.
- The parsed data is available to dynamic modules via the