Welcome! Log In Create A New Profile

Advanced

[nginx] Fixed header parsing with ignore_invalid_headers switched off.

October 15, 2019 07:48AM
details: https://hg.nginx.org/nginx/rev/8f55cb5c7e79
branches:
changeset: 7580:8f55cb5c7e79
user: Ruslan Ermilov <ru@nginx.com>
date: Tue Oct 15 14:46:10 2019 +0300
description:
Fixed header parsing with ignore_invalid_headers switched off.

The parsing was broken when the first character of the header name was invalid.

Based on a patch by Alan Kemp.

diffstat:

src/http/ngx_http_parse.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diffs (21 lines):

diff -r 6208c5418c88 -r 8f55cb5c7e79 src/http/ngx_http_parse.c
--- a/src/http/ngx_http_parse.c Tue Oct 08 21:56:14 2019 +0300
+++ b/src/http/ngx_http_parse.c Tue Oct 15 14:46:10 2019 +0300
@@ -912,6 +912,8 @@ ngx_http_parse_header_line(ngx_http_requ
i = 1;

} else {
+ hash = 0;
+ i = 0;
r->invalid_header = 1;
}

@@ -922,6 +924,8 @@ ngx_http_parse_header_line(ngx_http_requ
return NGX_HTTP_PARSE_INVALID_HEADER;
}

+ hash = 0;
+ i = 0;
r->invalid_header = 1;

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

[nginx] Fixed header parsing with ignore_invalid_headers switched off.

ru@nginx.com 516 October 15, 2019 07:48AM



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

Online Users

Guests: 195
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