Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting endpoint formatting. #8

Merged
merged 1 commit into from
Dec 2, 2023
Merged

Conversation

jameskbride
Copy link
Owner

Context

The endpoint for each subscription was not rendering correctly in the responses because we were URL encoding the value. This caused endpoints to render in the URL encoded format instead of the expected unencoded format. Because the response is an XML response we need to encode & characters as & instead of URL encoding the entire endpoint.

Changes

  • Added an xmlEncodedEndpointUrl() method to the Subscription data class.
  • Updated responses which include the endpoint value (ListSubscriptions, ListSubscriptionsByTopic, GetSubscriptionAttributes) to use the XML-encoded endpoint url.

Testing and Validation Steps

  1. Create a subscription with an endpoint that includes an & character.
  2. Run aws sns list-subscriptions --endpoint-url http://localhost:9911.
  3. Validate that the subscription endpoint renders correctly with the &.
  4. Run aws sns get-subscription-attributes --endpoint-url http://localhost:9911 --subscription-arn <subscription-arn>.
  5. Validate that the subscription endpoint renders correctly with the &.
  6. Run aws sns list-subscritptions-by-topic --endpoint-url http://localhost:9911 --topic-arn <subscription topic arn>.
  7. Validate that the subscription endpoint renders correctly with the &.

@jameskbride jameskbride merged commit f338e55 into main Dec 2, 2023
1 check passed
@jameskbride jameskbride deleted the correct-endpoint-formatting branch December 2, 2023 15:39
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