Repository navigation
Plug: halt before sending the rejection; report test conns from before_send
The 0.5.2 CI run flaked once on the mid lane with new evidence: the 401
response reached the client while the handler's owner reports after the
send never ran — the transport can kill the handler process once the
response flushes and the client closes, before any post-send code executes.
The harness now sends its observed-connection report from a
register_before_send hook, which runs inside send_resp: the report strictly
precedes the response bytes, so it cannot be lost to the handler's death.
To keep the reported connection final, Verify's {:halt, status} rejection
sets the halted flag before send_resp instead of after — wire behavior is
identical (Plug reads the flag only after the pipeline returns), and
before_send callbacks now observe the final halted state. Gate exit 0.