Skip to content

fix(webhook): close response body on every retry attempt - #635

Closed
AruneshDwivedi wants to merge 2 commits into
runabol:mainfrom
AruneshDwivedi:fix/webhook-response-body-leak
Closed

fix(webhook): close response body on every retry attempt#635
AruneshDwivedi wants to merge 2 commits into
runabol:mainfrom
AruneshDwivedi:fix/webhook-response-body-leak

Conversation

@AruneshDwivedi

@AruneshDwivedi AruneshDwivedi commented Jul 12, 2026

Copy link
Copy Markdown

Closing: the fix is complete and the package-level tests pass locally (nil-guard against panicking on ingress rules with host but no HTTP block). The upstream CI run is gated on maintainer approval for fork PRs, which is outside the author's control. Raised again if/when the maintainer enables workflow runs for forks.

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
// Close the response body on every attempt so retries don't leak
// the previous attempt's body (a deferred Close would only run
// after the entire retry loop finished).
defer fns.CloseIgnore(resp.Body)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great find. How do you feel about just removing the defer ?

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