Commit Graph

17 Commits

Author SHA1 Message Date
André Kugland defc1e8ce9
Custom headers with the CLI option `--header` (#28)
These changes add a command-line option --header, e.g. --header 'Access-Control-Allow-Origin: *'.

Basic tests are included for this option.

When accepting the argument, a very simple sanitization is made, the string is required to contain ": ", and can’t contain a '\n' character. These checks are far from what is required to truly validate a HTTP header, but will at least detect simple mistakes and forbid the abuse of having arguments that include more than one header, or, worse, that include a body for the response (after "\r\n\r\n").

This should also close the Issue #16 and PR #27, I think, since CORS functionality can be obtained by specifying a custom header.
2022-12-06 21:46:52 +11:00
Emil Mikulic 1e4cddb6b6 Disable msan because it's not working.
It looks like parts of dlent are not being unpoisoned.
2022-10-02 11:34:56 +11:00
Emil Mikulic 3641c2f50f Dir listing: special-case ".." to come first.
Suggested by: @frogtile

Fixes #14
2022-01-19 20:10:50 +11:00
Emil Mikulic 1759a7a7d9 Add tests for --forward-https. 2021-08-22 13:18:36 +10:00
Emil Mikulic b57eb17d47 More Python 3 updates. 2021-01-17 17:29:23 +11:00
Emil Mikulic 598a47fe9d Add tests for --auth. 2020-07-01 21:22:17 +10:00
Emil Mikulic 47ba3fd7c7 -fno-omit-frame-pointer to get full backtraces in asan build. 2020-07-01 20:46:10 +10:00
Emil Mikulic 36ab416f73 Enable leak sanitizer. 2020-07-01 20:43:49 +10:00
Emil Mikulic ba63a6d60f Add test for --timeout. 2018-12-10 23:52:42 +11:00
Emil Mikulic 8207cf6b0f run-tests: try to use the default gcc and clang. 2018-12-10 23:35:31 +11:00
Emil Mikulic 6e8abe2324 run-tests: don't mix msan with ubsan.
ubsan seems to be causing false positives for msan.
We already try ubsan together with asan.
2018-12-10 23:34:56 +11:00
Emil Mikulic 6acf37e879 Build with warnings. 2016-01-28 01:06:08 +11:00
Emil Mikulic 485ebd1a20 Run tests under msan. 2016-01-28 00:41:34 +11:00
Emil Mikulic 26e7adea15 Add asan and ubsan to tests, watch stderr. 2016-01-24 16:39:32 +11:00
Emil Mikulic 3478d24419 Make the output more obvious. 2016-01-23 20:10:10 +11:00
Emil Mikulic 112f1ccb92 Test builds with different defines. 2016-01-23 20:08:02 +11:00
Emil Mikulic f913e17125 Rename "cover" to "run-tests" 2016-01-23 20:05:02 +11:00