Commit Graph

19 Commits

Author SHA1 Message Date
Sean McArthur
7a48d0e8b4 fix(lib): properly handle body streaming errors 2018-01-11 13:58:16 -08:00
Sean McArthur
7888451408 refactor(proto): return Error::Incomplete instead of UnexpectedEof 2018-01-11 11:45:28 -08:00
Sean McArthur
7976023b59 fix(client): don't error on read before writing request 2018-01-09 17:46:29 -08:00
Sean McArthur
34f0dba6dc chore(log): update to log 0.4 2018-01-04 14:50:18 -08:00
Sean McArthur
6ade21aa7f feat(server): change default dispatcher
- Deprecates the `no_proto` configuration on `Server`. It is always
  enabled.
- Deprecates all pieces related to tokio-proto.
- Makes the tokio-proto crate optional, and the `server-proto` feature
  can be used to completely remove the dependency. It is enabled by
  default.
2017-12-28 19:15:57 -08:00
Sean McArthur
139dc7ab2b fix(client): properly close idle connections after timeout
Additionally fixes if there were idle connections when a `Client` is
dropped.

Only fixes with the no-proto dispatcher, as changing internals for the
tokio-proto dispatcher would be much harder, and it will replace it very
soon.

Closes #1397
2017-12-13 16:29:25 -08:00
Sean McArthur
15fdd53d4c fix(client): detect valid eof after reading a body
If a connection closes immediately after reading the end of the body,
the next call to `conn.poll()` should not error, but just indicate
that the connection is done.

Closes #1396
2017-12-08 17:29:46 -08:00
Sean McArthur
7b5931122a feat(log): improve quality of debug level logs 2017-12-08 14:49:51 -08:00
Sean McArthur
95e0164e8f fix(client): return error instead of unmatched response when idle 2017-12-06 16:06:13 -08:00
Sean McArthur
8f938d97e7 fix(conn): handle when pre-emptive flushing closes the write state
Closes #1391
2017-12-06 14:50:13 -08:00
Steven Fackler
eb9590e3da feat(server): Allow keep alive to be turned off for a connection (#1390)
Closes #1365
2017-12-04 10:14:20 -08:00
Sean McArthur
cecef9d402 fix(client): remove idle connections when read eof is found 2017-11-28 17:13:54 -08:00
Sean McArthur
9f21241002 fix(client): always wait on reads for pooled connections 2017-11-28 16:17:20 -08:00
Steven Fackler
60d0eaf891 fix(server): allow TLS shutdown before dropping connections with no_proto
This is important for TLS connections in particular

Closes #1380
2017-11-28 15:34:30 -08:00
Sean McArthur
121b5eef19 fix(lib): fix no_proto dispatcher to flush queue before polling more body 2017-11-14 15:13:11 -08:00
Sean McArthur
b1765dd168 fix(client): drop in-use connections when they finish if Client is dropped 2017-10-30 15:20:56 -07:00
Sean McArthur
7c4b814e6b fix(client): don't read extra bytes on idle connections 2017-10-27 11:28:20 -07:00
Sean McArthur
f7532b71d1 feat(lib): add support to disable tokio-proto internals
For now, this adds `client::Config::no_proto`, `server::Http::no_proto`,
and `server::Server::no_proto` to skip tokio-proto implementations, and
use an internal dispatch system instead.

`Http::no_proto` is similar to `Http::bind_connection`, but returns a
`Connection` that is a `Future` to drive HTTP with the provided service.
Any errors prior to parsing a request, and after delivering a response
(but before flush the response body) will be returned from this future.

See #1342 for more.
2017-10-27 00:02:07 -07:00
Sean McArthur
5027435791 refactor(lib): rename internal http module to proto 2017-09-28 18:28:44 -07:00