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

http3: panic in ResponseWriter.WriteHeader for invalid status codes #3984

Merged
merged 5 commits into from Jul 21, 2023

Conversation

WeidiDeng
Copy link
Contributor

panic for status codes that aren't 3 digits. As there is no way to propagate this information to caller.

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #3984 (285a4d2) into master (56cd866) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3984      +/-   ##
==========================================
+ Coverage   82.92%   82.97%   +0.05%     
==========================================
  Files         146      146              
  Lines       14707    14758      +51     
==========================================
+ Hits        12195    12244      +49     
+ Misses       2022     2021       -1     
- Partials      490      493       +3     
Impacted Files Coverage Δ
http3/response_writer.go 83.33% <100.00%> (+0.31%) ⬆️

... and 7 files with indirect coverage changes

Copy link
Member

@marten-seemann marten-seemann left a comment

Choose a reason for hiding this comment

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

Is that what the standard library does? Could you add a test for this?

@WeidiDeng
Copy link
Contributor Author

For http1. For http2. Both use the same function to check status code.

@marten-seemann marten-seemann added this to the v0.37 milestone Jul 21, 2023
@marten-seemann marten-seemann changed the title response writer: panic for invalid status code http: panic in ResponseWriter.WriteHeader for invalid status codes Jul 21, 2023
@marten-seemann marten-seemann changed the title http: panic in ResponseWriter.WriteHeader for invalid status codes http3: panic in ResponseWriter.WriteHeader for invalid status codes Jul 21, 2023
@marten-seemann marten-seemann changed the title http3: panic in ResponseWriter.WriteHeader for invalid status codes http3: panic in responseWriter.WriteHeader for invalid status codes Jul 21, 2023
@marten-seemann marten-seemann changed the title http3: panic in responseWriter.WriteHeader for invalid status codes http3: panic in ResponseWriter.WriteHeader for invalid status codes Jul 21, 2023
@marten-seemann marten-seemann merged commit 2c0e7e0 into quic-go:master Jul 21, 2023
16 checks passed
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.

None yet

2 participants