fix(netxlite): http3 transport needs logging by default (#492)
Adapt other places where it was not using a logger to either choose a reasonable logger or disable logging for backwards compat. See https://github.com/ooni/probe/issues/1591
This commit is contained in:
parent
18b2eb37ff
commit
e68adec9a5
5 changed files with 35 additions and 16 deletions
|
|
@ -53,17 +53,20 @@ func (txp *http3Transport) CloseIdleConnections() {
|
|||
// dialer argument MUST NOT be nil. If the tlsConfig argument is nil,
|
||||
// then the code will use the default TLS configuration.
|
||||
func NewHTTP3Transport(
|
||||
dialer QUICDialer, tlsConfig *tls.Config) HTTPTransport {
|
||||
return &http3Transport{
|
||||
child: &http3.RoundTripper{
|
||||
Dial: (&http3Dialer{dialer}).dial,
|
||||
// The following (1) reduces the number of headers that Go will
|
||||
// automatically send for us and (2) ensures that we always receive
|
||||
// back the true headers, such as Content-Length. This change is
|
||||
// functional to OONI's goal of observing the network.
|
||||
DisableCompression: true,
|
||||
TLSClientConfig: tlsConfig,
|
||||
logger Logger, dialer QUICDialer, tlsConfig *tls.Config) HTTPTransport {
|
||||
return &httpTransportLogger{
|
||||
HTTPTransport: &http3Transport{
|
||||
child: &http3.RoundTripper{
|
||||
Dial: (&http3Dialer{dialer}).dial,
|
||||
// The following (1) reduces the number of headers that Go will
|
||||
// automatically send for us and (2) ensures that we always receive
|
||||
// back the true headers, such as Content-Length. This change is
|
||||
// functional to OONI's goal of observing the network.
|
||||
DisableCompression: true,
|
||||
TLSClientConfig: tlsConfig,
|
||||
},
|
||||
dialer: dialer,
|
||||
},
|
||||
dialer: dialer,
|
||||
Logger: logger,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue