aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2017-03-01 15:09:39 -0800
committerGravatar GitHub <noreply@github.com>2017-03-01 15:09:39 -0800
commit58bbbe999b7e7b955bf998ba529a5f317dc8f7d9 (patch)
treed24610d4caa4e07fdcffd9f62dacbec20a349136 /src
parentd27da0d61e4272323be6846454441e47f11bf801 (diff)
parent5838dbffebf57ebcbf40bc8e7397d9be1ffd076d (diff)
Merge pull request #9940 from yang-g/http_parser
Return an error when the HTTP first line or header is longer than 4K
Diffstat (limited to 'src')
-rw-r--r--src/core/lib/http/parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c
index 2f84adc187..b9c56c103c 100644
--- a/src/core/lib/http/parser.c
+++ b/src/core/lib/http/parser.c
@@ -284,9 +284,9 @@ static grpc_error *addbyte(grpc_http_parser *parser, uint8_t byte,
case GRPC_HTTP_HEADERS:
if (parser->cur_line_length >= GRPC_HTTP_PARSER_MAX_HEADER_LENGTH) {
if (grpc_http1_trace)
- gpr_log(GPR_ERROR, "HTTP client max line length (%d) exceeded",
+ gpr_log(GPR_ERROR, "HTTP header max line length (%d) exceeded",
GRPC_HTTP_PARSER_MAX_HEADER_LENGTH);
- return GRPC_ERROR_NONE;
+ return GRPC_ERROR_CREATE("HTTP header max line length exceeded");
}
parser->cur_line[parser->cur_line_length] = byte;
parser->cur_line_length++;