diff options
| author | Shulhan <ms@kilabit.info> | 2026-02-05 19:26:29 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2026-02-05 19:26:29 +0700 |
| commit | 3734420eec485bca8c18243741e1ad2a683515b7 (patch) | |
| tree | c08f208e76f516048e07e982fa712daafc98cce3 /lib/http/testdata/Server_HandleFS/b.html | |
| parent | f40153cfb1cd859538aeaad17f0a243b4ef0c52c (diff) | |
| download | pakakeh.go-3734420eec485bca8c18243741e1ad2a683515b7.tar.xz | |
lib/http: handle file system with canonical directory end with slash "/"
Previously, if request to directory does not end with "/", the HTTP
server will return the index.html of that directory.
This cause relative link inside the index.html broken when visited from
browser.
This changes make the request to directory always end with "/" by
redirecting the request with status 303 Found.
Diffstat (limited to 'lib/http/testdata/Server_HandleFS/b.html')
| -rw-r--r-- | lib/http/testdata/Server_HandleFS/b.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/http/testdata/Server_HandleFS/b.html b/lib/http/testdata/Server_HandleFS/b.html new file mode 100644 index 00000000..aa8d367a --- /dev/null +++ b/lib/http/testdata/Server_HandleFS/b.html @@ -0,0 +1,6 @@ +<!doctype html> +<html> + <head> + <title>/b.html</title> + </head> +</html> |
