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

do not embed http.Server in http3.Server #3397

Merged
merged 1 commit into from May 20, 2022

Conversation

tie
Copy link
Contributor

@tie tie commented May 1, 2022

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.

@tie tie force-pushed the http3-do-not-embed-http-server branch 3 times, most recently from e3bce42 to 159d4ae Compare May 2, 2022 10:37
@marten-seemann
Copy link
Member

What's the motivation for this PR?

@tie
Copy link
Contributor Author

tie commented May 4, 2022

@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.
@tie tie force-pushed the http3-do-not-embed-http-server branch from 159d4ae to 3e7679d Compare May 6, 2022 11:51
@marten-seemann
Copy link
Member

I think this makes sense. We don't really use most of the fields of the http.Server, so we probably shouldn't pretend that setting these values will make any difference.

@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #3397 (3e7679d) into master (0a08d62) will increase coverage by 0.02%.
The diff coverage is 78.95%.

@@            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     
Impacted Files Coverage Δ
http3/server.go 71.97% <78.95%> (+0.82%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a08d62...3e7679d. Read the comment docs.

@marten-seemann marten-seemann merged commit 0ec8ee3 into quic-go:master May 20, 2022
nmldiegues pushed a commit to chungthuang/quic-go that referenced this pull request Jun 6, 2022
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.
@MarcoPolo MarcoPolo mentioned this pull request Jul 7, 2022
41 tasks
sudarshan-reddy pushed a commit to sudarshan-reddy/quic-go that referenced this pull request Aug 9, 2022
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.
@ajnavarro ajnavarro mentioned this pull request Aug 24, 2022
72 tasks
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

3 participants