Skip to content

Conversation

@rajanyadav0307
Copy link
Contributor

Issue # 3666

Description of changes:

Optimized IPv6 address handling in GeneralHTTPCredentialsProvider.cpp.

When the authority part of a URI contains IPv6 brackets (e.g., [fd00:ec2::23]), brackets are removed safely and normalized before any loopback or allowed-host checks.

Single-call construction of Aws::String from the normalized authority to avoid temporary assignments.

Preserves all existing behavior for IPv4, HTTPS, and already-valid IPv6 URIs.

Added clear comments explaining the bracket removal and why it is necessary for loopback checks.

Verified using existing unit tests in GeneralHTTPCredentialsProviderTest.cpp, specifically:

  • http loopback(v6) URI test
  • http link-local EKS URI test

These tests cover bracketed IPv6 addresses and ensure the provider no longer incorrectly rejects valid URIs.

No functional changes beyond fixing invalid rejection of valid HTTP URIs with bracketed IPv6 addresses.

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (Existing unit tests verify correctness; no new tests required.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR:

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant