Since these futures rely on the current time when they decide when
to expire, we don't want them looking at the current time from
inside the call to runtime.spawn or after that call. Instead we'd
like them to look immediately on construction.
This approach is based on a comment from janimo on #149. It doesn't
fix#149, though.
Mainly, drop the suggestion to fetch submodules, and explain what
more things do.
(The only submodule we have now is the fuzzing corpora, which most
people won't want.)
(I am not 100% convinced that we should keep 100% of the
instructions for working with git in the long term. Do many other
projects have these? Is there a tutorial we should link to
instead?)
This commit defines a crate (tor-persist) that describes an abstract
key-value store using serde, plus an on-disk implementation using
Toml and fslock.
This patch makes path configuration and request timing options get
exposed up to the tor-client level. I'm trying `derive_build` here
so we can eventually get consistent across all our builders.
Loop into several reads because we want to short-circuit if case we're
reading too many bytes.
Added handling of allocation of `result` so we can use the "next window
buffer" for `read`. This way we can read on steps and short-circuit when
needed.
Previously the DirResponse contained a String for the output.
By changing it to a Vec<u8> the caller has to parse the Vec<u8> and deal with potential failures.
With this change `fetch_multiple`'s
`useful_responses` should also contain non-UTF-8 responses.
This will case an Err to be returned in the `download_attempt` function if the
DirResponse does not contain valid UTF-8.
This is not 100% what we'll want long term:
- We might want more kinds of events
- We'll probably want to generate them in a more reliable way
- We might want some of this mechanism to be in a crate other than
DirMgr.
But for now, let's use this as a start and get experience with it.