mirror of
https://github.com/tailscale/tailscale.git
synced 2026-10-09 03:42:01 -04:00
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>