Welcome! Log In Create A New Profile

Advanced

[PATCH] Parse: underscores_in_headers should apply to the first character as well

Piotr Sikora
March 19, 2014 09:58PM
# HG changeset patch
# User Piotr Sikora <piotr@cloudflare.com>
# Date 1395280497 25200
# Wed Mar 19 18:54:57 2014 -0700
# Node ID 51d996a6bc65c4ca3c6621e4ad18235e6aa26abe
# Parent c15350f4071c0207cdffbc8bbb3f28e8e57f4d86
Parse: underscores_in_headers should apply to the first character as well.

Signed-off-by: Piotr Sikora <piotr@cloudflare.com>

diff -r c15350f4071c -r 51d996a6bc65 src/http/ngx_http_parse.c
--- a/src/http/ngx_http_parse.c Wed Mar 19 19:30:09 2014 +0400
+++ b/src/http/ngx_http_parse.c Wed Mar 19 18:54:57 2014 -0700
@@ -886,6 +886,19 @@ ngx_http_parse_header_line(ngx_http_requ
break;
}

+ if (ch == '_') {
+ if (allow_underscores) {
+ hash = ngx_hash(hash, ch);
+ r->lowcase_header[0] = ch;
+ i = 1;
+
+ } else {
+ r->invalid_header = 1;
+ }
+
+ break;
+ }
+
if (ch == '\0') {
return NGX_HTTP_PARSE_INVALID_HEADER;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Parse: underscores_in_headers should apply to the first character as well

Piotr Sikora 676 March 19, 2014 09:58PM

Re: [PATCH] Parse: underscores_in_headers should apply to the first character as well

Maxim Dounin 324 March 21, 2014 01:14PM

Re: [PATCH] Parse: underscores_in_headers should apply to the first character as well

Piotr Sikora 316 March 24, 2014 07:50PM

Re: [PATCH] Parse: underscores_in_headers should apply to the first character as well

Maxim Dounin 350 March 25, 2014 12:16PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 251
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready