aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/fixtures/http_proxy_fixture.cc
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-02-14 17:34:05 -0800
committerGravatar ncteisen <ncteisen@gmail.com>2018-02-14 17:34:05 -0800
commitbf323a985f0a6f2ab81fe07a790959aee743791d (patch)
tree0588ea5b13d4dc4535ac7c860a71ceddb673c924 /test/core/end2end/fixtures/http_proxy_fixture.cc
parent6f374ea2fef54f0cf12af936bc9a30896830152f (diff)
Use grpc_channel_arg_get_string when appropriate
Diffstat (limited to 'test/core/end2end/fixtures/http_proxy_fixture.cc')
-rw-r--r--test/core/end2end/fixtures/http_proxy_fixture.cc5
1 files changed, 3 insertions, 2 deletions
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;
}
}