Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do no try to write 204/304 body if present #390

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

danielgtaylor
Copy link
Owner

This fixes a bug for some routers & Go versions where attempting to write a body after a status code of 204 No Content or 304 Not Modified have been sent results in a panic.

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.60%. Comparing base (00fc8c3) to head (e568619).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #390   +/-   ##
=======================================
  Coverage   92.60%   92.60%           
=======================================
  Files          21       21           
  Lines        3515     3516    +1     
=======================================
+ Hits         3255     3256    +1     
  Misses        221      221           
  Partials       39       39           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danielgtaylor danielgtaylor merged commit e66ddf3 into main Apr 19, 2024
5 checks passed
@danielgtaylor danielgtaylor deleted the fix-204-304-body branch April 19, 2024 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant