-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: add compatibility with net/http.ResponseController #3790
http3: add compatibility with net/http.ResponseController #3790
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3790 +/- ##
==========================================
+ Coverage 84.23% 84.26% +0.03%
==========================================
Files 142 140 -2
Lines 14084 14046 -38
==========================================
- Hits 11863 11835 -28
+ Misses 1801 1793 -8
+ Partials 420 418 -2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a better way to test this? All you're currently testing is that the response writer exposes the deadline functions.
Should we have an integration test in integrationtests/self/http_test.go
?
@marten-seemann better integration tests added (I also tested manually that this patch works well with Mecure and Caddy). |
ca38368
to
e0f4cc7
Compare
Thank you @dunglas! |
Go 1.20 added a new
"net/http".ResponseController
type that allows, among other things, to set per-request timeouts.This patch adds support for this new type. It is necessary for caddyserver/caddy#5509 and dunglas/mercure#764.