Commit Graph

22 Commits

Author SHA1 Message Date
4JX
db6c602667 Add more SETTINGS frame options 2022-10-21 17:31:16 +02:00
Ilya Trefilov
4fcfe1f4ba docs(client): Add tcp feature for Client::new docs
added cfg attr to denote required tcp feature in docs for Client::new method

Closes: #2759
2022-02-15 15:23:15 -08:00
Anthony Ramine
1f0c177b35 feat(http1): implement obsolete line folding (#2734)
The client now has an option to allow parsing responses with obsolete line folding in headers. The option is off by default, since the spec recommends to reject such things if you can.
2022-02-09 12:59:23 -08:00
Sean McArthur
bff977b73c feat(http2): add http2_max_send_buf_size option to client and server
This value is like a high-water mark. It applies per stream. Once a
stream has buffered that amount of bytes to send, it won't poll more
data from the `HttpBody` until the stream has been able to flush under
it.
2021-12-09 10:06:14 -08:00
Sean McArthur
a1502e1067 docs(http1): clarify HTTP1 preserve case option 2021-11-16 11:44:21 -08:00
Anthony Ramine
80627141ed feat(http1): Add http1_writev(bool) to client and server Builders
Restore a way to force queue writing strategy.

Closes #2676
2021-11-04 15:29:43 -07:00
Alice Ryhl
bd6c35b98f fix(client): make ResponseFuture implement Sync 2021-10-18 10:25:27 -07:00
Jonas Platte
a81c44f2c8 refactor(lib): Import tracing macros per-module
Instead of one #[macro_use] at the crate root.
2021-08-31 16:35:52 -07:00
Aaron Turon
73bff4e98c feat(client): expose http09 and http1 options on client::conn::Builder (#2611)
These options are currently available on the high-level builder only.

Along the way, rename the setters to follow the public API conventions
and add docs.

Closes #2461
2021-08-04 13:52:35 -07:00
Anthony Ramine
52214f391c fix(client): retry when pool checkout returns closed HTTP2 connection (#2585)
When http2_only is true, we never try to open a new connection if there
is one open already, which means that if the existing connection that
gets checked out of the pool is closed, then the request won't happen.
2021-07-20 17:06:09 -07:00
Anthony Ramine
5442b6fadd feat(http2): Implement Client-side CONNECT support over HTTP/2 (#2523)
Closes #2508
2021-05-24 18:20:44 +00:00
Geoffry Song
be9677a1e7 feat(http2): allow HTTP/2 requests by ALPN when http2_only is unset (#2527) 2021-05-19 10:01:20 -07:00
boxdot
b9916c4101 feat(client): allow to config http2 max concurrent reset streams (#2535)
Setting streams to 0 makes h2 work on wasm platforms without a
`Instant::now` implementation.
2021-05-13 01:24:41 +00:00
David Pedersen
e79d09396d docs(client): document the guarantees of cloning a Client (#2540)
Small docs improvement to mention that cloning a `Client` is cheap and
will reuse the connection pool.

Fixes https://github.com/hyperium/hyper/issues/2239
2021-05-06 13:48:53 -07:00
Anthony Ramine
dbea7716f1 feat(http1): add options to preserve header casing (#2480)
Decouple preserving header case from FFI:

The feature is now supported in both the server and the client
and can be combined with the title case feature, for headers
which don't have entries in the header case map.

Closes #2313
2021-04-21 09:50:35 -07:00
Anthony Ramine
11345394d9 feat(client): add option to allow misplaced spaces in HTTP/1 responses (#2506) 2021-04-20 14:17:48 -07:00
Anthony Ramine
68d4e4a3db feat(client): allow HTTP/0.9 responses behind a flag (#2473)
Fixes #2468
2021-03-26 11:25:00 -07:00
Vagelis Prokopiou
51ed71b0a6 docs(client): use Method::POST to match the example in https://hyper.rs/guides/client/advanced/ (#2479) 2021-03-25 13:34:03 -07:00
CfirTsabari
0b11eee9bd fix(client): omit default port from automatic Host headers (#2441)
Fixes hyperium/hyper#2407
2021-02-22 11:33:28 -08:00
Markus Westerlind
f01de8e503 refactor(client): Use async/await more (#2437)
* refactor: Use async/await in client.rs

* refactor: Simplify client.rs a bit more

* refactor: Allow !Unpin in Lazy

* Remove some impl Future

* Remove some combinator use
2021-02-18 10:35:43 -08:00
Mike Roelens
ec2fd4a15f docs(client): fix typo in httpbin.org domain (#2406) 2021-01-19 08:30:17 -08:00
Nikhil Benesch
73a59e5fc7 feat(client): expose connect types without proto feature (#2377)
Make it possible to refer to Connected, Connection, HttpConnector, etc.
without enabling either of the http1/http2 features. This makes feature
selection work better for downstream libraries like hyper-openssl, which
don't want to commit to any particular protocol.

Fix #2376.
2020-12-28 15:50:28 -08:00