diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index b69ab997042a6d3d4cfb8db52301d85b2a5ea80c..347fc5c2082d85fc190a4dd7dc6d79edf6745e61 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -297,7 +297,7 @@ static grpc_error *hc_mutate_op(grpc_exec_ctx *exec_ctx, const int k_url_safe = 1; const int k_multi_line = 0; const char *k_query_separator = "?"; - const size_t k_query_separator_len = GPR_ARRAY_SIZE(k_query_separator); + const size_t k_query_separator_len = 1; /* strlen(k_query_separator) */ grpc_slice path_slice = GRPC_MDVALUE(op->send_initial_metadata->idx.named.path->md); diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 4ca4602cba0a99e8132d3782297c271870e6b388..3bac5af883962beded0573643735dedf935e208e 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -214,7 +214,7 @@ static grpc_error *server_filter_incoming_metadata(grpc_exec_ctx *exec_ctx, /* substitute path metadata with just the path (not query) */ grpc_mdelem mdelem_path_without_query = grpc_mdelem_from_slices( - exec_ctx, GRPC_MDSTR_PATH, grpc_slice_sub(path_slice, 0, offset)); + exec_ctx, GRPC_MDSTR_PATH, grpc_slice_sub_no_ref(path_slice, 0, offset)); grpc_metadata_batch_substitute(exec_ctx, b, b->idx.named.path, mdelem_path_without_query);