property treat header names as case insensitive
This commit is contained in:
@@ -22,7 +22,7 @@ pub struct Accept(pub Vec<Mime>);
|
||||
|
||||
impl Header for Accept {
|
||||
fn header_name(_: Option<Accept>) -> &'static str {
|
||||
"accept"
|
||||
"Accept"
|
||||
}
|
||||
|
||||
fn parse_header(_raw: &[Vec<u8>]) -> Option<Accept> {
|
||||
|
||||
@@ -28,7 +28,7 @@ impl FromStr for Connection {
|
||||
|
||||
impl Header for Connection {
|
||||
fn header_name(_: Option<Connection>) -> &'static str {
|
||||
"connection"
|
||||
"Connection"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<Connection> {
|
||||
|
||||
@@ -11,7 +11,7 @@ pub struct ContentLength(pub uint);
|
||||
|
||||
impl Header for ContentLength {
|
||||
fn header_name(_: Option<ContentLength>) -> &'static str {
|
||||
"content-length"
|
||||
"Content-Length"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<ContentLength> {
|
||||
|
||||
@@ -12,7 +12,7 @@ pub struct ContentType(pub Mime);
|
||||
|
||||
impl Header for ContentType {
|
||||
fn header_name(_: Option<ContentType>) -> &'static str {
|
||||
"content-type"
|
||||
"Content-Type"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<ContentType> {
|
||||
|
||||
@@ -11,7 +11,7 @@ pub struct Date(pub Tm);
|
||||
|
||||
impl Header for Date {
|
||||
fn header_name(_: Option<Date>) -> &'static str {
|
||||
"date"
|
||||
"Date"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<Date> {
|
||||
|
||||
@@ -14,7 +14,7 @@ pub struct Host(pub String);
|
||||
|
||||
impl Header for Host {
|
||||
fn header_name(_: Option<Host>) -> &'static str {
|
||||
"host"
|
||||
"Host"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<Host> {
|
||||
|
||||
@@ -10,7 +10,7 @@ pub struct Server(pub String);
|
||||
|
||||
impl Header for Server {
|
||||
fn header_name(_: Option<Server>) -> &'static str {
|
||||
"server"
|
||||
"Server"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<Server> {
|
||||
|
||||
@@ -57,7 +57,7 @@ impl FromStr for Encoding {
|
||||
|
||||
impl Header for TransferEncoding {
|
||||
fn header_name(_: Option<TransferEncoding>) -> &'static str {
|
||||
"transfer-encoding"
|
||||
"Transfer-Encoding"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<TransferEncoding> {
|
||||
|
||||
@@ -10,7 +10,7 @@ pub struct UserAgent(pub String);
|
||||
|
||||
impl Header for UserAgent {
|
||||
fn header_name(_: Option<UserAgent>) -> &'static str {
|
||||
"user-agent"
|
||||
"User-Agent"
|
||||
}
|
||||
|
||||
fn parse_header(raw: &[Vec<u8>]) -> Option<UserAgent> {
|
||||
|
||||
Reference in New Issue
Block a user