tiny_httpd/tests
Simon Cruanes ba19880d75
Some checks failed
github pages / deploy (push) Has been cancelled
build / build (4.13.x, ubuntu-latest) (push) Has been cancelled
build / build (4.14.x, ubuntu-latest) (push) Has been cancelled
build / build (5.03.x, ubuntu-latest) (push) Has been cancelled
hardening bugfixes
* fix: use realpath to validate filesystem paths against traversal

- add string_prefix helper to check path containment
- compute root_canonical once per add_vfs_ call
- use realpath only for filesystem (on_fs=true), keeping simple
  contains_dot_dot check for VFS
- paths are already URL-decoded by Route.rest_of_path_urlencoded

* fix: add header size limits to prevent memory exhaustion

add optional limits to Headers.parse_:
- max_headers: 100 (default)
- max_header_size: 16KiB per header (default)
- max_total_size: 256KiB total (default)

returns 431 status code when limits exceeded per RFC 6585.
2026-02-10 19:57:21 -05:00
..
html ocamlformat 2023-05-23 17:40:18 -04:00
multipart_form feat: require \r\n before all boundaries but the first 2024-12-02 15:58:16 -05:00
prometheus format 2024-08-15 09:18:15 -04:00
unit hardening bugfixes 2026-02-10 19:57:21 -05:00
.gitignore add an upload test 2021-12-11 10:14:07 -05:00
dl-out.expect update tests, make them more robust 2024-04-03 21:44:24 -04:00
download_chunked.sh update tests, make them more robust 2024-04-03 21:44:24 -04:00
dune ocamlformat 2023-05-23 17:40:18 -04:00
echo1.expect test: update test 2025-04-18 09:37:27 -04:00
echo1.sh fix this damn non determinism test 2024-06-20 11:07:44 -04:00
sse_count.expect test: use different ports for each test, run some targets only on linux 2021-12-11 16:32:15 -05:00
sse_count.sh test: fix expect tests, make them more robust (timeout), correct upload test 2022-03-31 08:45:39 -04:00
upload-out.expect update tests, make them more robust 2024-04-03 21:44:24 -04:00
upload_chunked.sh fix test 2025-04-18 09:37:27 -04:00