cleanup, docs

This commit is contained in:
root
2026-06-16 12:21:31 +00:00
parent dff1959341
commit ea08d5f28b
296 changed files with 1571 additions and 1940 deletions
+4 -8
View File
@@ -1,10 +1,8 @@
:title
request_query_path
:sig
String request_query_path(Request& context, String default_path = "index")
:see
>uri
request_query_route
request_context_params
route_path_sanitize
@@ -18,10 +16,8 @@ For a request such as `/?workspace/projects&theme=dark`, this returns `workspace
When no keyless route is supplied, the result is `default_path`. When unsafe route input is supplied, the result is an empty string. Unsafe route input includes `.` or `..` segments, empty interior segments, backslashes, dots in filenames, or any character outside ASCII letters, digits, `_`, and `-`.
```cpp
String route_path = request_query_path(context);
if(route_path == "")
context.set_status(404, "Not Found");
```
The runtime-populated `context.params["ROUTE_PATH"]` uses the same sanitizer.
:example
print(request_query_path(context, "index") != "" ? "path\n" : "empty\n");