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
Steven Fackler
d2aa5d862c
fix(client): don't leak connections with no keep-alive
...
Closes #1383
2017-11-27 21:42:57 -08:00
Sean McArthur
e4864a2bea
feat(server): add to wrap generic accept steams
2017-11-15 13:39:24 -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
3f62bde7b3
v0.11.7
2017-11-14 13:41:37 -08:00
Sean McArthur
8bf7964875
fix(server): GET requests with no body have None instead of Empty
...
Closes #1373
2017-11-14 11:52:29 -08:00
Sam Rijs
b1785c662b
feat(client): skip dns resolution when host is a valid ip addr ( #1372 )
2017-11-13 15:00:34 -08:00
Guillaume Gomez
e330d30964
docs(lib): fix rustdoc warnings
2017-11-10 10:22:33 -08:00
Sean McArthur
fe38aa4bc1
feat(server): add const_service and service_fn helpers
...
- `const_service` creates a `NewService` that clones references to the
wrapped service.
- `service_fn` creates a `Service` from a function. Useful with closures.
2017-11-09 16:47:35 -08:00
Sean McArthur
68e0df759a
chore(server): make AddrIncoming stream item an unnameable type
2017-11-09 16:17:02 -08:00
Sean McArthur
b60d4cda3d
chore(server): setup ServerProto pieces to be deprecated
...
- Adds a `server-proto` feature that is added to default features.
- If `server-proto` feature is not enabled, pieces that will eventually
be deprecated and optional will be tagged deprecated, but with a note
about the missing `server-proto` feature.
2017-11-09 15:45:13 -08:00
Sean McArthur
39cf6ef7d2
feat(server): add server::Serve that can use a shared Handle
...
- Adds `Http::serve_addr_handle` which will bind to an address with a
provided `Handle`, and return a `Serve`.
- Adds `server::Serve` which is a `Stream` of incoming `Connection`s
being bound by a `NewService`.
- Renames `Http::no_proto` to `Http::serve_connection`.
2017-11-06 18:59:15 -08:00
Kam Y. Tse
0844dede19
feat(server): allow creating Server with shared Handle
...
1. impl Future for Server [WIP]
2. add method bind_handle to Http
3. add an example to use shared Handle in multiple server
2017-11-06 18:59:15 -08:00
Sean McArthur
7b2a2050b7
Merge pull request #1370 from srijs/feat/byte-range-spec-satisfiable
...
feat(header): implement ByteRangeSpec::to_satisfiable_range
2017-11-06 18:09:26 -08:00
Sean McArthur
19caf54edd
chore(lib): fix nightly unused warning about AsciiExt
2017-11-06 17:58:12 -08:00
Sam Rijs
bb54e36c90
feat(header): implement ByteRangeSpec::to_satisfiable_range
2017-11-06 19:53:16 +11: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
af8d11b2bf
chore(server): remove stream generic from new Connection type
2017-10-27 16:04:28 -07:00
Sean McArthur
b2ab42e607
chore(client): remove unused old test
2017-10-27 12:52:38 -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
Julian Tescher
5700ad79a3
docs(changelog,header,proto,client): Fix small typos
2017-10-21 20:07:56 -07:00
Sam Rijs
ed497bf5e6
feat(client): allow custom executors for HttpConnector
2017-10-18 15:56:33 +11:00
nabijaczleweli
d48ab9601b
docs(headers): fix >-quote formatting
...
'>'s as non-first characters are just '>'s (rustfmt probably broke the
line)
2017-10-15 15:00:49 +02:00
Niek Sanders
528afb89a8
refactor(uri): remove extra scheme condition from Uri::parse
...
Scheme check never true given preceeding else if
2017-10-03 16:30:59 -07:00
brogowski
e0de55daa2
feat(client): add names to DNS threads
2017-10-03 20:02:41 +00:00
Sean McArthur
4b1e9d1bab
v0.11.6
2017-10-02 18:21:41 -07:00
Sean McArthur
6b4635fd13
fix(server): fix experimental pipeline flushing
2017-10-02 18:20:05 -07:00
Sean McArthur
c2fd47f211
v0.11.5
2017-10-02 15:46:09 -07:00
Aaron Riekenberg
e8d6173734
fix(http): avoid infinite recursion when Body::from is called with Cow::Owned. ( #1343 )
...
When cow is a Cow::Owned, cow.to_owned() returns a Cow::Owned, which leads to infinite recursion.
Extract the owned or borrowed values from the cow to ensure progress is made in either case.
2017-10-01 09:49:36 -07:00
Sean McArthur
9c80fdbb9e
refactor(lib): rename http_types to http
2017-09-29 18:12:55 -07:00
Sean McArthur
d77fcff1c4
v0.11.4
2017-09-28 22:01:59 -07:00
Sean McArthur
0fbc215f4b
fix(client): fix panic in Pool
...
Closes #1339
2017-09-28 21:44:41 -07:00
Sean McArthur
57f86d42f2
refactor(lib): fix compat layer after rename to proto
2017-09-28 21:43:44 -07:00
Sean McArthur
5027435791
refactor(lib): rename internal http module to proto
2017-09-28 18:28:44 -07:00
Sean McArthur
217941cef2
v0.11.3
2017-09-28 16:43:50 -07:00
Sean McArthur
6aeec70653
test(server): fix reading from socket in maybe_notify when state is closed
2017-09-24 23:35:26 -07:00
Sean McArthur
1a9f264826
perf(server): try to read from socket at keep-alive
...
In most situations, this should reduce the number of task wake ups by 1
per request, which can help if reading the request was small.
2017-09-22 15:39:33 -07:00
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
Michael Smith
16e834d37c
feat(server): remove unneeded Send + Sync from Server
...
Http and Server placed Send + Sync bounds on NewService implementations which
were not actually required given tokio's event loop model. Remove them to reduce
limitations on end users of hyper.
2017-09-22 12:25:53 -07:00
Sam Rijs
0c7d375ba3
feat(lib): implement compatibility with http crate
2017-09-22 12:07:57 -07:00
Laurent Arnoud
92595e84a2
feat(header): add ContentType::xml() constructor
2017-09-22 11:27:10 -07:00
Sean McArthur
3b91fc65b2
fix(client): cleanup dropped pending Checkouts from Pool
...
Closes #1315
2017-09-18 13:29:31 -07:00
Sean McArthur
971864c424
fix(http): log errors passed to tokio at debug level
...
Closes #1278
2017-09-16 18:23:30 -07:00
Sean McArthur
41c47241cd
fix(client): return Version errors if unsupported
...
If a `Request`'s version is `Http09`, `H2`, or `H2c`, `client.request`
will return a `hyper::Error::Version`, and a message is logged at
`error!` level.
Closes #1283
2017-09-16 17:20:31 -07:00
Bastien Orivel
627c4e3d0d
fix(lib): Export hyper::RawStatus if the raw_status feature is enabled
2017-09-15 21:36:19 +02:00
Sean McArthur
3dc2228929
style(body): change tabs to spaces
2017-09-08 14:03:50 -07:00
Sean McArthur
112efb5879
Merge pull request #1309 from lemonrock/cow
...
feat(http): add Body::from(cow) for bytes and strings
2017-09-08 13:16:37 -07:00
Raphael Cohn
425ff71d75
feat(http): add Body::from(cow) for bytes and strings
...
This change adds the ability to use Cow<'static, [u8]> and Cow<'static, str> for the body of a
HTTP request or response.
This makes it easier to create abstractions that serve static web pages, redirect messages and the
like.
2017-09-07 10:50:51 +01:00
arthurprs
1e7e1c921c
perf(http): prefer ErrorKind::WouldBlock
...
Improved codegen, without allocations or function calls
2017-09-03 19:02:32 +02:00