refactor(http1): include bytes in invalid header name panic (#2286)
This commit is contained in:
		| @@ -34,7 +34,10 @@ macro_rules! header_name { | ||||
|  | ||||
|         #[cfg(not(debug_assertions))] | ||||
|         { | ||||
|             HeaderName::from_bytes($bytes).expect("header name validated by httparse") | ||||
|             match HeaderName::from_bytes($bytes) { | ||||
|                 Ok(name) => name, | ||||
|                 Err(_) => panic!("illegal header name from httparse: {:?}", $bytes), | ||||
|             } | ||||
|         } | ||||
|     }}; | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user