Skip to main content

sark_core/http/head/
error.rs

1use crate::error::Error;
2
3pub const ERR_TOO_MANY_HEADERS: &str = "Too many headers";
4pub const ERR_INVALID_HEADER_NAME: &str = "Invalid header name";
5pub const ERR_INVALID_HEADER_VALUE: &str = "Invalid header value";
6pub const ERR_HEADER_LINE_TOO_LONG: &str = "Header line too long";
7
8pub fn bad_request(msg: &'static str) -> Error {
9    Error::BadRequest(msg.into())
10}