Thomas de Zeeuw
41f99578a5
refactor(dependencies): update to socket2 v0.4.0 ( #2472 )
2021-03-22 15:16:31 -07:00
Vincent Ricard
48fdaf1606
fix(headers): Support multiple Content-Length values on same line ( #2471 )
...
Closes #2470
2021-03-19 10:38:58 -07:00
Danilo Bargen
eb0e718696
docs(body): add links to to_bytes and aggregate ( #2464 )
...
Since these two functions are not methods on the `Body`, they aren't
very discoverable. So a note in the docs would definitely be helpful.
2021-03-15 15:40:28 -07:00
kolapapa
297a068454
docs(examples): upgrade tokio version ( #2456 )
2021-03-10 10:00:39 -08:00
0x79756b69
34085afef6
docs(examples): use hyper v0.14 and full feature ( #2451 )
2021-03-08 14:19:24 -08:00
Peter Smit
8cbf9527df
fix(server): skip automatic Content-Length headers when not allowed ( #2216 )
...
Closes #2215
2021-03-04 17:03:33 -08:00
Sean McArthur
f162ca2f2f
docs(ffi): generate FFI documentation ( #2447 )
2021-02-26 19:00:37 -08:00
ty
4c946af49c
feat(server): add AddrIncoming::from_listener constructor ( #2439 )
2021-02-22 16:18:38 -08:00
CfirTsabari
a60280873b
refactor(ffi): Removed need for cbindgen type renames ( #2442 )
...
Fixes hyperium/hyper#2428
2021-02-22 16:12:06 -08: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
David Pedersen
6efc1a1cce
docs(server): add server example using tower::make::Shared ( #2440 )
...
`tower` 0.4.5 introduced `Shared` which is a `MakeService` that produces
services by cloning an inner service. This works quite well with `hyper`
if your service doesn't need the incoming connection and implements
`Clone`.
However that might not be entirely obvious so I thought it made sense to
add an example to the docs.
I wasn't quite sure if the example should go in the server or service
module docs but since there already is an example using
`make_service_fn` in the server docs I opted to add it there. Let me
know if you'd rather have it somewhere else.
2021-02-19 13:50:43 -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
Arnavion
42587059e6
docs(server): use cfg_feature! on hyper::server::conn::tcp instead of #[cfg]
...
This is required to surface the required feature (`tcp`) in the generated docs
for `hyper::server::conn::{AddrIncoming, AddrStream}`. Before this change,
their docs only mentioned the features needed for the `hyper::server::conn` mod
itself.
Fixes #2425
2021-02-09 13:31:41 -08:00
Taiki Endo
dfa1bb291d
chore(ci): use --feature-powerset --depth 2 in features check
2021-02-06 07:36:04 -08:00
Taiki Endo
95ce96048c
test(http1): fix non_fmt_panic warning ( #2424 )
2021-02-06 07:20:01 -08:00
Sean McArthur
196d9bd69c
v0.14.4
2021-02-05 15:54:38 -08:00
Sean McArthur
4445e736ba
refactor(client): fix unused Pin import without http2
2021-02-05 15:51:56 -08:00
Sean McArthur
7390f026d7
Revert "refactor(lib): Switch from pin-project to pin-project-lite"
...
This reverts commit 43412a950f .
2021-02-05 15:51:56 -08:00
Sean McArthur
48d4594930
v0.14.3
2021-02-05 14:11:35 -08:00
Sean McArthur
8f93123efe
fix(http1): fix server misinterpretting multiple Transfer-Encoding headers
...
When a request arrived with multiple `Transfer-Encoding` headers, hyper
would check each if they ended with `chunked`. It should have only
checked if the *last* header ended with `chunked`.
See https://github.com/hyperium/hyper/security/advisories/GHSA-6hfq-h8hq-87mf
2021-02-05 14:10:02 -08:00
Michal 'vorner' Vaner
4d2125c67c
perf(body): specialize BufList::copy_to_bytes ( #2413 )
...
Some implementations of the Buf trait have an optimized version (for
example Bytes) of copy_to_bytes, opportunistically use that one.
2021-02-02 17:09:06 -08:00
Michal 'vorner' Vaner
5e8238c1b8
docs(body): warn about no length check in aggregate ( #2415 )
...
The to_bytes and aggregate don't check how long the body is, so the user
better be aware.
Relates to #2414 .
2021-02-02 09:34:40 -08:00
Jonas Platte
43412a950f
refactor(lib): Switch from pin-project to pin-project-lite
2021-01-28 14:09:53 -08:00
Jonas Platte
9dff00425d
refactor(lib): Use cfg(all(...)) instead of multiple cfg attributes
2021-01-28 14:09:53 -08:00
Ivan Nikulin
2c8121f173
fix(client): HTTP/1 client "Transfer-Encoding" repair code would panic ( #2410 )
...
Closes #2409
2021-01-26 10:36:58 -08:00
Sean McArthur
1928682b33
feat(ffi): add HYPERE_INVALID_PEER_MESSAGE error code for parse errors
2021-01-20 15:10:19 -08:00
Paolo Barbolini
237b2ce083
refactor(lib): Remove useless uses of Pin ( #2405 )
2021-01-19 14:51:34 -08:00
erikdesjardins
9956587f83
feat(body): reexport hyper::body::SizeHint ( #2404 )
2021-01-19 14:50:07 -08:00
Mike Roelens
ec2fd4a15f
docs(client): fix typo in httpbin.org domain ( #2406 )
2021-01-19 08:30:17 -08:00
nickelc
f821ecdd19
docs(body): set doc_cfg attribute for Body::wrap_stream ( #2403 )
2021-01-15 16:24:03 -08:00
Abdullah Eryuzlu
bf8d74ad1c
feat(body): add send_trailers to Body channel's Sender ( #2387 )
...
Closes #2260
2021-01-15 10:14:21 -08:00
nickelc
257d6a9919
docs(server): set doc_cfg attributes for tcp feature gated Server methods ( #2401 )
2021-01-14 13:56:49 -08:00
Taiki Endo
f0ddb66932
refactor(lib): apply unreachable_pub lint ( #2400 )
...
Closes #2390
2021-01-14 09:57:55 -08:00
Markus Westerlind
a15f3f7f0f
refactor(client): minimize the amount of instantiated code ( #2391 )
...
* Halve the amount of conn_task instantiations
* Extract non-generic parts of client::handshake
* Extract the non-generic parts of call_async
2021-01-12 16:18:22 -08:00
Sean McArthur
446dd2f0c7
chore(security): add a SECURITY.md policy ( #2395 )
2021-01-12 14:45:10 -08:00
Sean McArthur
c9c46ed60b
refactor(ffi): Add Reason-Phrase API
...
This adds an internal ability to copy the HTTP/1 reason-phrase and place
it in the `http::Extensions` of a response, if it doesn't match the
canonical reason. This could be exposed in the Rust API later, but for
now it is only used by the C API.
2021-01-08 10:25:53 -08:00
Sean McArthur
4c32daeea0
refactor(ffi): Add HeaderCaseMap preserving http1 header casing
2021-01-08 10:25:53 -08:00
Sean McArthur
3ae1581a53
feat(ffi): Initial C API for hyper
2021-01-08 10:25:53 -08:00
Sean McArthur
8861f9a786
v0.14.2
2020-12-29 10:51:50 -08:00
Kirill Fomichev
a6d4fcbee6
feat(server): expose Accept without httpX features ( #2382 )
2020-12-29 10:19:57 -08:00
Maxim Zhukov
510b998ff3
chore(dev-dependencies): bump url to 2.2 ( #2379 )
2020-12-28 15:52:28 -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
Sean McArthur
3d6bdbe850
v0.14.1
2020-12-23 13:01:14 -08:00
Sean McArthur
c97a106125
docs(lib): enable doc_cfg on docs.rs builds ( #2372 )
2020-12-23 12:55:28 -08:00
Sean McArthur
c784a10174
v0.14.0
2020-12-23 10:58:04 -08:00
Sean McArthur
fad42acc79
feat(lib): Upgrade to Tokio 1.0 ( #2369 )
...
Closes #2370
2020-12-23 10:36:12 -08:00
Abdullah Eryuzlu
dad5c8792f
fix(client): log socket option errors instead of returning error ( #2361 )
...
Closes #2359
2020-12-23 07:41:04 -08:00
Pankaj Chaudhary
3b3077da1f
refactor(http1): updated Encoder/Decoder match with the matches macro ( #2368 )
2020-12-22 10:50:57 -08:00
Pawan Singh Bisht
6c593c2925
refactor(error): use matches! macro in Error::is_* methods ( #2367 )
2020-12-21 12:25:47 -08:00
Alex Rebert
1dd761c87d
fix(http1): ignore chunked trailers ( #2357 )
...
Previously, hyper returned an "Invalid chunk end CR" error on chunked
responses with trailers, as described in RFC 7230 Section 4.1.2. This
commit adds code to ignore the trailers.
Closes #2171
2020-12-15 14:23:07 -08:00