perf(headers): check for header literals before allocating name
This commit is contained in:
		| @@ -90,7 +90,8 @@ pub struct ContentDisposition { | ||||
|  | ||||
| impl Header for ContentDisposition { | ||||
|     fn header_name() -> &'static str { | ||||
|         "Content-Disposition" | ||||
|         static NAME: &'static str = "Content-Disposition"; | ||||
|         NAME | ||||
|     } | ||||
|  | ||||
|     fn parse_header(raw: &[Vec<u8>]) -> ::Result<ContentDisposition> { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user