(add-normalized-uri-filter-to-servlet-handler! handler)
Inputs: [handler :- ServletContextHandler]
Adds a servlet filter to the servlet handler which provides a normalized request URI on to its downstream consumers for an incoming request.
Inputs: [handler :- ServletContextHandler] Adds a servlet filter to the servlet handler which provides a normalized request URI on to its downstream consumers for an incoming request.
(handler-maybe-wrapped-with-normalized-uri handler normalize-request-uri?)
Inputs: [handler :- AbstractHandler normalize-request-uri? :- schema/Bool] Returns: AbstractHandler
If the supplied normalize-request-uri?
parameter is 'true', return a
handler that normalizes a request uri before passing it on downstream to
the supplied handler for an incoming request. If the supplied
normalize-request-uri?
is 'false', return the supplied handler.
Inputs: [handler :- AbstractHandler normalize-request-uri? :- schema/Bool] Returns: AbstractHandler If the supplied `normalize-request-uri?` parameter is 'true', return a handler that normalizes a request uri before passing it on downstream to the supplied handler for an incoming request. If the supplied `normalize-request-uri?` is 'false', return the supplied handler.
(normalize-uri-handler)
Inputs: [] Returns: HandlerWrapper
Create a HandlerWrapper
which provides a normalized request URI on to
its downstream handler for an incoming request. The normalized URI would
be returned for a 'getRequestURI' call made by the downstream handler on
its incoming HttpServletRequest request parameter. Normalization is done
per the rules described in the normalize-uri-path
function. If an error
is encountered during request URI normalization, an HTTP 400 (Bad Request)
response is returned rather than the request being passed on its downstream
handler.
Inputs: [] Returns: HandlerWrapper Create a `HandlerWrapper` which provides a normalized request URI on to its downstream handler for an incoming request. The normalized URI would be returned for a 'getRequestURI' call made by the downstream handler on its incoming HttpServletRequest request parameter. Normalization is done per the rules described in the `normalize-uri-path` function. If an error is encountered during request URI normalization, an HTTP 400 (Bad Request) response is returned rather than the request being passed on its downstream handler.
(normalize-uri-path request)
Inputs: [request :- HttpServletRequest] Returns: schema/Str
Return a 'normalized' version of the uri path represented on the incoming request. The 'normalization' consists of three steps:
An exception may be thrown if the request has malformed content, e.g., partially-formed percent-encoded characters like '%A%B'.
If a semicolon character, U+003B, is found during the decoding process, it and any following characters will be removed from the decoded path.
An IllegalArgumentException is thrown if one or more segments are found.
Inputs: [request :- HttpServletRequest] Returns: schema/Str Return a 'normalized' version of the uri path represented on the incoming request. The 'normalization' consists of three steps: 1) URL (percent) decode the path, assuming any percent-encodings represent UTF-8 characters. An exception may be thrown if the request has malformed content, e.g., partially-formed percent-encoded characters like '%A%B'. If a semicolon character, U+003B, is found during the decoding process, it and any following characters will be removed from the decoded path. 2) Check the percent-decoded path for any relative path segments ('..' or '.'). An IllegalArgumentException is thrown if one or more segments are found. 3) Compact any repeated forward slash characters in a path.
(normalized-uri-filter)
Inputs: [] Returns: Filter
Create a servlet filter which provides a normalized request URI on to its
downstream consumers for an incoming request. The normalized URI would be
returned for a 'getRequestURI' call on the HttpServletRequest parameter.
Normalization is done per the rules described in the normalize-uri-path
function. If an error is encountered during request URI normalization, an
HTTP 400 (Bad Request) response is returned rather than the request being
passed on its downstream consumers.
Inputs: [] Returns: Filter Create a servlet filter which provides a normalized request URI on to its downstream consumers for an incoming request. The normalized URI would be returned for a 'getRequestURI' call on the HttpServletRequest parameter. Normalization is done per the rules described in the `normalize-uri-path` function. If an error is encountered during request URI normalization, an HTTP 400 (Bad Request) response is returned rather than the request being passed on its downstream consumers.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close