Import Anubis v1.28.2
Replace the tree with upstream TecharoHQ/anubis v1.28.2 (a1384fbf42e3). Masyunis customizations are re-applied in the following commits.
This commit is contained in:
1 parent
eb3e46d8d0
commit
e07de898cd
573 files changed
+35846
-6807
No files matched your search
@@ -0,0 +1,11 @@
|
||||
# Allow double-slashes in paths
|
||||
|
||||
This test ensures that paths of the form `//foo` get passed to the target server as `//foo`.
|
||||
|
||||
## Tale of woe
|
||||
|
||||
Gentoo's wiki has pages named after configuration files. Prior to this fix, Anubis passed everything through [net/http#ServeMux](https://pkg.go.dev/net/http#ServeMux). ServeMux cleans paths to remove common client errors like two slashes in a row. This is a problem for servers that actually want it.
|
||||
|
||||
To fix it, Anubis needed to use some prefix comparison logic to dispatch to ServeMux and then otherwise reverse proxy to the target service. This preserves the double slashes.
|
||||
|
||||
This smoke test reads [input.txt](./input.txt) and passes every path to httpdebug, making sure the path comes out right on the other end.
|
||||
Reference in new issue
Block a user