fix(handler/file): fix deadlock, conn leak, and nil Addr; add 39 tests

Fix bugs in the file handler: unbuffered send channel deadlock on Close,
conn leak when send drops on done, and Addr() returning nil. Add done-
priority select in send(), explicit ln.Close() in Close(), Unwrap() on
responseWriter for http.ResponseController, and nil guards.

Also add package doc, NewHandler doc, and 39 unit tests covering the
listener, responseWriter, handler lifecycle, auth, and file serving.
This commit is contained in:
ginuerzh
2026-05-27 22:49:59 +08:00
parent a2cef9639d
commit 7e3183488b
2 changed files with 1048 additions and 6 deletions
File diff suppressed because it is too large Load Diff