aboutsummaryrefslogtreecommitdiff
path: root/lib/http/testdata/Server_HandleFS_test.txt
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2025-01-22 20:49:40 +0700
committerShulhan <ms@kilabit.info>2025-01-22 21:34:16 +0700
commit18d3a3aad4b6ad3358159d48cd158c2cb2c71e5a (patch)
tree85d4d09371e4077091ba94988e3f8c5d799dc155 /lib/http/testdata/Server_HandleFS_test.txt
parentb9cff7d8f66d679218d1eaf4b015febbc48abc9e (diff)
downloadpakakeh.go-18d3a3aad4b6ad3358159d48cd158c2cb2c71e5a.tar.xz
lib/http: always refresh a directory on GET request
On server with TryDirect is true, any GET request to a directory should always rescan the content and the generate the new index.html. While at it, return the generated time in UTC instead of local time.
Diffstat (limited to 'lib/http/testdata/Server_HandleFS_test.txt')
-rw-r--r--lib/http/testdata/Server_HandleFS_test.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/http/testdata/Server_HandleFS_test.txt b/lib/http/testdata/Server_HandleFS_test.txt
new file mode 100644
index 00000000..23dd32c9
--- /dev/null
+++ b/lib/http/testdata/Server_HandleFS_test.txt
@@ -0,0 +1,33 @@
+
+<<< TestServer_HandleFS/OnEmptyRoot
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/html; charset=utf-8
+
+<!DOCTYPE html><html>
+<head>
+<meta name="viewport" content="width=device-width">
+<style>
+body{font-family:monospace; white-space:pre;}
+</style>
+</head>
+<body>
+<h3>Index of /</h3>
+</body></html>
+
+<<< TestServer_HandleFS/OnNewDirectory
+HTTP/1.1 200 OK
+Connection: close
+Content-Type: text/html; charset=utf-8
+
+<!DOCTYPE html><html>
+<head>
+<meta name="viewport" content="width=device-width">
+<style>
+body{font-family:monospace; white-space:pre;}
+</style>
+</head>
+<body>
+<h3>Index of /</h3>
+<div>drwxr-xr-x <tt> 0</tt> 0000-00-00T00:00:00Z <a href="/dirA">dirA</a></div><br/>
+</body></html>