14 Commits

Author SHA1 Message Date
Sean McArthur
0dc89680cd style(lib): run rustfmt and enforce in CI 2019-12-05 13:55:17 -08:00
Sean McArthur
b0060f277e chore(CI): enable GitHub Actions 2019-12-05 13:12:35 -08:00
Jakub Wieczorek
b831ae1870 test(server): Update and re-enable the tests/server.rs test
These tests were temporarily disabled during the migration to the
`std::future::Future` type that's part of the stable Rust now.

This commit updates the tests after the breaking changes and makes them
pass again.
2019-08-19 16:35:01 -07:00
Sean McArthur
5da17df97f chore(lib): individually disable tests and examples that aren't updated 2019-07-12 13:44:03 -07: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
Sean McArthur
7b7dcc8f68 refactor(http2): remove extra mpsc trying to work around h2 hang 2019-01-22 15:11:03 -08:00
Sean McArthur
37ec724fd6 fix(http2): add Date header if not present for HTTP2 server responses 2018-10-08 17:52:08 -07:00
Theodore Cipicchio
24f11a421d fix(http2): allow TE "trailers" request headers
The HTTP/2 spec allows TE headers in requests if the value is
"trailers". Other TE headers are still stripped.

Closes #1642
2018-08-27 10:32:53 -07:00
Sean McArthur
6530a00a8e fix(http1): reduce closed connections when body is dropped
If a user makes use of `Body::is_end_stream` to optimize so as to not
need to do make a final poll just to receive `None`, previously the
connection would not have progressed its reading state to a finished
body, and so the connection would be closed.

Now, upon reading any chunk, the connection state will check if it
can know that the body would be finished, and progresses to a body
finished state sooner.

The integration tests were amplified by adding a naive hyper proxy
as a secondary test, which happens to make use of that optimization,
and thus caught the issue.
2018-07-23 09:39:19 -07:00
Laurențiu Nicola
386fc0d70b feat(http2): set Content-Length header on outgoing messages
Closes #1547
2018-06-10 15:22:30 -07:00
Josh Leeb-du Toit
f20afba57d feat(http2): Strip connection headers before sending
Automatically removes "connection" headers before sending over HTTP2.
These headers are illegal in HTTP2, and would otherwise cause errors.

Closes: #1551
2018-06-08 17:31:22 -07:00
Sean McArthur
18f4dd2406 chore(ci): remove flaky tests from failing CI 2018-05-09 16:02:49 -07:00
Sean McArthur
c4974500ab feat(server): re-design Server as higher-level API
The `hyper::Server` is now a proper higher-level API for running HTTP
servers. There is a related `hyper::server::Builder` type, to construct
a `Server`. All other types (`Http`, `Serve`, etc) were moved into the
"lower-level" `hyper::server::conn` module.

The `Server` is a `Future` representing a listening HTTP server. Options
needed to build one are set on the `Builder`.

As `Server` is just a `Future`, it no longer owns a thread-blocking
executor, and can thus be run next to other servers, clients, or
what-have-you.

Closes #1322
Closes #1263

BREAKING CHANGE: The `Server` is no longer created from `Http::bind`,
  nor is it `run`. It is a `Future` that must be polled by an
  `Executor`.

  The `hyper::server::Http` type has move to
  `hyper::server::conn::Http`.
2018-04-16 14:29:19 -07:00
Sean McArthur
c119097fd0 feat(http2): add HTTP/2 support for Client and Server 2018-04-13 14:23:47 -07:00