From df2d922285c351c6cb962d7ab8cab3b117bc807f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 18 Nov 2016 16:38:57 -0800 Subject: [PATCH] Fixes --- src/core/lib/channel/http_server_filter.c | 2 +- src/core/lib/surface/call.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 9b6a583d200..0d11c71d060 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -126,7 +126,7 @@ static grpc_mdelem server_filter(grpc_exec_ctx *exec_ctx, void *user_data, } else if (grpc_mdelem_eq(md, GRPC_MDELEM_METHOD_GET)) { calld->seen_method = 1; *calld->recv_cacheable_request = true; - } else if (grpc_slice_cmp(GRPC_MDKEY(md), GRPC_MDSTR_SCHEME)) { + } else if (grpc_slice_cmp(GRPC_MDKEY(md), GRPC_MDSTR_SCHEME) == 0) { calld->seen_scheme = 1; } else if (grpc_mdelem_eq(md, GRPC_MDELEM_TE_TRAILERS)) { calld->seen_te_trailers = 1; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 86aa80c79ab..0ca97337e2f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -601,8 +601,8 @@ static int prepare_application_metadata( gpr_log(GPR_ERROR, "attempt to send invalid metadata key: %s", str); gpr_free(str); break; - } else if (!grpc_is_binary_header(md->value) && - !grpc_header_nonbin_value_is_legal(GRPC_MDVALUE(l->md))) { + } else if (!grpc_is_binary_header(md->key) && + !grpc_header_nonbin_value_is_legal(md->value)) { char *str = grpc_dump_slice(md->value, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_ERROR, "attempt to send invalid metadata value: %s", str); gpr_free(str);