Skip to content

Commit 4155876

Browse files
committed
Fix to process only correct header names
1 parent 0cfa70b commit 4155876

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

meinheld/server/http_parser.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ do { \
136136
#define PROXY_CONNECTION "proxy-connection"
137137
#define CONNECTION "connection"
138138
#define CONTENT_LENGTH "content-length"
139-
#define TRANSFER_ENCODING "transfer-encoding"
139+
#define TRANSFER_ENCODING "Transfer-Encoding"
140140
#define UPGRADE "upgrade"
141141
#define CHUNKED "chunked"
142142
#define KEEP_ALIVE "keep-alive"
@@ -1311,7 +1311,7 @@ size_t http_parser_execute (http_parser *parser,
13111311
case h_matching_transfer_encoding:
13121312
parser->index++;
13131313
if (parser->index > sizeof(TRANSFER_ENCODING)-1
1314-
|| c != TRANSFER_ENCODING[parser->index]) {
1314+
|| ch != TRANSFER_ENCODING[parser->index]) {
13151315
parser->header_state = h_general;
13161316
} else if (parser->index == sizeof(TRANSFER_ENCODING)-2) {
13171317
parser->header_state = h_transfer_encoding;
@@ -1493,7 +1493,7 @@ size_t http_parser_execute (http_parser *parser,
14931493
case h_matching_transfer_encoding_chunked:
14941494
parser->index++;
14951495
if (parser->index > sizeof(CHUNKED)-1
1496-
|| c != CHUNKED[parser->index]) {
1496+
|| ch != CHUNKED[parser->index]) {
14971497
parser->header_state = h_general;
14981498
} else if (parser->index == sizeof(CHUNKED)-2) {
14991499
parser->header_state = h_transfer_encoding_chunked;

0 commit comments

Comments
 (0)