Commit Graph

401 Commits

Author SHA1 Message Date
Andre Silva
f38717e422 fix(headers): Remove raw part when getting mutable reference to typed header
If you get a mutable reference to a typed header it is possible to make
the two representations be out of sync. To avoid this, after parsing the
raw part it should be removed.

Fixes #821.
2016-06-20 15:12:30 -07:00
leonardo.yvens
d4a095d75c refactor(multiple): Clippy run 2016-06-12 15:17:15 -03:00
Sean McArthur
d80d61cd78 perf(headers): check for header literals before allocating name 2016-06-01 15:09:54 -07:00
Sean McArthur
9338878576 perf(headers): use a Vec instead of HashMap internally 2016-06-01 11:56:35 -07:00
Justin Mayhew
8f1c536007 docs(*): fix typos, Markdown inconsistencies, and stutter 2016-05-20 11:42:29 -03:00
Sean McArthur
d35992d019 feat(lib): switch to non-blocking (asynchronous) IO
BREAKING CHANGE: This breaks a lot of the Client and Server APIs.
  Check the documentation for how Handlers can be used for asynchronous
  events.
2016-05-16 09:51:18 -07:00
Sean McArthur
e7229480ea fix(warnings): remove unused_code warnings from newest nightlies 2016-05-09 11:51:51 -07:00
Manish Goregaokar
b840963629 docs(*): Clippy fixes with markdown docs 2016-05-05 22:50:23 +05:30
Simon Sapin
8fa7a98968 refactor(hyper): Update to rust-url 1.0
BREAKING CHANGE: The re-exported Url type has breaking changes.
2016-04-21 16:14:08 -07:00
Sean McArthur
bc3878de36 Merge pull request #750 from calebmer/feat/prefer
feat(header): add prefer and preference applied headers
2016-03-31 18:56:58 -07:00
calebmer
6f6493010a feat(header): add prefer and preference applied headers
Closes #747
2016-03-31 15:46:34 -04:00
Sean McArthur
cbf83a4d5a Merge pull request #751 from hyperium/per-tag-docs
chore(docs): publish docs per version
2016-03-24 19:52:47 -07:00
Sean McArthur
905e0d2ff4 chore(docs): publish docs per version 2016-03-24 18:57:23 -07:00
Steven Allen
70c6914217 fix(headers): correctly handle repeated headers
HeaderX: a
    HeaderX: b

MUST be interpreted as

    HeaderX: a, b

See: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

Fixes #683
2016-03-24 14:19:15 -07:00
Danilo Bargen
eedd5b73ee docs(headers): Remove charset from json() docs
Leftover from ec568e9a55.
2016-03-15 12:33:32 +01:00
Sean McArthur
d1f9f5f694 Merge pull request #736 from debris/serde_up
refactor(headers): updated serde to version 0.7
2016-03-09 11:01:18 -08:00
Garrett Squire
ec568e9a55 fix(headers): remove charset from ContentType::json() convenience method
since the JSON mime type does not accept a charset, this patch removes
it

closes https://github.com/hyperium/hyper/issues/737
2016-03-08 17:41:34 -08:00
debris
33d5da2136 refactor(headers): updated serde to version 0.7 2016-02-27 15:04:30 +01:00
Mark Lee
f7d6ff67ee docs(headers): add docs for ExtendedValue members 2015-12-31 12:12:51 -08:00
Mark Lee
da0abe8988 feat(headers): allow ExtendedValue structs to be formatted and used as struct members 2015-12-31 12:12:51 -08:00
Corey Farwell
4c7f6f0c1e style(all): Address suggestions made by rust-clippy 2015-12-23 08:59:45 -08:00
Mark Lee
402fb76bb2 feat(headers): add extended parameter parser to the public API
Move the extended parameter parser from the Content-Disposition header
implementation into the common header parsing module. This allows crates that
use Hyper to parse RFC 5987-compliant header parameter values.
Add tests based on the examples given in the RFC.
2015-12-15 09:56:09 -08:00
Mike Dilger
7623ecc264 feat(headers): Add Content-Disposition header
fixes #561
2015-11-24 08:51:06 +13:00
Sean McArthur
9c99e939a6 Merge pull request #693 from brycefisher/feat/access-control-allow-credentials
feat(headers): Add Access-Control-Allow-Credentials header
2015-11-22 08:47:46 -08:00
Bryce Fisher-Fleig
19348b892b feat(headers): Add Access-Control-Allow-Credentials header
There is only one acceptable value for this header, "true", so
there header struct is unit-like (no fields nor data inside). See
documentation and tests for more info. Case insensitive.

