feat(server): Make the server code an optional feature (#2334)
				
					
				
			cc #2223 BREAKING CHANGE: The HTTP server code is now an optional feature. To enable the server, add `features = ["server"]` to the dependency in your `Cargo.toml`.
This commit is contained in:
		| @@ -30,6 +30,7 @@ fn connection_has(value: &HeaderValue, needle: &str) -> bool { | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "http1")] | ||||
| #[cfg(feature = "server")] | ||||
| pub fn content_length_parse(value: &HeaderValue) -> Option<u64> { | ||||
|     value.to_str().ok().and_then(|s| s.parse().ok()) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user