refactor(headers): Add tests and docs to CORS headers

This commit is contained in:
Pyfisch
2015-04-28 09:32:48 +02:00
parent f9d75e4dd3
commit e993f4b544
6 changed files with 66 additions and 12 deletions

View File

@@ -7,7 +7,17 @@ header! {
#[doc="The `Access-Control-Allow-Headers` header indicates, as part of the"]
#[doc="response to a preflight request, which header field names can be used"]
#[doc="during the actual request."]
#[doc=""]
#[doc="# ABNF"]
#[doc="```plain"]
#[doc="Access-Control-Allow-Headers: \"Access-Control-Allow-Headers\" \":\" #field-name"]
#[doc="```"]
#[doc=""]
#[doc="# Example values"]
#[doc="* `accept-language, date`"]
(AccessControlAllowHeaders, "Access-Control-Allow-Headers") => (UniCase<String>)*
test_access_control_allow_headers {}
test_access_control_allow_headers {
test_header!(test1, vec![b"accept-language, date"]);
}
}