caddy/modules/caddyhttp/fileserver
klokv d7e49a55cd
fileserver: treat a path below a regular file as not found (#8131)
Since #7017, every *fs.PathError from stat becomes fs.ErrInvalid, and
that includes ENOTDIR. So a request like /index.php/foo got 400 instead
of 404, and pass_thru no longer fell through to the next handler.

Map ENOTDIR to fs.ErrNotExist before that check. Other path errors, such
as NUL bytes, overly long names, or transient I/O failures, keep their
current handling.

(cherry picked from commit 7ba5e147ac)
2026-11-03 00:52:58 -05:00
..
testdata caddyhttp: omit Last-Modified for unusable mod times (#7740) 2026-05-20 16:19:11 +10:00
browse.go fileserver: speed up directory browsing for large directories (#7903) 2026-08-01 00:38:04 +10:00
browse.html browse: Update Caddy logo 2026-06-20 13:45:10 -06:00
browsetplcontext.go fileserver: speed up directory browsing for large directories (#7903) 2026-08-01 00:38:04 +10:00
browsetplcontext_bench_test.go fileserver: speed up directory browsing for large directories (#7903) 2026-08-01 00:38:04 +10:00
browsetplcontext_test.go fileserver: Use EscapedPath for browse (#5534) 2023-05-15 10:48:05 -06:00
caddyfile.go fileserver: reject non-integer browse file_limit (#7988) 2026-09-04 16:37:02 +10:00
command.go fileserver: Add file_limit option for browse (to be experimental) (#6648) 2024-11-05 09:35:32 -07:00
matcher.go chore(deps): bump cel-go and switch import to new url (#8030) 2026-09-17 04:09:23 +03:00
matcher_test.go rewrite: escape file matcher paths before rewriting (#7683) 2026-05-11 17:16:33 -06:00
staticfiles.go fileserver: treat a path below a regular file as not found (#8131) 2026-11-03 00:52:58 -05:00
staticfiles_test.go fileserver: treat a path below a regular file as not found (#8131) 2026-11-03 00:52:58 -05:00
staticfiles_windows_test.go fileserver: reject short names in every path component (#7952) 2026-08-28 09:09:23 +00:00