Summary #
- Add happy-path coverage for
middleware.MaxBodySizewhen reading a payload withinmaxBytes, and assert*http.MaxBytesErroron oversized payloads. - Assert downstream non-invocation across all rejected
middleware.Authscenarios and cover whitespace-only configured keys (" "). - Assert complete access-log attributes (
path,uri,status,bytes) and response body inmiddleware.Logginginstead of leaving written response bytes unasserted, and verify SSE access logging suppresses duplicate"HTTP request"entries. - Move flush-error assertions out of the HTTP handler callback into linear Arrange-Act-Assert flow and eliminate abbreviated identifiers (
req,rr,rec,rc,logBuf,readErr,flushErr,l).