Closes #655
2015-11-22 00:53:16 -08:00
Sean McArthur
799698ca87 feat(headers): re-export CookiePair and CookieJar 2015-11-20 13:15:07 -08:00
Sean McArthur
81d42c964e chore(dependencies): update openssl to 0.7 and cookie to 0.2
Closes #686
2015-11-20 11:12:56 -08:00
Sean McArthur
d44ee5980f docs(quality_item): fix typo
Closes #634
2015-11-17 10:47:43 -08:00
Markus Unterwaditzer
f783e9913b feat(headers): Add Access-Control-Expose-Headers
Fix #673
2015-11-02 22:09:49 +01:00
Pyfisch
4c756a9304 style(headers): use regular doc-comments inside macros
A bug (rust-lang/rust#23812) in rustc prevented the use of normal
comments inside macros but this has been fixed.
2015-10-27 19:19:05 +01:00
Prabhjyot Singh Sodhi
76cbf38423 feat(headers): add PartialEq impl for Headers struct
compare the raw representations of the headers for the lack of a better alternative
helpful when asserting HttpRequest/ HttpResponse in tests elsewhere
2015-09-17 10:40:10 +05:30
Peter Atashian
e0b9a11c9c test(windows): Ignore #[should_panic] tests on 32-bit msvc
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-09-10 00:09:14 -04:00
Erick Tryzelaar
3a3c8b69a7 refactor(serde): Minor serde micro-optimizations 2015-08-31 21:49:05 -07:00
Mike Dilger
341f8eae6e fix(headers): case insensitive values for Connection header
Closes #635
2015-08-28 10:36:54 +12:00
Sean McArthur
31f117ea08 fix(client): improve HttpReader selection for client Responses
Closes #436
2015-08-05 16:42:48 -07:00
ealasu
af062ac954 feat(headers): Content-Range header 2015-08-05 11:33:38 -07:00
Patrick Walton
f5f5e1cb2d fix(headers): fix broken deserialization of headers
Sorry about that!
2015-07-23 20:58:35 -07:00
Sean McArthur
da817ba8bf test(header): change test_headers_show to use str.contains 2015-07-23 12:09:55 -07:00
Sean McArthur
a0739e6c96 test(headers): fix test_headers_show() 2015-07-23 11:53:46 -07:00
Sean McArthur
74021a24fe test(headers): remove usage of iter.join() 2015-07-23 11:38:26 -07:00
Sean McArthur
d2e8b5dc3d fix(tests): iter.connect() is now iter.join() 2015-07-22 19:01:33 -07:00
Baptiste Darthenay
65ba136f02 Doc: moved blank line in right place.
http://ironframework.io/doc/iron/headers/struct.ContentType.html#examples
2015-07-15 10:39:18 +02:00
Patrick Walton
87de1b77bc feat(http): add optional serialization of common types via serde
This is behind a Cargo feature to avoid forcing downstream users to
depend on `serde`. It is needed for Servo IPC to work.
2015-07-10 17:45:08 -07:00
Sam Gibson
7c2e5124e6 feat(headers): add strict-transport-security header
Strict-Transport-Security allows servers to inform user-agents that
they'd like them to always contact the secure host (https) instead of
the insecure one (http).

Closes #589
2015-07-06 12:35:45 -07:00
Sean McArthur
9a85ea553f Merge pull request #595 from pyfisch/originstring
refactor(headers): use String in Access-Control-Allow-Origin header
2015-07-06 11:00:49 -07:00
Pyfisch
ed458628e5 refactor(headers): use String in Access-Control-Allow-Origin header
Access-Control-Allow-Origin origins are URLs but they do not need to
be valid, they should just be compared as strings. So to support
invalid URLs hyper should use a string instead.

closes #526

BREAKING CHANGE: Access-Control-Allow-Origin does no longer use Url
2015-07-04 17:26:06 +02:00
Pyfisch
db93ca0697 style(rustfmt): run rustfmt on hyper correct overlong lines 2015-06-29 20:22:22 +02:00
Sean McArthur
1b6c692fe3 Merge pull request #578 from lame-nickname/master
refactor(headers):  improve `Range` header adherence to HTTP spec
2015-06-23 17:05:23 -07:00
lame-nickname
f7504c3a9c refactor(headers): improve Range header adherence to HTTP spec 2015-06-23 20:59:34 +02:00
Pyfisch
99ff7e6257 feat(langtags): use true language tags in headers
Make hyper dependant on rust-language-tags providing complete parsing
and formatting of language tags. Remove builtin solution for simple
tags.

BREAKING CHANGE: AcceptLanguage and ContentLanguage use LanguageTag now,
Language removed from Hyper.
2015-06-23 20:15:47 +02:00