ooni-probe-cli/internal/engine
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
..
experiment refactor(resolver): add CloseIdleConnections to SerialResolver (#502) 2021-09-09 20:58:04 +02:00
geolocate refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
httpheader Release 3.10.0 beta.3 (#345) 2021-05-13 08:16:28 +02:00
httpx refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
internal refactor: move bytecounter to internal (#391) 2021-06-22 13:00:29 +02:00
legacy fix(netxlite): do not mutate outgoing requests (#508) 2021-09-27 13:35:47 +02:00
mockable feat: tutorial on how to write the torsf experiment (#390) 2021-06-22 00:12:03 +02:00
model refactor: move scrubbingLogger to the scrubber pkg (#394) 2021-06-22 14:43:58 +02:00
netx fix(netxlite): do not mutate outgoing requests (#508) 2021-09-27 13:35:47 +02:00
probeservices refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
testdata fix: add missing files causing tests to fail (#202) 2021-02-02 14:18:22 +01:00
.gitignore feat: support embedding encrypted psiphon config (#285) 2021-04-02 17:36:06 +02:00
allexperiments.go cli: new testhelper and the websteps experiment prototype (#432) 2021-08-17 10:29:06 +02:00
experiment_integration_test.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
experiment_internal_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experiment_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experiment.go refactor: move bytecounter to internal (#391) 2021-06-22 13:00:29 +02:00
experimentbuilder_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
experimentbuilder.go refactor(inputloader): better docs and naming (#265) 2021-03-26 09:34:27 +01:00
inputloader_network_test.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
inputloader_test.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
inputloader.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
inputprocessor_test.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
inputprocessor.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
kvstore.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
saver_test.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
saver.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
session_integration_test.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
session_internal_test.go fix(session): make sure tunnel code is tested (#301) 2021-04-05 19:51:41 +02:00
session_nopsiphon_test.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
session_nopsiphon.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
session_psiphon_test.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
session_psiphon.go refactor(netxlite): hide details without breaking the rest of the tree (#454) 2021-09-05 14:49:38 +02:00
session.go refactor: move bytecounter to internal (#391) 2021-06-22 13:00:29 +02:00
submitter_test.go refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
submitter.go chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00