Commit 85e39f83 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: also clone DynamicRecordSizingDisabled in cloneTLSConfig

Updates #15771

Change-Id: I5dad96bdca19d680dd00cbd17b72a03e43eb557e
Reviewed-on: https://go-review.googlesource.com/23283Reviewed-by: default avatarTom Bergan <tombergan@google.com>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
parent be1b9306
...@@ -2005,25 +2005,27 @@ func cloneTLSConfig(cfg *tls.Config) *tls.Config { ...@@ -2005,25 +2005,27 @@ func cloneTLSConfig(cfg *tls.Config) *tls.Config {
return &tls.Config{} return &tls.Config{}
} }
return &tls.Config{ return &tls.Config{
Rand: cfg.Rand, Rand: cfg.Rand,
Time: cfg.Time, Time: cfg.Time,
Certificates: cfg.Certificates, Certificates: cfg.Certificates,
NameToCertificate: cfg.NameToCertificate, NameToCertificate: cfg.NameToCertificate,
GetCertificate: cfg.GetCertificate, GetCertificate: cfg.GetCertificate,
RootCAs: cfg.RootCAs, RootCAs: cfg.RootCAs,
NextProtos: cfg.NextProtos, NextProtos: cfg.NextProtos,
ServerName: cfg.ServerName, ServerName: cfg.ServerName,
ClientAuth: cfg.ClientAuth, ClientAuth: cfg.ClientAuth,
ClientCAs: cfg.ClientCAs, ClientCAs: cfg.ClientCAs,
InsecureSkipVerify: cfg.InsecureSkipVerify, InsecureSkipVerify: cfg.InsecureSkipVerify,
CipherSuites: cfg.CipherSuites, CipherSuites: cfg.CipherSuites,
PreferServerCipherSuites: cfg.PreferServerCipherSuites, PreferServerCipherSuites: cfg.PreferServerCipherSuites,
SessionTicketsDisabled: cfg.SessionTicketsDisabled, SessionTicketsDisabled: cfg.SessionTicketsDisabled,
SessionTicketKey: cfg.SessionTicketKey, SessionTicketKey: cfg.SessionTicketKey,
ClientSessionCache: cfg.ClientSessionCache, ClientSessionCache: cfg.ClientSessionCache,
MinVersion: cfg.MinVersion, MinVersion: cfg.MinVersion,
MaxVersion: cfg.MaxVersion, MaxVersion: cfg.MaxVersion,
CurvePreferences: cfg.CurvePreferences, CurvePreferences: cfg.CurvePreferences,
DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled,
Renegotiation: cfg.Renegotiation,
} }
} }
...@@ -2036,24 +2038,25 @@ func cloneTLSClientConfig(cfg *tls.Config) *tls.Config { ...@@ -2036,24 +2038,25 @@ func cloneTLSClientConfig(cfg *tls.Config) *tls.Config {
return &tls.Config{} return &tls.Config{}
} }
return &tls.Config{ return &tls.Config{
Rand: cfg.Rand, Rand: cfg.Rand,
Time: cfg.Time, Time: cfg.Time,
Certificates: cfg.Certificates, Certificates: cfg.Certificates,
NameToCertificate: cfg.NameToCertificate, NameToCertificate: cfg.NameToCertificate,
GetCertificate: cfg.GetCertificate, GetCertificate: cfg.GetCertificate,
RootCAs: cfg.RootCAs, RootCAs: cfg.RootCAs,
NextProtos: cfg.NextProtos, NextProtos: cfg.NextProtos,
ServerName: cfg.ServerName, ServerName: cfg.ServerName,
ClientAuth: cfg.ClientAuth, ClientAuth: cfg.ClientAuth,
ClientCAs: cfg.ClientCAs, ClientCAs: cfg.ClientCAs,
InsecureSkipVerify: cfg.InsecureSkipVerify, InsecureSkipVerify: cfg.InsecureSkipVerify,
CipherSuites: cfg.CipherSuites, CipherSuites: cfg.CipherSuites,
PreferServerCipherSuites: cfg.PreferServerCipherSuites, PreferServerCipherSuites: cfg.PreferServerCipherSuites,
ClientSessionCache: cfg.ClientSessionCache, ClientSessionCache: cfg.ClientSessionCache,
MinVersion: cfg.MinVersion, MinVersion: cfg.MinVersion,
MaxVersion: cfg.MaxVersion, MaxVersion: cfg.MaxVersion,
CurvePreferences: cfg.CurvePreferences, CurvePreferences: cfg.CurvePreferences,
Renegotiation: cfg.Renegotiation, DynamicRecordSizingDisabled: cfg.DynamicRecordSizingDisabled,
Renegotiation: cfg.Renegotiation,
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment