Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions web/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# unreleased 0.8.3
## Add
- expand header value extractor coverage of `handler::header::HeaderRef` throuhg more `handler::header::<const HeaderName>` types

## Fix
- add `content-length: 0` header to `Redirect`

Expand Down
50 changes: 49 additions & 1 deletion web/src/handler/types/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,55 @@ macro_rules! const_header_name_impl {
}
}

const_header_name_impl!(ACCEPT, ACCEPT_ENCODING, HOST, CONTENT_TYPE, CONTENT_LENGTH);
const_header_name_impl!(
// common request headers.
ACCEPT,
ACCEPT_ENCODING,
ACCEPT_LANGUAGE,
AUTHORIZATION,
CACHE_CONTROL,
CONNECTION,
CONTENT_TYPE,
CONTENT_LENGTH,
COOKIE,
DATE,
HOST,
ORIGIN,
REFERER,
USER_AGENT,
// conditional and partial request.
RANGE,
IF_MATCH,
IF_NONE_MATCH,
IF_MODIFIED_SINCE,
IF_UNMODIFIED_SINCE,
IF_RANGE,
// request body description.
CONTENT_DISPOSITION,
CONTENT_ENCODING,
CONTENT_LANGUAGE,
CONTENT_RANGE,
TRANSFER_ENCODING,
TE,
EXPECT,
// websocket upgrade.
UPGRADE,
SEC_WEBSOCKET_KEY,
SEC_WEBSOCKET_VERSION,
SEC_WEBSOCKET_PROTOCOL,
SEC_WEBSOCKET_EXTENSIONS,
// proxy, cors preflight and misc.
FORWARDED,
VIA,
PROXY_AUTHORIZATION,
MAX_FORWARDS,
FROM,
PRAGMA,
DNT,
UPGRADE_INSECURE_REQUESTS,
ACCESS_CONTROL_REQUEST_METHOD,
ACCESS_CONTROL_REQUEST_HEADERS
);

/// typed header extractor.
///
Expand Down
Loading