Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Piotr Zolnierek committed Jan 19, 2015
1 parent 8bf551b commit 54238b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/http.rs
Expand Up @@ -498,7 +498,7 @@ pub fn read_http_version<R: Reader>(stream: &mut R) -> HttpResult<HttpVersion> {
}

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.
///
Expand Down

0 comments on commit 54238b2

Please sign in to comment.