-
-
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
do not embed http.Server in http3.Server #3397
do not embed http.Server in http3.Server #3397
Conversation
e3bce42
to
159d4ae
Compare
What's the motivation for this PR? |
@marten-seemann IMO, the current implementation is misleading since most of the options in net/http.Server do not apply to http3, and if they do, they may have different meaning (e.g. http.Server.Addr defaults to ":http" for HTTP/1 and HTTP/2, but HTTP/3 uses ":https"). Before this change, a user had to read the implementation to find knobs that http3.Server supports (and uses from http.Server struct). |
This change removes the embedded http.Server struct from http3.Server. It slightly changes some error behavior, in particular, it mandates TLSConfig for methods that create QUIC listeners. Before this change, only Addr, TLSConfig, Handler and MaxHeaderBytes options were used from the http.Server. These are now defined directly in http3.Server with an improved documentation.
159d4ae
to
3e7679d
Compare
I think this makes sense. We don't really use most of the fields of the |
Codecov Report
@@ Coverage Diff @@
## master #3397 +/- ##
==========================================
+ Coverage 85.36% 85.39% +0.02%
==========================================
Files 135 135
Lines 9928 9930 +2
==========================================
+ Hits 8475 8479 +4
+ Misses 1068 1067 -1
+ Partials 385 384 -1
Continue to review full report at Codecov.
|
This change removes the embedded http.Server struct from http3.Server. It slightly changes some error behavior, in particular, it mandates TLSConfig for methods that create QUIC listeners. Before this change, only Addr, TLSConfig, Handler and MaxHeaderBytes options were used from the http.Server. These are now defined directly in http3.Server with an improved documentation.
This change removes the embedded http.Server struct from http3.Server. It slightly changes some error behavior, in particular, it mandates TLSConfig for methods that create QUIC listeners. Before this change, only Addr, TLSConfig, Handler and MaxHeaderBytes options were used from the http.Server. These are now defined directly in http3.Server with an improved documentation.
This change removes the embedded http.Server struct from http3.Server. It slightly changes some error behavior, in particular, it mandates TLSConfig for methods that create QUIC listeners.
Before this change, only Addr, TLSConfig, Handler and MaxHeaderBytes options were used from the http.Server. These are now defined directly in http3.Server with an improved documentation.