Commit Graph

1531 Commits

Author SHA1 Message Date
Sean McArthur
7369fe649f Merge pull request #1233 from KonishchevDmitry/patch-1
Fix a typo in ContentType header's doc
2017-06-25 08:47:58 -07:00
Dmitry Konishchev
6fd46427af docs(headers): fix a typo in ContentType header's doc 2017-06-25 16:41:51 +03:00
Sean McArthur
1e31e11d3d Merge pull request #1226 from yazaddaruvala/remove_byte_str
refactor(uri): make ByteStr an implementation detail of uri
2017-06-24 14:50:44 -07:00
Yazad Daruvala
3021cd9dd8 refactor(uri): make ByteStr an implementation detail of uri 2017-06-23 21:58:15 -07:00
Sean McArthur
579d360f51 chore(status): remove dead code 2017-06-22 21:10:10 -07:00
Sean McArthur
b4be22db56 docs(http): remove 'client' from docs of Request and Response 2017-06-22 21:09:50 -07:00
Sean McArthur
45ce625bda test(header): add ContentType to server encode benchmark 2017-06-22 12:25:50 -07:00
Sean McArthur
845d742a21 Merge pull request #1225 from yazaddaruvala/master
refactor(http): return poll more
2017-06-22 09:24:59 -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
Sean McArthur
ca1fa81ce0 Merge pull request #1227 from jonhoo/document-transfer-encoding
docs(headers): clarify TransferEncoding xor ContentLength
2017-06-21 14:45:51 -07:00
Jon Gjengset
41ac9e7873 docs(headers): clarify TransferEncoding xor ContentLength
Update the docs for `Content-Length` and `Transfer-Encoding` to mention
that they are mutually exclusive, and that setting one will unset the
other, in accordance with RFC7230.

Also expand the docs for `Request::set_body` to say that chunked
encoding is used by default, and mention how to disable this feature.
2017-06-21 15:30:03 -04:00
Sean McArthur
903f41b19c Merge pull request #1220 from yazaddaruvala/add_benches
test(server): add benches for TransferEncoding::chunked
2017-06-18 12:17:56 -07:00
Yazad Daruvala
b914d2f1ea test(server): add benches for TransferEncoding::chunked 2017-06-17 22:41:10 -07:00
Sean McArthur
87d2ab4619 chore(cargo): add 'network-programming' category 2017-06-16 13:07:06 -07:00
Sean McArthur
e868373037 chore(ci): only publish master docs 2017-06-16 13:06:46 -07:00
Sean McArthur
e92b57c4f5 v0.11.0 2017-06-13 12:54:29 -07:00
Sean McArthur
cee8692d81 refactor(header): replace url crate with percent-encoding 2017-06-13 10:55:12 -07:00
Sean McArthur
d09288e7b3 chore(cargo): add homepage, update documentation fields 2017-06-13 10:38:31 -07:00
Sean McArthur
4ed32d1b55 docs(README): update readme for 0.11 resources 2017-06-13 10:38:01 -07:00
Sean McArthur
c4c60d90bc chore(dependencies): bump mime v0.3.2, with http token parsing 2017-06-13 10:29:16 -07:00
Sean McArthur
3c75f45c44 chore(cargo): remove 'build.rs' from include field 2017-06-13 10:27:28 -07:00
Sean McArthur
f953cafe27 feat(status): add StatusCode::try_from(u16).
This is a temporary function until the `TryFrom` trait stabilizes.

BREAKING CHANGE: Removes the undocumented `from_u16` function. Use
  `StatusCode::try_from` instead.

  Also makes the `status` module private. All imports of
  `hyper::status::StatusCode` should be `hyper::StatusCode`.
2017-06-13 09:50:46 -07:00
Sean McArthur
c166268c07 fix(client): prevent panicking when determine Expiration in pool
On some OSes, `Instant` would start counting 0 from the boot time. That
would mean that any `Instant::now() - dur` soon after boot had a higher
risk of overflowing. Now, the expiration is determined by calling
`idle.elapsed()`, and comparing durations.

Closes #1215
2017-06-13 09:21:56 -07:00
Sean McArthur
620e00c6da docs(guides): add a link to guides in doc homepage 2017-06-12 20:27:18 -07:00
Corey Farwell
1059eb349a style(lib): address clippy code style warnings
* Remove unnecessary return statements.

* Combine identical `match` arms.

* Collapse nested conditional.

* Use `assert_ne` where applicable.

