That way, third-parties can keep using the `header!` macro, which
now requires the `test_header!` macro as well.
Considering the `header!` macro is exported and part of the public
API, it was not desired to prevent it's usage in any way.
This is the last bunch of headers that should use the new macro. Moved them out of
their own folder so that the macro works. Changed them, so that they are more in
line with the other headers.
BREAKING CHANGE: `AccessControlAllowHeaders` and `AccessControlRequestHeaders` values
are case insensitive now. `AccessControlAllowOrigin` variants are now `Any` and
`Value` to match the other headers.
`If-Match`, `If-None-Match` and `Vary` headers are either a "*" value meaning that the header
matches every possible item or a list of items, one of them must be matched to fulfil the condition.
BREAKING CHANGE: `If-Match`, `If-None-Match` and `Vary` item variant name changed to `Items`
Change `Etag` (only the `E` is capitalized) to `ETag` as it is written
in the relevant RFC.
BREAKING CHANGE: `Etag` header field is now `ETag` header field
The new macro handles single value headers, list headers, and list
headers with at least one item.
It creates the item for the header and contains its documentation. The
new macro allows handling
more header cases in the future, it will also be possible to include
tests inside the macro.
BREAKING CHANGE: Removed impl_header!() and impl_list_header!() macros,
use new header!() macro.
Add the HTTP/1.1 `If-None-Match` header field makes the request method conditional
on a recipient cache or origin server either not having any current
representation of the target resource, when the field-value is "*",
or having a selected representation with an entity-tag that does not
match any of those listed in the field-value.
Closes#238
`Cookie` is the actual name of the header and since all other header structs
use the exact camel-cased version of their name using a different name here
is very inconvienient and confusing. You will encounter weird errors if you
try to use `Cookie` as the header. For this reason rename `Cookies` as
discussed on IRC with @seanmonstar and @reem and use `CookiePair` for real
cookies.
BREAKING CHANGE: Change header `Cookie` to `Cookie`
Add the HTTP/1.0 `Pragma` header field used to prevent older Caches, that
do not understand the `Cache-Control` header field from caching the ressource.
Closes#237
It is no longer required, as we can use `<H as Header>::header_name()`.
BREAKING CHANGE: Implementations of Header will need to adjust the
header_name method. It no longer takes any arguments.
Currently headers are exported at many places. For example you can access
`Transfer-Encoding` header at `header`, `header::common` and
`header::common::transfer_encoding`. Per discussion on IRC with
@seanmonstar and @reem, all contents of headers will be exposed at `header`
directly. Parsing utilities will be exposed at `header::parsing`. Header
macros can now be used from other crates.
This breaks much code using headers. It should use everything it needs
directly from `header::`, encodings are exposed at `header::Encoding::`,
connection options are exposed at `header::ConnectionOption`.
- Some stray deriving -> derive changes
- use::{mod} -> use::{self}
- fmt.write -> fmt.write_str
This does not catch the last case of fmt.write_str in the
Show impl of a Header Item. This will need to be changed
separately.