Sean McArthur
44af273853
fix(client): check for dead connections in Pool
...
Closes #1429
2018-01-29 11:58:05 -08:00
Sean McArthur
a3f87c0b3f
chore(header): fix unused_unsafe in internals
2018-01-29 10:40:21 -08:00
kud1ing
1f8b3541e2
docs(README): "1.0 milestone" => "milestones"
...
The 1.0 milestone has currently no issues but the 0.12 milestone has. So instead of adjusting the README.md for each next mileston, just link to all milestones
2018-01-26 12:34:05 -08:00
Sean McArthur
c33b9d4e16
refactor(proto): move more h1-specific pieces into h1 module
2018-01-25 14:40:09 -08:00
Sean McArthur
68377ede70
perf(http): utilize writev when possible
...
By using `AsyncWrite::write_buf`, we can avoid some copies in some
cases. This especially helps throughput for chunked encoding.
2018-01-25 14:02:11 -08:00
Steven Fackler
11b49c2cc8
feat(uri): Add a PartialEq<str> impl for Uri
2018-01-25 12:00:09 -08:00
Sean McArthur
5c170e8ccd
test(server): improve server throughput benchmarks
2018-01-24 11:38:00 -08:00
Sean McArthur
4de0de73be
test(benches): fix deprecated futures usage in benches
2018-01-23 16:34:16 -08:00
Sean McArthur
d22deb6572
feat(server): add Http::max_buf_size() option
...
The internal connection's read and write bufs will be restricted from
growing bigger than the configured `max_buf_size`.
Closes #1368
2018-01-23 16:09:28 -08:00
Sean McArthur
7cb72d2019
fix(server): send 400 responses on parse errors before closing connection
2018-01-23 15:31:26 -08:00
Sean McArthur
44c34ce9ad
fix(server): error if Response code is 1xx
...
Returning a Response from a Service with a 1xx StatusCode is not
currently supported in hyper. It has always resulted in broken
semantics. This patch simply errors better.
- A Response with 1xx status is converted into a 500 response with no body.
- An error is returned from the `server::Connection` to alert about the
bad response.
2018-01-23 13:02:56 -08:00
Sean McArthur
227742221f
fix(client): error on unsupport 101 responses, ignore other 1xx codes
2018-01-23 11:33:24 -08:00
Sean McArthur
d8b1aa848c
perf(conn): use AsyncRead::read_buf to try skipping zeroing of buffer
2018-01-22 17:45:02 -08:00
Sean McArthur
be9d5e8d5c
v0.11.15
2018-01-22 12:17:33 -08:00
Sean McArthur
c93b082c85
refactor(compat): use pub(super) to remove compat_impl modules
2018-01-22 10:42:41 -08:00
Sean McArthur
36e66a5054
fix(lib): properly handle HTTP/1.0 remotes
...
- Downgrades internal semantics to HTTP/1.0 if peer sends a message with
1.0 version.
- If downgraded, chunked writers become EOF writers, with the connection
closing once the writing is complete.
- When downgraded, if keep-alive was wanted, the `Connection: keep-alive`
header is added.
Closes #1304
2018-01-22 10:08:27 -08:00
Sean McArthur
7d493aafce
chore(depenencies): update pretty-env-logger to 0.2
2018-01-19 17:37:34 -08:00
Sean McArthur
c89019eb10
feat(client): add executor method when configuring a Client
...
This allows using a future `Executor` other than a `Handle` to execute
the background (connection) tasks needed for sending requests and
responses.
This also deprecates `Client::handle()`, since the executor may not be
a `Handle`.
2018-01-19 16:58:57 -08:00
Sean McArthur
350ce542be
v0.11.14
2018-01-16 14:20:26 -08:00
Sean McArthur
14e4c741dc
fix(tokio-proto): return end-of-body frame correctly for tokio-proto
...
Closes #1414
2018-01-16 14:11:20 -08:00
Greedwolf DSS
73511ac8be
docs(example): fix send file to only send range of buffer read into
2018-01-16 11:52:56 -08:00
Sean McArthur
586993fb2f
chore(dependencies): update pretty_env_logger to rc.2
2018-01-12 12:02:13 -08:00
Sean McArthur
00d6a38547
v0.11.13
2018-01-12 11:38:18 -08:00
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
30f7f1dbe6
chore(tests): fix tests when tokio-proto feature disabled
2018-01-09 18:30:10 -08:00
Sean McArthur
2fe90f2564
fix(client): change connection errors to debug log level
...
Closes #1412
2018-01-09 17:46:35 -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
5ce269ae7d
chore(ci): update CI minimum Rust to 1.18 (because mio)
2018-01-09 15:53:06 -08:00
Sean McArthur
e34a32b0a0
v0.11.12
2018-01-08 10:06:19 -08:00
Sean McArthur
fa7f4377c1
fix(server): add remote_addr back to Request when using Http::bind
...
The `Request::remote_addr()` method has been deprecated.
Closes #1410
2018-01-08 10:04:01 -08:00
Sean McArthur
b3f32469b0
v0.11.11
2018-01-05 10:51:18 -08:00
Sean McArthur
f7aeb1cab0
chore(ci): only build on Rust 1.17, don't run tests
2018-01-04 15:34:25 -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
0892cb2777
feat(client): replace default dispatcher
2017-12-28 17:18:42 -08:00
Sean McArthur
6fde13f759
Merge pull request #1406 from jolhoeft/web_api
...
docs(server): Add server example querying a web api
2017-12-28 15:42:35 -08:00
Sean McArthur
6ab4895865
Merge pull request #1404 from jolhoeft/file_example
...
docs(server): Add an example of serving files
2017-12-28 15:41:41 -08:00
Jeff Olhoeft
7d2cce0922
docs(server): Add an example of serving files
2017-12-27 16:07:20 -08:00
Jeff Olhoeft
ebb5882859
docs(server): Add server example querying a web api
2017-12-27 15:47:46 -08:00
Sean McArthur
ccd8ebff75
v0.11.10
2017-12-26 15:25:20 -08:00
Sean McArthur
bfb0f84d37
fix(client): fix panic when request body is empty string
2017-12-26 13:07:39 -08:00
Sean McArthur
11bf254b2c
Merge pull request #1401 from alex/patch-1
...
chore(lib): update base64 version
2017-12-21 14:43:02 -08:00
Alex Gaynor
45439bec31
chore(lib): update base64 version
2017-12-21 11:27:41 -05:00
Sean McArthur
5d5045d698
chore(windows): poll core again to drop window socket
2017-12-18 16:53:45 -08:00
Sean McArthur
7d3abfbcf3
fix(conn): don't double shutdown in some cases
2017-12-15 13:46:30 -08:00
Sean McArthur
9af18f3024
chore(tests): fix syntax error in server tests
2017-12-15 12:41:26 -08:00
Sean McArthur
5d05b284d8
chore(windows): add test for keep-alive dropped in failing test
2017-12-15 12:18:44 -08:00
Sean McArthur
ef4008121e
fix(client): close connections when Response Future or Body is dropped
...
Closes #1397
2017-12-14 13:57:31 -08:00
Sean McArthur
8f6931b349
Merge pull request #1400 from jolhoeft/params_example
...
docs(server): Add a forms server example
2017-12-13 17:40:10 -08:00