Skip to content

Commit 54238b2

Browse files
author
Piotr Zolnierek
committed
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
1 parent 8bf551b commit 54238b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ pub fn read_http_version<R: Reader>(stream: &mut R) -> HttpResult<HttpVersion> {
498498
}
499499

500500
const MAX_HEADER_NAME_LENGTH: usize = 100;
501-
const MAX_HEADER_FIELD_LENGTH: usize = 1000;
501+
const MAX_HEADER_FIELD_LENGTH: usize = 4096;
502502

503503
/// The raw bytes when parsing a header line.
504504
///

0 commit comments

Comments
 (0)