ooni-probe-cli/internal/netxlite
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Simone Basso deb1589bdb
fix(netxlite): do not mutate outgoing requests (#508)
I have recently seen a data race related our way of
mutating the outgoing request to set the host header.

Unfortunately, I've lost track of the race output,
because I rebooted my Linux box before saving it.

Though, after inspecting why and and where we're mutating
outgoing requets, I've found that:

1. we add the host header when logging to have it logged,
which is not a big deal since we already emit the URL
rather than just the URL path when logging a request, and
so we can safely zap this piece of code;

2. as a result, in measurements we may omit the host header
but again this is pretty much obvious from the URL itself
and so it should not be very important (nonetheless,
avoid surprises and keep the existing behavior);

3. when the User-Agent header is not set, we default to
a `miniooni/0.1.0-dev` user agent, which is probably not
very useful anyway, so we can actually remove it.

Part of https://github.com/ooni/probe/issues/1733 (this diff
has been extracted from https://github.com/ooni/probe-cli/pull/506).
2021-09-27 13:35:47 +02:00
..
dnsx refactor(netx): move dns transports in netxlite/dnsx (#503) 2021-09-09 21:24:27 +02:00
errorsx fix(quic): properly unwrap OONI errors from TransportError (#495) 2021-09-09 00:07:38 +02:00
internal/gencertifi refactor(errorsx): improve errno generating code (#473) 2021-09-07 14:25:42 +02:00
iox refactor(netxlite/iox): group tests and avoid races (#484) 2021-09-07 22:41:34 +02:00
mocks refactor(netx/resolver): add CloseIdleConnections to RoundTripper (#501) 2021-09-09 20:49:12 +02:00
quicx refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
certifi.go refactor(errorsx): improve errno generating code (#473) 2021-09-07 14:25:42 +02:00
certifi_test.go netxlite: improve docs, tests, and code quality (#493) 2021-09-08 21:19:51 +02:00
dialer.go feat(netxlite): introduce wrapping constructors (#507) 2021-09-27 12:00:43 +02:00
dialer_test.go netxlite: improve docs, tests, and code quality (#493) 2021-09-08 21:19:51 +02:00
doc.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00
http.go fix(netxlite): do not mutate outgoing requests (#508) 2021-09-27 13:35:47 +02:00
http3.go fix(netxlite): http3 transport needs logging by default (#492) 2021-09-08 20:49:01 +02:00
http3_test.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00
http_test.go fix(netxlite): do not mutate outgoing requests (#508) 2021-09-27 13:35:47 +02:00
integration_test.go refactor: migrate apitool from netx to netxlite (#496) 2021-09-09 01:19:17 +02:00
legacy.go fix(netxlite): do not mutate outgoing requests (#508) 2021-09-27 13:35:47 +02:00
legacy_test.go refactor(netxlite): finish grouping tests (#488) 2021-09-08 11:39:27 +02:00
logger.go refactor: move httptransport w/ logging to netxlite (#411) 2021-06-26 18:11:47 +02:00
quic.go fix(quic): properly unwrap OONI errors from TransportError (#495) 2021-09-09 00:07:38 +02:00
quic_test.go refactor: migrate apitool from netx to netxlite (#496) 2021-09-09 01:19:17 +02:00
quirks.go netxlite: improve docs, tests, and code quality (#493) 2021-09-08 21:19:51 +02:00
quirks_test.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00
resolver.go feat(netxlite): introduce wrapping constructors (#507) 2021-09-27 12:00:43 +02:00
resolver_test.go refactor: migrate apitool from netx to netxlite (#496) 2021-09-09 01:19:17 +02:00
tls.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00
tls_test.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00
utls.go netxlite: code quality, improve tests, docs (#494) 2021-09-08 22:48:10 +02:00
utls_test.go refactor(netxlite): finish grouping tests (#488) 2021-09-08 11:39:27 +02:00