forked from quic-go/quic-go
http3: rename Settings.EnableDatagram to EnableDatagrams (#4466)
This makes it consistent with the quic.Config and the config flag on the http3.Server and http3.RoundTripper.
This commit is contained in:
@@ -212,7 +212,7 @@ func (c *connection) HandleUnidirectionalStreams(hijack func(StreamType, quic.Co
|
||||
return
|
||||
}
|
||||
c.settings = &Settings{
|
||||
EnableDatagram: sf.Datagram,
|
||||
EnableDatagrams: sf.Datagram,
|
||||
EnableExtendedConnect: sf.ExtendedConnect,
|
||||
Other: sf.Other,
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ var _ = Describe("Connection", func() {
|
||||
conn.HandleUnidirectionalStreams(nil)
|
||||
}()
|
||||
Eventually(conn.ReceivedSettings()).Should(BeClosed())
|
||||
Expect(conn.Settings().EnableDatagram).To(BeTrue())
|
||||
Expect(conn.Settings().EnableDatagrams).To(BeTrue())
|
||||
Expect(conn.Settings().EnableExtendedConnect).To(BeTrue())
|
||||
Expect(conn.Settings().Other).To(HaveKeyWithValue(uint64(1337), uint64(42)))
|
||||
Eventually(done).Should(BeClosed())
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
// Settings are HTTP/3 settings that apply to the underlying connection.
|
||||
type Settings struct {
|
||||
// Support for HTTP/3 datagrams (RFC 9297)
|
||||
EnableDatagram bool
|
||||
EnableDatagrams bool
|
||||
// Extended CONNECT, RFC 9220
|
||||
EnableExtendedConnect bool
|
||||
// Other settings, defined by the application
|
||||
|
||||
@@ -181,7 +181,7 @@ var _ = Describe("RoundTripper", func() {
|
||||
Expect(err).To(MatchError(testErr))
|
||||
})
|
||||
|
||||
It("requires quic.Config.EnableDatagram if HTTP/3 datagrams are enabled", func() {
|
||||
It("requires quic.Config.EnableDatagrams if HTTP/3 datagrams are enabled", func() {
|
||||
rt := &RoundTripper{
|
||||
QUICConfig: &quic.Config{EnableDatagrams: false},
|
||||
EnableDatagrams: true,
|
||||
|
||||
@@ -167,7 +167,7 @@ type Server struct {
|
||||
Handler http.Handler
|
||||
|
||||
// EnableDatagrams enables support for HTTP/3 datagrams (RFC 9297).
|
||||
// If set to true, QUICConfig.EnableDatagram will be set.
|
||||
// If set to true, QUICConfig.EnableDatagrams will be set.
|
||||
EnableDatagrams bool
|
||||
|
||||
// MaxHeaderBytes controls the maximum number of bytes the server will
|
||||
|
||||
Reference in New Issue
Block a user