Skip to content

Commit

Permalink
Fix #11609
Browse files Browse the repository at this point in the history
Signed-off-by: Yanlong He <[email protected]>
  • Loading branch information
heyanlong committed Dec 14, 2023
1 parent 074bc6a commit 7263a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ protected String getFullEndpoint(String endpoint) {
if (!Strings.hasText(endpoint)) {
return null;
}
if (endpoint.startsWith("http")) {
if (endpoint.startsWith("http://") || endpoint.startsWith("https://")) {
return endpoint;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ public void testGetFullEndpointWithoutScheme() {
String endpoint = awsEc2ServiceImpl.getFullEndpoint(clientSettings.endpoint);
assertEquals("https://ec2.us-west-2.amazonaws.com", endpoint);

assertEquals("https://httpserver.example.com", awsEc2ServiceImpl.getFullEndpoint("httpserver.example.com"));

assertNull(awsEc2ServiceImpl.getFullEndpoint(""));
}
}

0 comments on commit 7263a02

Please sign in to comment.