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
wangcong
34509ef51a
test(client): replace deprecated Sender.completer with send
2017-03-14 10:11:22 -07:00
Sean McArthur
5a3743c1ba
Merge pull request #1084 from pyfisch/fuzzing
...
[WIP] fix bugs in header field parsers
2017-03-13 10:15:21 -07:00
Sean McArthur
e871411627
feat(client): add Request.set_proxy for HTTP proxy requests
...
Closes #1056
2017-03-07 12:16:44 -08:00
Sean McArthur
88eaaa0016
fix(http): dont return Error frame with idle eof
2017-03-07 12:16:10 -08:00
Pyfisch
bdd536cf44
test(headers): fix failing test for Accept header
2017-03-05 13:21:32 +01:00
Pyfisch
643fac1e01
fix(headers): add length checks to ETag parsing
...
Bug found using `cargo fuzz`.
2017-03-05 12:40:06 +01:00
Pyfisch
d80aae55b1
fix(headers): prevent 2 panics in QualityItem parsing
...
1. index out of bounds if semicolon is the last character
2. not a char boundary on non-ASCII input (only allow ASCII now)
Bugs found using `cargo fuzz`
2017-03-05 12:38:44 +01:00
Sean McArthur
c51a9993fa
chore(travis): enable email notifications for broken builds
2017-03-02 15:33:42 -08:00
Sean McArthur
8140f38f6e
Merge pull request #1081 from MJDSys/fix_from_chunk_to_bytes
...
fix(http): Fix commit fac3d70c0b
2017-03-01 22:44:28 -08:00
Matthew Dawson
9e16637514
fix(http): Fix commit fac3d70c0b
...
The new From<Chunk> for Bytes uses self instead of chunk in its
implementation of From::from. Change it to chunk to fix the build.
2017-03-02 01:40:13 -05:00
Sean McArthur
fac3d70c0b
feat(http): add Into<Bytes> for Chunk
2017-03-01 16:59:36 -08:00
Sean McArthur
abad0fcd72
Merge pull request #1080 from hyperium/bytes
...
feat(http): use the bytes crate for Chunk and internally
2017-03-01 16:46:12 -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
cf7cc50ad0
chore(cargo): set an include directive
2017-03-01 13:35:30 -08:00
Sean McArthur
a7021d1f88
test(http): remove println from a test
2017-02-28 16:32:40 -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
359f5ff4d7
Merge pull request #1076 from sinkuu/fix_fragment_questionmark
...
fix(url): fix panic when questionmark is in fragment
2017-02-25 09:56:50 -08:00
sinkuu
8ba1f19d61
fix(url): fix panic when questionmark is in fragment
2017-02-25 20:25:39 +09:00
Sean McArthur
6eb0753921
fix(http): fix another instance of keep-alive busy-looping
2017-02-23 13:36:07 -08:00
Sean McArthur
a6f7f27435
Merge pull request #1074 from hyperium/park-less
...
fix(http): fix busy looping when in keep-alive
2017-02-22 17:54:48 -08:00
Sean McArthur
8756f40ac9
fix(http): fix busy looping when in keep-alive
2017-02-22 16:31:15 -08:00
Sean McArthur
dc97dd77f4
feat(server): make Http default its body type to hyper::Chunk
2017-02-22 16:30:20 -08:00
Sean McArthur
ee58409578
fix(http): make Chunk impl Sync
2017-02-22 16:30:20 -08:00
Sean McArthur
435fe84bf5
Merge pull request #1072 from Keats/master
...
feat(headers): impl Eq for ContentType
2017-02-21 10:06:16 -08:00
Vincent Prouillet
bba761ac54
feat(headers): impl Eq for ContentType
2017-02-21 15:48:45 +09:00
Tasos Bakogiannis
592c1e2125
feat(headers): add Link header implementation
...
Closes #650
2017-02-20 12:00:01 -08:00
Sean McArthur
df31c0e42c
Merge pull request #1069 from hyperium/run-until-unit
...
feat(server): change Server.run_until Future Error to ()
2017-02-20 11:52:39 -08:00
Sean McArthur
a3252c464d
feat(server): change Server.run_until Future Error to ()
...
BREAKING CHANGE: The `run_until` future used to require its `Error` to
be `hyper::Error`, now it can be `()`.
2017-02-17 13:48:17 -08:00
Sean McArthur
5af5fa104e
Merge pull request #1047 from hyperium/from-message
...
feat(server): make Http compatible with TcpServer
2017-02-17 10:49:28 -08:00
Sean McArthur
e04bcc12a7
feat(server): make Http compatible with TcpServer
...
This implements `From<Message> for Request` and `Into<Message> for
Response`, allowing an `Http` instance to be used with a `TcpServer`
from tokio-proto.
Closes #1036
BREAKING CHANGE: This makes `Request.remote_addr` an
`Option<SocketAddr>`, instead of `SocketAddr`.
2017-02-16 18:26:36 -08:00
Sean McArthur
3cf3b75159
Merge pull request #1066 from hyperium/outgoing-generic
...
feat(http): allow specifying custom body streams
2017-02-16 18:15:15 -08:00
Sean McArthur
1b1311a7d3
feat(http): allow specifying custom body streams
2017-02-16 15:06:55 -08:00
Sean McArthur
7d37197dde
chore(http): change log to debug for decoder errors
2017-02-16 14:11:28 -08:00
Sean McArthur
ebf96f3f5f
fix(http): send errors as frame errors
...
Additionally, only close read side, so it's potentially possible to
write a response for an error.
2017-02-16 14:09:41 -08:00
Vincent Prouillet
499c0d1772
chore(dependencies): update base64 to 0.4
2017-02-13 09:40:19 -08:00
Sean McArthur
ed2334bef4
Merge pull request #1058 from michael-zapata/docs/uri
...
docs(uri): fix rendering errors
2017-02-10 10:12:03 -08:00
Michael Zapata
31d998078d
docs(uri): fix rendering errors
...
Add a code block around the URI explanation to make it legible and
add a missing backquote
2017-02-10 16:00:59 +01:00
Sean McArthur
2266d869ca
Merge pull request #1054 from hyperium/uri-memslice
...
perf(header): Make Uri use MemSlice internally
2017-02-09 12:41:53 -08:00
Guillaume Gomez
524f65a9a3
perf(header): Make Uri use MemSlice internally
2017-02-09 11:45:55 -08:00
Sean McArthur
04f169034a
Merge pull request #1053 from GuillaumeGomez/pub_issues
...
fix(Uri): Reexport Uri struct publicly
2017-02-09 09:14:16 -08:00
Guillaume Gomez
5a4bd497c9
fix(Uri): Reexport Uri struct publicly
2017-02-09 15:25:55 +01:00
Sean McArthur
2f18ce2034
Merge pull request #1052 from ericchiang/futures-example
...
refactor(examples): remove use of depricated futures features
2017-02-08 11:10:06 -08:00
Eric Chiang
2331e0b3e5
refactor(examples): remove use of depricated futures features
...
The "Finished" struct and "finished" method have been deprecated[0]
and don't show up in the futures docs. Prefer non-deprecated
features for users exploring the examples.
[0] https://github.com/alexcrichton/futures-rs/blob/0.1.10/src/future/mod.rs#L25
2017-02-08 10:54:23 -08:00
Julian Tescher
2fa414fb5f
fix(lib): Fixed typos in multiple modules
...
BREAKING CHANGE: The `Preference` header had a typo in a variant and it's string representation,
change `Preference::HandlingLeniant` to `Preference::HandlingLenient`.
2017-02-07 11:04:42 -08:00
Sean McArthur
0d05533d07
chore(h2): clear out unused h2 module
2017-02-06 16:53:06 -08:00
Sean McArthur
23ac1bfe82
test(http): test Uri parse errors propagate
2017-02-06 13:37:02 -08:00
Sean McArthur
fc808ef9f8
Merge pull request #1049 from spk/use-pub-hyper-url
...
test(lib): use public hyper::Url everywhere
2017-02-05 14:47:34 -08:00
Sean McArthur
48435cd419
Merge pull request #1050 from spk/fix-commented-uri-tests
...
test(uri): fix URI parse error tests
2017-02-05 14:46:36 -08:00
Laurent Arnoud
70a3f76a27
test(uri): fix URI parse error tests
...
Add also test parse authority without port
2017-02-05 13:12:03 +01:00