Skip to content

Support zero-length chunked-encoded responses from XML services. #2964

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

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

millems
Copy link
Contributor

@millems millems commented Jan 13, 2022

The current code currently only considers responses with a content-length of zero as being empty. That isn't sufficient for chunk-encoded responses, which do not have a content-length. This change updates the logic to instead read a single byte off of the response stream to see if it's empty. This works for both zero content-length and empty chunked encoding streams.

The current code currently only considers responses with a content-length of zero as being empty. That isn't sufficient for chunk-encoded responses, which do not have a content-length. This change updates the logic to instead read a single byte off of the response stream to see if it's empty. This works for both zero content-length and empty chunked encoding streams.
@millems millems requested a review from a team as a code owner January 13, 2022 01:34
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

88.5% 88.5% Coverage
0.0% 0.0% Duplication

@millems millems enabled auto-merge (squash) January 13, 2022 19:24
@millems millems merged commit 3170d9f into master Jan 13, 2022
@millems millems deleted the millem/handle-empty-chunked-encoded-xml-responses branch October 19, 2022 19:36
aws-sdk-java-automation added a commit that referenced this pull request Apr 10, 2024
…6a40dff07

Pull request: release <- staging/212738eb-72f0-4eb7-b258-89e6a40dff07
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.

2 participants