From 54238b28e4899e76bb3d7c2dfd8d9bc6fd489b6c Mon Sep 17 00:00:00 2001 From: Piotr Zolnierek Date: Mon, 19 Jan 2015 19:45:48 +0100 Subject: [PATCH] fix(server): Increase MAX_HEADER_FIELD_LENGTH to 4k In order to be able to handle larger headers than 1k, for example header containing tracking cookies etc. references: - http://nginx.org/en/docs/http/ngx_http_core_module.html#large_client_header_buffers - http://stackoverflow.com/questions/686217/maximum-on-http-header-values --- src/http.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http.rs b/src/http.rs index d00169d673..7291f141ed 100644 --- a/src/http.rs +++ b/src/http.rs @@ -498,7 +498,7 @@ pub fn read_http_version(stream: &mut R) -> HttpResult { } const MAX_HEADER_NAME_LENGTH: usize = 100; -const MAX_HEADER_FIELD_LENGTH: usize = 1000; +const MAX_HEADER_FIELD_LENGTH: usize = 4096; /// The raw bytes when parsing a header line. ///