Let a handler flush or set a write deadline through the access log and metrics (closes #191) #428

Merged
clawbot merged 1 commits from issue-191-logging-writer-unwrap into next 2026-10-02 13:08:55 +02:00
1 Commits
Author SHA1 Message Date
sneak 11a34d498d Let a handler flush or set a write deadline through the access log and metrics (closes #191)
check / check (push) Waiting to run
The access log's response writer had no Unwrap method, so
http.ResponseController stopped at it and a handler's Flush or
SetWriteDeadline returned http.ErrNotSupported. It now has one.

With metrics on, the metrics library's std.Handler put a writer of its
own in the chain with the same gap. The Metrics middleware now calls
the library's Measure with a writer of ours that has Unwrap, and keeps
its place in the chain.

A new test sets a write deadline and flushes through the production
router over a real connection, with metrics off and on, on a global
route and in an admin page route group.

Model: opus-5-5
2026-10-02 10:30:50 +00:00