Skip to content

fix(buffer): default implicit responses to HTTP 200 - #263

Merged
ldez merged 2 commits into
vulcand:masterfrom
bensynapse:fix-buffer-default-status
Oct 8, 2026
Merged

ldez merged 2 commits into
vulcand:masterfrom
bensynapse:fix-buffer-default-status

Conversation

@bensynapse

@bensynapse bensynapse commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Wrapping a handler that only calls Write, or returns without writing, leaves the buffered response status at zero. Buffer then calls WriteHeader(0) and panics.

Each response buffer now starts with HTTP 200. Explicit statuses still override that value, and retry predicates see the default status for every attempt.

Eight regression cases cover implicit responses, HEAD requests and status-based retries. All eight panic with the original source.

@ldez
ldez self-requested a review October 8, 2026 01:03
@ldez ldez added the bug label Oct 8, 2026
@ldez
ldez force-pushed the fix-buffer-default-status branch from c5962af to 6f7c6ef Compare October 8, 2026 10:31
@ldez
ldez merged commit 9e525d0 into vulcand:master Oct 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants