forked from quic-go/quic-go
do not embed http.Server in http3.Server (#3397)
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 commit is contained in:
@@ -87,18 +87,14 @@ var _ = Describe("HTTP3 Server hotswap test", func() {
|
||||
})
|
||||
|
||||
server1 = &http3.Server{
|
||||
Server: &http.Server{
|
||||
Handler: mux1,
|
||||
TLSConfig: testdata.GetTLSConfig(),
|
||||
},
|
||||
Handler: mux1,
|
||||
TLSConfig: testdata.GetTLSConfig(),
|
||||
QuicConfig: getQuicConfig(&quic.Config{Versions: versions}),
|
||||
}
|
||||
|
||||
server2 = &http3.Server{
|
||||
Server: &http.Server{
|
||||
Handler: mux2,
|
||||
TLSConfig: testdata.GetTLSConfig(),
|
||||
},
|
||||
Handler: mux2,
|
||||
TLSConfig: testdata.GetTLSConfig(),
|
||||
QuicConfig: getQuicConfig(&quic.Config{Versions: versions}),
|
||||
}
|
||||
|
||||
|
||||
@@ -68,10 +68,8 @@ var _ = Describe("HTTP tests", func() {
|
||||
})
|
||||
|
||||
server = &http3.Server{
|
||||
Server: &http.Server{
|
||||
Handler: mux,
|
||||
TLSConfig: testdata.GetTLSConfig(),
|
||||
},
|
||||
Handler: mux,
|
||||
TLSConfig: testdata.GetTLSConfig(),
|
||||
QuicConfig: getQuicConfig(&quic.Config{Versions: versions}),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user