mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 04:37:36 +03:00
reject http3 responses that exceeded the header size limit
This commit is contained in:
parent
9294652ecc
commit
363de010ca
3 changed files with 44 additions and 3 deletions
|
@ -46,6 +46,11 @@ type RoundTripper struct {
|
|||
// If Dial is nil, quic.DialAddr will be used.
|
||||
Dial func(network, addr string, tlsCfg *tls.Config, cfg *quic.Config) (quic.Session, error)
|
||||
|
||||
// MaxResponseHeaderBytes specifies a limit on how many response bytes are
|
||||
// allowed in the server's response header.
|
||||
// Zero means to use a default limit.
|
||||
MaxResponseHeaderBytes int64
|
||||
|
||||
clients map[string]roundTripCloser
|
||||
}
|
||||
|
||||
|
@ -128,7 +133,10 @@ func (r *RoundTripper) getClient(hostname string, onlyCached bool) (http.RoundTr
|
|||
client = newClient(
|
||||
hostname,
|
||||
r.TLSClientConfig,
|
||||
&roundTripperOpts{DisableCompression: r.DisableCompression},
|
||||
&roundTripperOpts{
|
||||
DisableCompression: r.DisableCompression,
|
||||
MaxHeaderBytes: r.MaxResponseHeaderBytes,
|
||||
},
|
||||
r.QuicConfig,
|
||||
r.Dial,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue