anubis/test/double_slash/test.sh
Xe Iaso 714c85dbc4
fix(lib): enable multiple consecutive slash support (#1155)
* fix(lib): enable multiple consecutive slash support

Closes #754
Closes #808
Closes #815

Apparently more applications use multiple slashes in a row than I
thought. There is no easy way around this other than to do this hacky
fix to avoid net/http#ServeMux's URL cleaning.

* test(double_slash): add sourceware case

Signed-off-by: Xe Iaso <me@xeiaso.net>

* test(lib): fix tests for double slash fix

Signed-off-by: Xe Iaso <me@xeiaso.net>

---------

Signed-off-by: Xe Iaso <xe.iaso@techaro.lol>
Signed-off-by: Xe Iaso <me@xeiaso.net>
2025-09-27 13:44:46 -04:00

23 lines
370 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
function cleanup() {
pkill -P $$
}
trap cleanup EXIT SIGINT
# Build static assets
(cd ../.. && npm ci && npm run assets)
go tool anubis --help 2>/dev/null || :
go run ../cmd/httpdebug &
go tool anubis \
--policy-fname ./anubis.yaml \
--use-remote-address \
--target=http://localhost:3923 &
backoff-retry node ./test.mjs