From d43414639a1a217b602b9710f8085d5ba6bf4c00 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Thu, 9 May 2024 10:18:07 -0700 Subject: [PATCH] custom port --- source/credentials_provider_ecs.c | 3 ++- tests/credentials_provider_ecs_tests.c | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/credentials_provider_ecs.c b/source/credentials_provider_ecs.c index b36e6f84..83af7f8a 100644 --- a/source/credentials_provider_ecs.c +++ b/source/credentials_provider_ecs.c @@ -563,7 +563,8 @@ static int s_credentials_provider_ecs_get_credentials_async( if (wrapped_user_data == NULL) { goto error; } - /* No need to verify the host IP address if the connection is using HTTPS or a relative URI with an ECS host. */ + /* No need to verify the host IP address if the connection is using HTTPS or the ECS container host (relative URI) + */ if (impl->is_https || aws_string_eq(impl->host, s_ecs_host)) { impl->function_table->aws_http_connection_manager_acquire_connection( impl->connection_manager, s_ecs_on_acquire_connection, wrapped_user_data); diff --git a/tests/credentials_provider_ecs_tests.c b/tests/credentials_provider_ecs_tests.c index 3ad177bd..900e7816 100644 --- a/tests/credentials_provider_ecs_tests.c +++ b/tests/credentials_provider_ecs_tests.c @@ -875,10 +875,10 @@ static int s_credentials_provider_ecs_basic_success_uri_env(struct aws_allocator .auth_token_file_content = "testToken", .expected_auth_token = "testToken", }, - /* IPv4 loopback address*/ + /* IPv4 loopback address */ { - .full_uri = "http://127.1.2.3:8080/credentials", - .expected_uri = "http://127.1.2.3:8080/credentials", + .full_uri = "http://127.1.2.3:456/credentials", + .expected_uri = "http://127.1.2.3:456/credentials", }, /* IPv4 EKS container host address */ {