sark-core 0.8.2

the L7 layer for dope
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
pub(super) const SERVER_LINE: &[u8] = b"Server: sark\r\n";
pub(super) const DATE_PREFIX: &[u8] = b"Date: ";
pub(in crate::http::response) const CRLF: &[u8] = b"\r\n";
pub(in crate::http::response) const CL_PREFIX: &[u8] = b"Content-Length: ";
pub(super) const TE_LINE: &[u8] = b"Transfer-Encoding: chunked\r\n";

pub(in crate::http::response) const STATUS_LINE_PREFIX: &[u8] = b"HTTP/1.1 ";

/// Wire length of an HTTP-date value (`Mon, 01 Jan 2000 00:00:00 GMT`).
pub(in crate::http::response) const DATE_LEN: usize = 29;

/// `date_offset` sentinel meaning the `Date` line was stripped (`#[skip(date)]`),
/// so there is no placeholder to patch per request.
pub(in crate::http::response) const NO_DATE: usize = usize::MAX;

pub(in crate::http::response) const SERVER_DATE_TERMINATOR_LEN: usize =
    SERVER_LINE.len() + DATE_PREFIX.len() + DATE_LEN + CRLF.len() + CRLF.len();