aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-02-25 11:58:49 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-02-25 12:17:24 -0800
commitdeb49dd1aa4a12003cc445f08b55f3f95859fe67 (patch)
treef4b8d5570cbac0fd53bc6b4e588682aae1425d2e /test/core/end2end
parent8542900a2ed7df7e0b4848f7b1d03ba6a5e34cb6 (diff)
Strip port in peer name check
This string comes from an authority field, which is allowed to contain a ':' port (see https://tools.ietf.org/html/rfc3986#section-3.2). We need to strip it before performing host name verification.
Diffstat (limited to 'test/core/end2end')
-rw-r--r--test/core/end2end/tests/simple_request.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c
index dac82535be..5b36a19f3d 100644
--- a/test/core/end2end/tests/simple_request.c
+++ b/test/core/end2end/tests/simple_request.c
@@ -122,7 +122,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
int was_cancelled = 2;
c = grpc_channel_create_call(f.client, f.client_cq, "/foo",
- "foo.test.google.fr", deadline);
+ "foo.test.google.fr:1234", deadline);
GPR_ASSERT(c);
grpc_metadata_array_init(&initial_metadata_recv);
@@ -178,7 +178,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
GPR_ASSERT(0 == strcmp(details, "xyz"));
GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
- GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr"));
+ GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
GPR_ASSERT(was_cancelled == 0);
gpr_free(details);