mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-25 21:20:00 +00:00
ae19fcf5d6
A password login can end while its response is being read: the caller cancels, its deadline passes, or the client's own login timeout expires. Go's HTTP transport can still hand back the server's answer to that abandoned request. The construction fixture answers a departed client with an empty 200, which surfaced as "invalid authentication response" and failed TestClientConstructionHonoursContext and its client-timeout twin intermittently in the required backend check. The shared password exchange now reports the ending instead of diagnosing that answer, keeps transport errors that already carry the ending, and starts no form attempt after an ended JSON refusal. This mirrors the PBS client fix from 18 October. Renewal shares the exchange, so the same rule applies when its own bounded timeout ends a login. Complete sessions are still accepted, and construction still discards a client whose caller has ended. A new control ends the login during response reading, by caller cancellation and by a simulated login deadline, for every unusable answer; without this change all of its cases fail. It also checks that both encoding attempts carry the one login budget the client timeout sets. The TLS fixture now aborts a request whose client has left rather than answering it with an empty 200.