Commit Graph

1334 Commits

Author SHA1 Message Date
bishtpawan
0c1e1823f8 refactor(http1): apply a few clippy suggestions
use is_empty() instead of .len()
use if let instead of match
2019-04-23 12:56:30 -07:00
Sean McArthur
f5885f3d5d chore(lib): fix unused_mut warnings from newest nightly 2019-04-23 12:45:19 -07:00
João Oliveira
8d70baca61 feat(server): impl Sink for Body::Sender
Closes #1781
2019-04-10 10:03:12 -07:00
Sean McArthur
0f33354569 v0.12.27 2019-04-10 09:44:18 -07:00
Sean McArthur
5680d94419 fix(http2): fix import of h2::Reason to work on 1.26 2019-04-09 14:06:33 -07:00
Sean McArthur
2ef562a165 v0.12.26 2019-04-09 12:52:41 -07:00
Sean McArthur
42c5efc085 fix(http2): send a GOAWAY when the user's Service::poll_ready errors
The `Error::source()` is searched for an `h2::Error` to allow sending
different error codes in the GOAWAY. If none is found, it defaults to
`INTERNAL_ERROR`.
2019-04-09 12:49:43 -07:00
Sean McArthur
c7a046c518 refactor(http1): fix redundant imports 2019-04-01 18:33:38 -07:00
Vitaly Shukela
edf551b55f feat(client,server) Add Connection::without_shutdown()
* Add `server::conn::Connection::without_shutdown`

  Returns wrapper Future instance which allows
  to use `poll_without_shutdown` method
  more ergonomically.

* Add `client::conn::Connection::without_shutdown`

  Returns wrapper Future instance which allows
  to use `poll_without_shutdown` method
  more ergonomically.

* Improve `poll_without_shutdown` docs

Closes #1786
2019-03-26 15:16:06 -07:00
Sean McArthur
fc18b680a5 feat(http2): check Error::source() for an HTTP2 error code to send in reset 2019-03-25 13:10:41 -07:00
Yusuke Sasaki
d1501a0fd3 fix(server): prohibit the length headers on successful CONNECT
Closes #1783
2019-03-20 10:06:34 -07:00
Sean McArthur
8c345d5590 v0.12.25 2019-03-01 15:04:03 -08:00
Kevin Leimkuhler
7dcd4618c0 feat(http2): Add window size config options for Client and Server
Add `fn http2_initial_stream_window_size` and `fn
http2_initial_connection_window_size` for client and server.

