Commit Graph

29 Commits

Author SHA1 Message Date
Sean McArthur
dd54f20b55 feat(server): add experimental pipeline flush aggregation option to Http
By enabling `Http::pipeline`, the connection will aggregate response
writes to try to improve sending more responses in a single syscall.
2017-09-22 15:39:33 -07:00
arthurprs
1e7e1c921c perf(http): prefer ErrorKind::WouldBlock
Improved codegen, without allocations or function calls
2017-09-03 19:02:32 +02:00
Sean McArthur
207fca63ce fix(lib): remove logs that contain request and response data
Closes #1281
2017-08-15 16:04:56 -07:00
Sean McArthur
2ea125e609 chore(lib): fix new unused_mut warnings in nightly 2017-08-11 15:07:49 -07:00
Sean McArthur
fc5b9cce31 fix(http): fix encoding when buffer is full 2017-07-17 11:19:32 -07:00
Steven Fackler
6164e76405 feat(server): Handle 100-continue
cc #838
2017-06-25 13:14:32 -07:00
Sean McArthur
4dfe0db0f4 perf(server): dont record Idle time when not needed 2017-06-25 11:51:43 -07:00
Yazad Daruvala
5ed9e31b82 refactor(http): Buffered::read_from_io now returns Poll 2017-06-22 01:01:00 -07:00
Yazad Daruvala
a0c3a33eda refactor(http): Buffered::parse now returns Poll 2017-06-22 01:01:00 -07:00
Yazad Daruvala
80f16f1917 refactor(http): Decoder::decode and MemRead in io now return Poll 2017-06-22 01:01:00 -07:00
Yazad Daruvala
e134b890ef refactor(http): combine reserve_read_buf into read_from_io 2017-05-22 22:06:03 -07:00
Yazad Daruvala
2f0470bcf3 refactor(http): delete some indirection around Http1Transaction::parse 2017-05-22 22:06:03 -07:00
Sean McArthur
33eb8f95a3 perf(http): use custom type for ParseEof error instead of string error 2017-05-12 16:54:24 -07:00
Sean McArthur
5caf590c06 perf(http): increase size of initial buffer to 8kb 2017-05-12 15:39:34 -07:00
Sean McArthur
633b37df11 fix(conn): always read till blocked when parsing
Closes #1111
2017-04-05 15:45:20 -07:00
Sean McArthur
997a64d770 fix(conn): always flush io from poll_complete
Closes #1108
2017-04-03 10:06:39 -07:00
Alex Crichton
8554904dc9 refactor(lib): convert usage of tokio_core::io to tokio_io
This commit updates to the most recent versions (released today) of the various
Tokio libraries in use. Namely the `tokio_core::io` module has now been
deprecated in favor of an external `tokio-io` crate. This commit pulls in that
crate and uses the `AsyncRead + AsyncWrite` abstraction instead of `Io` from
tokio-core.

BREAKING CHANGE: Any external types that were using that had implemented `Io` will need to 
  implement `AsyncRead + AsyncWrite` from tokio_io.
2017-03-17 17:31:44 -07:00
Sean McArthur
88eaaa0016 fix(http): dont return Error frame with idle eof 2017-03-07 12:16:10 -08:00
Sean McArthur
65b3e08f69 feat(http): use the bytes crate for Chunk and internally 2017-03-01 14:15:47 -08:00
Sean McArthur
ab939511f0 fix(http): more eagerly flush when the Conn is full
Closes #1078
2017-02-28 16:05:55 -08:00
Sean McArthur
1b1311a7d3 feat(http): allow specifying custom body streams 2017-02-16 15:06:55 -08:00
Sean McArthur
027cb71b7b perf(http): reduce a copy when not using Chunked encoding 2017-02-02 13:13:48 -08:00
Sean McArthur
61364d245b perf(header): improve on MemSlice usage in headers 2017-01-26 23:49:44 -08:00
Guillaume Gomez
1b556389c0 perf(header): use MemSlice when parsing headers 2017-01-26 10:07:34 -08:00
Sean McArthur
cfcbd8c96b fix(http): keep flushing until WOULDBLOCK is received 2017-01-23 23:57:43 -08:00
Sean McArthur
8597c55a13 refactor(http): adjust debug logs 2017-01-23 22:48:35 -08:00
Sean McArthur
1868f8548d refactor(http): remove buffer, use WriteBuf 2017-01-16 18:56:36 -08:00
Sean McArthur
be461b4663 perf(http): introduce MemBuf, a shared read buffer 2017-01-16 10:50:35 -08:00
Sean McArthur
2d2d5574a6 feat(lib): redesign API to use Futures and Tokio
There are many changes involved with this, but let's just talk about
user-facing changes.

- Creating a `Client` and `Server` now needs a Tokio `Core` event loop
to attach to.
- `Request` and `Response` both no longer implement the
`std::io::{Read,Write}` traits, but instead represent their bodies as a
`futures::Stream` of items, where each item is a `Chunk`.
- The `Client.request` method now takes a `Request`, instead of being
used as a builder, and returns a `Future` that resolves to `Response`.
- The `Handler` trait for servers is no more, and instead the Tokio
`Service` trait is used. This allows interoperability with generic
middleware.

BREAKING CHANGE: A big sweeping set of breaking changes.
2017-01-16 10:44:27 -08:00