ooni-probe-cli/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
..
atomicx doc: cleanup and improve for recently moved pkgs (#354) 2021-06-04 11:39:00 +02:00
cmd fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +02:00
engine fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +02:00
fsx doc: cleanup and improve for recently moved pkgs (#354) 2021-06-04 11:39:00 +02:00
humanize refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
iox fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +02:00
kvstore doc: cleanup and improve for recently moved pkgs (#354) 2021-06-04 11:39:00 +02:00
multierror doc: cleanup and improve for recently moved pkgs (#354) 2021-06-04 11:39:00 +02:00
ooapi fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +02:00
platform doc: improve and reference existing bug in the code (#356) 2021-06-04 12:50:23 +02:00
ptx fix(all): introduce and use iox.ReadAllContext (#379) 2021-06-15 11:57:40 +02:00
randx doc: improve and reference existing bug in the code (#356) 2021-06-04 12:50:23 +02:00
runtimex refactor: flatten and separate (#353) 2021-06-04 10:34:18 +02:00
shellx cleanup(shellx): do not directly depend on apex/log (#357) 2021-06-04 14:02:18 +02:00
tunnel refactor: move tunnel pkg down one level (#358) 2021-06-04 15:15:41 +02:00
version chore: we are now at 3.11.0-alpha (#361) 2021-06-08 10:08:13 +02:00
README.md doc: ensure all top dirs have an explanatory README (#214) 2021-02-03 16:54:00 +01:00

Directory github.com/ooni/probe-cli/internal

This directory contains private Go packages.