Sean McArthur
02f01765ee
fix(tests): update new Host header tests to use Raw
2016-11-16 12:57:09 -08:00
Markus Unterwaditzer
8541ac72d7
fix(headers): Allow IPv6 Addresses in Host header
2016-11-01 14:44:56 -07:00
Raghav
3593d7987a
feat(headers): Add strict-origin and strict-origin-when-cross-origin referer policy
...
Support for strict-origin and strict-origin-when-cross-origin in referer
policy required for imporving network security. This commit will attempt
to add missing pieces of referrer policy.
2016-10-28 16:56:40 -04:00
Tshepang Lekhonkhobe
d5df3fd1b5
docs(headers): remove extraneous space
2016-10-13 14:25:52 -07:00
Garrett Squire
7b558ae87a
feat(headers): support multiple values for Referrer-Policy header
...
Closes #882
2016-10-08 11:10:07 -07:00
Simon Smith
69894d1994
feat(headers): add Warning header
...
Implements Warning header from RFC7234
Closes #883
2016-09-05 14:35:48 -04:00
Markus Unterwaditzer
9375addba0
feat(headers): Headers::remove returns the Header
...
Closes #891
BREAKING CHANGE: `Headers.remove()` used to return a `bool`,
it now returns `Option<H>`. To determine if a a header exists,
switch to `Headers.has()`.
2016-08-23 16:46:07 -04:00
Anthony Ramine
de921d08fe
chore(version): Update serde to 0.8
2016-08-02 09:39:10 +02:00
Joonas Koivunen
13c5bf66c3
feat(headers): add Content-Location header
...
Closes #870
2016-07-28 09:59:33 -07:00
Sean McArthur
50ccdaa7e7
feat(header): introduce header::Raw ( #869 )
...
The Raw type repesents the raw bytes of a header-value.
Having a special type allows a couple of benefits:
- The exact representation has become private, allowing "uglier"
internals. Specifically, since the common case is for a header to only
have 1 line of bytes, an enum is used to skip allocating a Vec for only
1 line. Additionally, a Cow<'static, [u8]> is used, so static bytes
don't require a copy. Finally, since we can use static bytes, when
parsing, we can compare the incoming bytes against a couple of the most
common header-values, and possibly remove another copy.
- As its own type, the `Headers.set_raw` method can be generic over
`Into<Raw>`, which allows for more ergnomic method calls.
BREAKING CHANGE: `Header::parse_header` now receives `&Raw`, instead of
a `&[Vec<u8>]`. `Raw` provides several methods to ease using it, but
may require some changes to existing code.
2016-07-23 12:54:16 -07:00
Michael
e1542a609f
feat(headers): add last-event-id header
...
Add a Last-Event-ID header to properly work with Server-Sent Events
Addresses # 723
2016-07-14 20:38:46 -07:00
Sean McArthur
e2264530e7
Merge pull request #864 from hyperium/less-deps
...
refactor(header): internalize traitobject and typeable
2016-07-14 20:36:43 -07:00
Sean McArthur
3e66377979
refactor(header): internalize traitobject and typeable
2016-07-14 17:27:59 -07:00
Sean McArthur
40745c5671
refactor(lib): moved LanguageTag export to header
...
BREAKING CHANGE: LanguageTag used to be at the crate root, but it is now
in the `hyper::header` module.
2016-07-14 09:59:47 -07:00
Michael
01843f8822
feat(headers): add origin header
...
Add an Origin header so users may properly send CORS requests
Closes #651
2016-07-13 14:50:52 -07:00
Aravind Gollakota
3a86b3a2b2
feat(headers): Add Referrer-Policy header
2016-07-01 22:17:11 -07:00
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