Closes #1771
2019-03-01 14:44:38 -08:00
Michal 'vorner' Vaner
2114950cda docs(service): change the make_service_fn example to a full snippet
Include the creation of server too. Previously, the parameter type of
the closure had a different type than the default server provided, which
wasn't obvious to the user.
2019-03-01 13:57:34 -08:00
Sean McArthur
cbae4294c4 feat(server): add http2_max_concurrent_streams builder option
Closes #1772
2019-02-28 16:19:12 -08:00
Sean McArthur
8f926a0dae fix(http2): send INTERNAL_ERROR when user's Service errors 2019-02-28 16:04:53 -08:00
Sean McArthur
3a6080b14a fix(client): coerce HTTP_2 requests to HTTP_11
Closes #1770
2019-02-27 17:00:25 -08:00
Steven Fackler
4cf22dfa21 feat(error): implement Error::source when available
Closes #1768
2019-02-27 13:18:02 -08:00
Yusuke Sasaki
0bf30ccc68 feat(service): add poll_ready to Service and MakeService (#1767) 2019-02-27 09:30:52 -08:00
Sean McArthur
ce2b540f9d chore(client): adjust dispatch giver throughput benchmark generics 2019-02-25 17:35:46 -08:00
Sean McArthur
1e6603353e perf(http2): don't register callback with main h2 client task 2019-02-25 17:27:51 -08:00
Sean McArthur
1161479945 test(client): add client benchmarks with mocked IO 2019-02-25 14:05:00 -08:00
Sean McArthur
c0e08a41cc refactor(lib): improve client and h1 logs 2019-02-15 15:58:35 -08:00
Sean McArthur
877606d5c8 feat(service): allow FnMut with service_fn 2019-02-14 11:55:22 -08:00
Sean McArthur
0c8f7d2708 v0.12.24 2019-02-11 12:10:21 -08:00
Sean McArthur
d16b2c3081 fix(client): fix panic when CONNECT request doesn't have a port 2019-02-11 12:05:52 -08:00
luben karavelov
3e9782c2a9 feat(server): add http1_max_buf_size in the server::Builder (#1761)
Similarly to `client::Builder::http1_max_buf_size`.
2019-02-11 10:47:19 -08:00
luben karavelov
e52f80df5a feat(server): add into_inner to AddrStream (#1762)
It consumes the `AddrStream` and returns the underlying TcpStream.
2019-02-11 10:45:55 -08:00
Sean McArthur
8393dc9f18 v0.12.23 2019-01-24 11:21:25 -08:00
Sean McArthur
18f022c70b docs(lib): fix several broken links throughout docs
Closes #1749
Closes #1750
2019-01-24 11:20:22 -08:00
Sean McArthur
9aa7e99010 fix(http2): revert http2 refactor causing a client hang
This reverts commit 7b7dcc8f68.
2019-01-24 11:10:19 -08:00
Alexander Mielczarek
078ed82dd5 feat(client): add conn::Builder::max_buf_size()
This allows users to configure a limit to client connections' read and
write buffers.

Closes #1748
2019-01-24 10:59:24 -08:00
Sean McArthur
4dd9437560 v0.12.22 2019-01-23 11:38:23 -08:00
Sean McArthur
c328c62ec2 fix(client): parse IPv6 hosts correctly in HttpConnector 2019-01-23 11:24:26 -08:00
Sean McArthur
7b7dcc8f68 refactor(http2): remove extra mpsc trying to work around h2 hang 2019-01-22 15:11:03 -08:00
Sean McArthur
83dad03a81 test(client): update tests for http::Uri::host fix 2019-01-22 15:02:23 -08:00
Sean McArthur
c69d1094b3 refactor(lib): replace 'try' macro with '?' 2019-01-18 14:29:12 -08:00
Sean McArthur
6bce753f32 v0.12.21 2019-01-15 10:13:25 -08:00
Lucio Franco
c809542c83 feat(client): add Destination::try_from_uri constructor
This change adds a try_from_uri function for creating Destinations
outside of the hyper crate. The Destination can only be built if the
uri contains a valid authority and scheme as these are required to
build a Destination.
2019-01-15 09:45:30 -08:00
Linus Färnstrand
be5ec45571 feat(client): Add useful trait impls to Name 2019-01-11 10:01:28 -08:00
Sean McArthur
780dead9f2 docs(lib): mention reqwest in docs homepage 2019-01-10 12:38:22 -08:00
Sean McArthur
8842da9184 docs(client): touch ups for Client, Builder, and connect types 2019-01-10 12:18:16 -08:00
Linus Färnstrand
607c4da0b9 feat(client): add FromStr impl for Name 2019-01-10 09:39:26 -08:00
Sean McArthur
ec7b93c982 v0.12.20 2019-01-07 15:04:42 -08:00
Sean McArthur
cf034e99fa fix(http2): don't consider an h2 send request error as canceled 2018-12-19 13:16:49 -08:00
Sean McArthur
5abbe59696 v0.12.19 2018-12-18 12:47:11 -08:00
Sean McArthur
1d253b4d47 fix(rt): prevent fallback reactor thread from being created accidentally
Switches from `Handle::current()` to `Handle::default()`.
2018-12-18 12:44:08 -08:00
Sean McArthur
720c068e56 v0.12.18 2018-12-11 16:14:13 -08:00
Sean McArthur
5fe2a47644 refactor(http2): fix Error::new_canceled call 2018-12-11 16:14:13 -08:00
Sean McArthur
9b69fa9740 refactor(http2): make several http2 errors more specific 2018-12-11 15:59:35 -08:00