KB Article #177864

The value http.request.path is not URL-encoded

Problem

* The value http.request.path is not URL-encoded, making it inconvenient to use directly in policies that want to use its value to build URLs.

Resolution


- You can extract the path from http.request.uri where it is already encoded by stripping off the query string using a policy like this:





The Set Attribute filter is necessary to change the type to string, because the String Replace filter cannot operate on a URI object. The String Replace filter uses a regex to match the entire string, then replace it with everything before the first question mark. After these filters have executed, the attribute path.only will contain the URL-encoded path.