* Lifetime elision.
2017-06-12 20:16:20 -07:00
Sean McArthur
5d19ef88b4 test(status): fixes tests from removing 2017-06-12 17:04:55 -07:00
Sean McArthur
94ee6204ae feat(status): remove deprecated StatusClass
BREAKING CHANGE: All usage of `status.class()` should change to
  equivalent `status.is_*()` methods.
2017-06-12 16:27:25 -07:00
Sean McArthur
1ec9b5a327 docs(examples): remove unnecessary Clone and Copy from Echo 2017-06-12 11:22:20 -07:00
Corey Farwell
356e309a76 chore(dependencies): upgrade base64 to 0.6 2017-06-11 21:39:30 -07:00
Sean McArthur
e3834457da chore(ci): update appveyor to use stable instead of nightly 2017-06-08 13:43:43 -07:00
Sean McArthur
efa5e7f341 chore(dependencies): update futures to 0.1.14, since we use new apis 2017-06-08 13:07:33 -07:00
Sean McArthur
f273224f21 feat(mime): upgrade to mime v0.3
The new mime crate has several benefits:

- Faster formatting
- Easier to use. Most common mime types are now just constants, like
  `mime::TEXT_PLAIN`.
- Proper suffix support.
- Extensible without breaking backwards compatiblity. This means we can
  always add new constants, but before we couldn't add new variants to the
  enums.
- It's now impossible for a `Mime` to contain invalid tokens. Before,
  with the `Ext(String)` variants, it was possible to create an illegal
  mime.

Closes #738

BREAKING CHANGE: Most uses of `mime` will likely break. There is no more
  `mime!` macro, nor a `Mime` constructor, nor `TopLevel` and `SubLevel`
  enums.

  Instead, in most cases, a constant exists that can now be used.

  For less common mime types, they can be created by parsing a string.
2017-06-08 13:00:12 -07:00
Sean McArthur
e2ed6f5868 refactor(chunk): make use of Bytes::extend instead of custom code 2017-06-07 17:48:26 -07:00
Corey Farwell
059f2b8725 chore(net): remove empty net file 2017-06-06 23:54:14 -07:00
Sean McArthur
acd62cda44 feat(lib): add raw_status feature in Cargo.toml
The `RawStatus` types on the `Response` are now gone by default. To make
use of them, the `raw_status` feature must be enabled in `Cargo.toml`.

BREAKING CHANGE: To use `RawStatus`, you must enable the `raw_status`
  crate feature.
2017-06-03 16:23:33 -07:00
Sean McArthur
76fc633613 Merge pull request #1199 from daboross/patch-1
fix(client): remove config requirement for Connect
2017-06-03 14:55:07 -07:00
Sean McArthur
9036df2f4c chore(ci): update minimum rust version to 1.15 2017-06-03 14:42:42 -07:00
Sean McArthur
144bbc3d01 Merge pull request #1203 from daboross/patch-2
fix(http,server): Update tests to use non-deprecated futures methods.
2017-06-03 14:28:35 -07:00
David Ross
70948a24b0 fix(http,server): Update tests to use non-deprecated futures methods.
These seem mostly to be renames, with the exception of Unpark -> Notify.
2017-06-02 23:33:19 -07:00
David Ross
5391d02c10 fix(client): remove config requirement for Connect
Remove requirement when calling client::Config::connector() that the connector implements Connect.

Removing this requirement allows users to set the connector back to UseDefaultConnector. Previously,
this was not possible.
2017-06-01 23:38:01 -07:00
mayah
edc1c0dd01 fix(header): add Cookie::iter() 2017-05-29 11:16:09 -07:00
Sean McArthur
bdd2e1a3ad perf(server): cache renderings of the Date header
This is actually one of the biggest impacts to benchmark performances at
this point. Caching the rendering of the Date header improves "hello
world" benchmarks by around 10%.
2017-05-26 12:29:26 -07:00
Sean McArthur
78a8eed7f1 test(http): addn a benchmark for encoding a response head 2017-05-25 11:41:56 -07:00
Sean McArthur
2cbf4ef85f refactor(http): reduce complexity of determing an Encoder 2017-05-25 10:38:37 -07:00
Sean McArthur
e69cd1ab3a style(header): clean up extra whitespace in ContentLength file 2017-05-25 10:34:35 -07:00
Sean McArthur
9688c8b8ae perf(header): add #[inline] to header! macros 2017-05-25 10:32:25 -07:00
Sean McArthur
40c575cc59 perf(header): move a branch out of a loop in fmt_comma_delimited 2017-05-25 10:31:20 -07:00
Sean McArthur
6d8071b3ce Merge pull request #1177 from yazaddaruvala/master
Random Refactors
2017-05-22 23:40:02 -07:00