From 5e054bf11e58049d988746cb76238f8099ac1faa Mon Sep 17 00:00:00 2001 From: ncteisen Date: Tue, 4 Sep 2018 13:01:34 -0700 Subject: [PATCH] Stop unconditionally surfacing user agent to server --- src/core/ext/filters/http/server/http_server_filter.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/ext/filters/http/server/http_server_filter.cc b/src/core/ext/filters/http/server/http_server_filter.cc index 926afeec84f..a238d5f989f 100644 --- a/src/core/ext/filters/http/server/http_server_filter.cc +++ b/src/core/ext/filters/http/server/http_server_filter.cc @@ -262,6 +262,10 @@ static grpc_error* hs_filter_incoming_metadata(grpc_call_element* elem, GRPC_ERROR_STR_KEY, grpc_slice_from_static_string(":authority"))); } + if (b->idx.named.user_agent != nullptr) { + grpc_metadata_batch_remove(b, b->idx.named.user_agent); + } + return error; }