Commit Graph

34 Commits

Author SHA1 Message Date
Anthony Ramine
61b4f8fc34 Support very large headers
This completely refactors how headers are hpack-encoded.

Instead of trying to be clever, constructing frames on the go
while hpack-encoding, we just make a blob of all the
hpack-encoded headers first, and then we split that blob
in as many frames as necessary.
2021-09-08 10:20:30 -07:00
Anthony Ramine
5c72713e2a Remove panic (fixes #395) (#541)
I don't even understand why that should panic, what's wrong with values
greater than 0x0fff_ffff? If we truly wish to avoid very large dynamic
tables, we should do so when we get the large SETTINGS_HEADER_TABLE_SIZE
value, not when encoding it.
2021-05-06 06:26:01 -07:00
Josh Soref
bcaaaf6dd9 Spelling fixes in comments (#508) 2021-02-25 08:59:18 -08:00
Paolo Barbolini
5a92f256c0 Upgrade to bytes 0.6 (#497)
* Upgrade to bytes 0.6

* Update Cargo.toml

Co-authored-by: Eliza Weisman <eliza@buoyant.io>

* Update tests/h2-support/Cargo.toml

Co-authored-by: Eliza Weisman <eliza@buoyant.io>

Co-authored-by: Eliza Weisman <eliza@buoyant.io>
2020-11-19 14:38:56 -08:00
Eliza Weisman
fc7f63f641 start adding tracing spans to internals (#478)
We've adopted `tracing` for diagnostics, but currently, it is just being
used as a drop-in replacement for the `log` crate. Ideally, we would
want to start emitting more structured diagnostics, using `tracing`'s
`Span`s and structured key-value fields.

A lot of the logging in `h2` is already written in a style that imitates
the formatting of structured key-value logs, but as textual log
messages. Migrating the logs to structured `tracing` events therefore is
pretty easy to do. I've also started adding spans, mostly in the read
path.

Finally, I've updated the tests to use `tracing` rather than
`env_logger`. The tracing setup happens in a macro, so that a span for
each test with the test's name can be generated and entered. This will
make the test output easier to read if multiple tests are run
concurrently with `--nocapture`.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2020-08-17 17:29:22 -07:00
Sean McArthur
e41a1f130c Respect SETTINGS_HEADER_TABLE_SIZE (#459) 2020-03-30 11:53:22 -07:00
Sean McArthur
4398e169e8 Update to Tokio 0.2 (#428) 2019-11-27 14:53:57 -08:00
Gurwinder Singh
f46840f3fa chore: cargo fmt, clippy 2019-08-16 22:27:39 -07:00
Jakub Beránek
db6b841e67 Update crate to Rust 2018 (#383) 2019-07-23 10:18:43 -07:00
Sean McArthur
dabd58fd58 use newest hpack index when repeating a header name 2019-05-15 13:32:07 -07:00
Sean McArthur
fc2fb487ea record last index when starting to encode a CONTINUATION frame 2019-05-15 13:32:07 -07:00
Sean McArthur
f7d14861e5 rustfmt: add trailing commas in match arms, set fn call to block stle (#85) 2017-09-12 19:29:06 -07:00
Oliver Gould
897bf84163 Use rustfmt to enforce consistent formatting
This change adds a .rustfmt.toml that includes ALL supported settings,
12 of which we have overridden to attempt to cater to our own
proclivities.

rustfmt is checked in the rust-nightly CI job.
2017-09-12 22:29:35 +00:00
Carl Lerche
9d45255c75 H2 headers must be lower case 2017-08-30 18:16:21 -04:00
Carl Lerche
b0e6867877 Fix warnings 2017-08-24 15:52:01 -07:00
Carl Lerche
a7b92d5ec2 Restructure hpack tests 2017-06-29 23:11:35 -07:00
Carl Lerche
fee43a09c8 Fix warnings 2017-06-27 12:23:57 -07:00
Carl Lerche
29951da962 FramedWrite 2017-06-19 13:34:08 -07:00
Carl Lerche
327ca79550 More header encoding work 2017-06-19 11:53:03 -07:00
Carl Lerche
b4c3161d74 A bunch of work 2017-06-16 21:45:44 -07:00
Carl Lerche
f6fd6a6d6e Bunch of work 2017-06-16 16:37:51 -07:00
Carl Lerche
c12a9a86ae Don't allocate on each call to huffman decode 2017-06-13 14:39:39 -07:00
Carl Lerche
ab8eac6c05 Remove extra debug_assert 2017-06-13 13:55:05 -07:00
Carl Lerche
c7de880f6c More bug fixes 2017-06-13 13:46:45 -07:00
Carl Lerche
fa53d9556b Fuzz HPACK 2017-06-09 12:06:38 -07:00
Carl Lerche
42f19f3006 Get encoder & decoder working 2017-06-07 21:54:04 -07:00
Carl Lerche
7ffc574da8 Add another encoder test 2017-06-06 14:57:51 -07:00
Carl Lerche
a9e900a5e2 More HPACK encoder changes 2017-06-06 14:51:03 -07:00
Carl Lerche
5c30ef30ec More HPACK encoding work 2017-06-05 15:03:04 -07:00
Carl Lerche
a7da819e45 More encoding work 2017-06-02 14:33:09 -07:00
Carl Lerche
2f8095e71a WIP 2017-06-02 12:41:39 -07:00
Carl Lerche
e41349572a Add huffman encoding 2017-06-01 12:35:20 -07:00
Carl Lerche
59bc8a9a7e work 2017-03-12 13:44:38 -07:00
Carl Lerche
769f3f142f More work 2017-03-11 12:59:15 -08:00