aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/fixtures/h2_http_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end/fixtures/h2_http_proxy.cc')
-rw-r--r--test/core/end2end/fixtures/h2_http_proxy.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/core/end2end/fixtures/h2_http_proxy.cc b/test/core/end2end/fixtures/h2_http_proxy.cc
index 017682f4c7..b990d7a763 100644
--- a/test/core/end2end/fixtures/h2_http_proxy.cc
+++ b/test/core/end2end/fixtures/h2_http_proxy.cc
@@ -72,11 +72,12 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f,
/* If testing for proxy auth, add credentials to proxy uri */
const grpc_arg* proxy_auth_arg =
grpc_channel_args_find(client_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) {
gpr_asprintf(&proxy_uri, "http://%s",
grpc_end2end_http_proxy_get_proxy_name(ffd->proxy));
} else {
- gpr_asprintf(&proxy_uri, "http://%s@%s", proxy_auth_arg->value.string,
+ gpr_asprintf(&proxy_uri, "http://%s@%s", proxy_auth_str,
grpc_end2end_http_proxy_get_proxy_name(ffd->proxy));
}
gpr_setenv("http_proxy", proxy_uri);