gRPC: fixed parsing response headers split on CONTINUATION frames.

This commit is contained in:
Sergey Kandaurov 2018-03-19 16:42:56 +03:00
parent c09aa142d6
commit f3ad346952

View File

@ -2953,7 +2953,7 @@ ngx_http_grpc_parse_fragment(ngx_http_request_t *r, ngx_http_grpc_ctx_t *ctx,
ctx->name.data[ctx->name.len] = '\0';
} else {
ngx_memcpy(ctx->field_end, p, size);
ctx->field_end = ngx_cpymem(ctx->field_end, p, size);
ctx->name.data[ctx->name.len] = '\0';
}
@ -3062,7 +3062,7 @@ ngx_http_grpc_parse_fragment(ngx_http_request_t *r, ngx_http_grpc_ctx_t *ctx,
ctx->value.data[ctx->value.len] = '\0';
} else {
ngx_memcpy(ctx->field_end, p, size);
ctx->field_end = ngx_cpymem(ctx->field_end, p, size);
ctx->value.data[ctx->value.len] = '\0';
}