mirror of
https://github.com/tailscale/tailscale.git
synced 2026-10-09 11:52:00 -04:00
client/web, tsweb/compserve: serve index.html for the root path
GET / in the client/web assets handler normalized to an empty fs path. The empty name is invalid, and file systems wrapped in fs.Sub reject it with fs.ErrInvalid instead of fs.ErrNotExist. The index.html fallback only triggers on fs.ErrNotExist, so it never ran and the request failed with a 500 "internal error". This broke the corp smoke test that curls http://100.100.100.100/. Normalize the empty path to index.html before serving. Also make compserve.ServeFile return fs.ErrNotExist for invalid paths, per its documented contract, instead of leaking fs.ErrInvalid. Both layers have regression tests verified to fail without the fix. Updates tailscale/corp#20099 Updates #12170 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f