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

Fix potential HTTP client hanging issues while retrieving XML payloads #118

Closed
wants to merge 2 commits into from

Conversation

NipunaRanasinghe
Copy link
Contributor

Description

This is added to addressed the possible HTTP client hanging issues mentioned in ballerina-platform/ballerina-library#5714 when using the connector.

Related to https://github.com/wso2-enterprise/internal-support-ballerina/issues/764

One line release note:

  • One line describing the feature/improvement/fix made by this PR

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Ballerina Version:
  • Operating System:
  • Java SDK:

Checklist:

Security checks

@NipunaRanasinghe NipunaRanasinghe marked this pull request as draft August 29, 2024 08:50
@@ -61,7 +62,11 @@ public isolated client class Client {
check generateSignature(self.accessKeyId, self.secretAccessKey, self.region, GET, SLASH, UNSIGNED_PAYLOAD,
requestHeaders);
http:Response httpResponse = check self.amazonS3->get(SLASH, requestHeaders);
xml xmlPayload = check httpResponse.getXmlPayload();
string stringPayload = check httpResponse.getTextPayload();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not required here. The hanging issue can occur only when you return the same response object - httpResponse

@NipunaRanasinghe
Copy link
Contributor Author

NipunaRanasinghe commented Sep 3, 2024

As per the offline discussion with @TharmiganK, we've decided not to ship this fix as per ballerina-platform/ballerina-library#5714 (comment) as this only happens when we send the same http:Response object we retrieve from the previous call (which is not the case in here).

@NipunaRanasinghe
Copy link
Contributor Author

Closing as per #118 (comment)

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.

3 participants