From bf323a985f0a6f2ab81fe07a790959aee743791d Mon Sep 17 00:00:00 2001 From: ncteisen Date: Wed, 14 Feb 2018 17:34:05 -0800 Subject: Use grpc_channel_arg_get_string when appropriate --- test/core/end2end/fixtures/http_proxy_fixture.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/core/end2end/fixtures/http_proxy_fixture.cc') diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index 289843e737..cf7855494f 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -413,12 +413,13 @@ static void on_read_request_done(void* arg, grpc_error* error) { // If proxy auth is being used, check if the header is present and as expected const grpc_arg* proxy_auth_arg = grpc_channel_args_find( conn->proxy->channel_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); - if (proxy_auth_arg != nullptr && proxy_auth_arg->type == GRPC_ARG_STRING) { + const char* proxy_auth_str = grpc_channel_arg_get_string(proxy_auth_arg); + if (proxy_auth_str != nullptr) { bool client_authenticated = false; for (size_t i = 0; i < conn->http_request.hdr_count; i++) { if (strcmp(conn->http_request.hdrs[i].key, "Proxy-Authorization") == 0) { client_authenticated = proxy_auth_header_matches( - conn->http_request.hdrs[i].value, proxy_auth_arg->value.string); + conn->http_request.hdrs[i].value, proxy_auth_str); break; } } -- cgit v1.2.3