ooni-probe-cli/cmd/ooniprobe/internal
Simone Basso 0fdc9cafb5
fix(all): introduce and use iox.ReadAllContext (#379)
* fix(all): introduce and use iox.ReadAllContext

This improvement over the ioutil.ReadAll utility returns early
if the context expires. This enables us to unblock stuck code in
case there's censorship confounding the TCP stack.

See https://github.com/ooni/probe/issues/1417.

Compared to the functionality postulated in the above mentioned
issue, I choose to be more generic and separate limiting the
maximum body size (not implemented here) from using the context
to return early when reading a body (or any other reader).

After implementing iox.ReadAllContext, I made sure we always
use it everywhere in the tree instead of ioutil.ReadAll.

This includes many parts of the codebase where in theory we don't
need iox.ReadAllContext. Though, changing all the places makes
checking whether we're not using ioutil.ReadAll where we should
not be using it easy: `git grep` should return no lines.

* Update internal/iox/iox_test.go

* fix(ndt7): treat context errors as non-errors

The rationale is explained by the comment documenting reduceErr.

* Update internal/engine/experiment/ndt7/download.go
2021-06-15 11:57:40 +02:00
..
autorun cleanup(shellx): do not directly depend on apex/log (#357) 2021-06-04 14:02:18 +02:00
cli Add support for tracking the is_uploaded status in the results table (#312) 2021-04-30 17:08:16 +02:00
config feat(ooniprobe): introduce websites_max_runtime (#273) 2021-03-30 11:16:12 +02:00
database fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +02:00
enginex chore: merge probe-engine into probe-cli (#201) 2021-02-02 12:05:47 +01:00
log/handlers fix(ooniprobe): send batch output to stdout (#261) 2021-03-24 11:39:45 +01:00
nettests refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
ooni refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
oonitest feat: create tunnel inside NewSession (#286) 2021-04-05 15:28:13 +02:00
output Add support for tracking the is_uploaded status in the results table (#312) 2021-04-30 17:08:16 +02:00
utils More progress towards release v3.10.0 (#320) 2021-04-29 15:59:53 +02:00