aboutsummaryrefslogtreecommitdiff
path: root/lib/http/testdata/Server_HandleFS/dir/index.html
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-02-05 19:26:29 +0700
committerShulhan <ms@kilabit.info>2026-02-05 19:26:29 +0700
commit3734420eec485bca8c18243741e1ad2a683515b7 (patch)
treec08f208e76f516048e07e982fa712daafc98cce3 /lib/http/testdata/Server_HandleFS/dir/index.html
parentf40153cfb1cd859538aeaad17f0a243b4ef0c52c (diff)
downloadpakakeh.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/dir/index.html')
-rw-r--r--lib/http/testdata/Server_HandleFS/dir/index.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/http/testdata/Server_HandleFS/dir/index.html b/lib/http/testdata/Server_HandleFS/dir/index.html
new file mode 100644
index 00000000..245518a0
--- /dev/null
+++ b/lib/http/testdata/Server_HandleFS/dir/index.html
@@ -0,0 +1,6 @@
+<!doctype html>
+<html>
+ <head>
+ <title>/dir/index.html</title>
+ </head>
+</html>