Merged
Conversation
acf17a8 to
8290974
Compare
AWS docs specify that this encoding is not persisted or returned if it's the only value sent in the "Content-Encoding" header. Fixes #2218
8290974 to
8cfb422
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the logic for storing HTTP headers so that the "aws-chunked" content-encoding is not persisted when it is the only value and also improves method naming and tests to support the change.
- Updated HeaderUtil.java to conditionally exclude "aws-chunked" if it is the sole encoding header.
- Renamed methods and updated ServiceBase.java to use the new logic.
- Adjusted tests in AwsChunkedEncodingIT.kt and modified the cleanup logic in S3TestBase.kt.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/main/java/com/adobe/testing/s3mock/util/HeaderUtil.java | Updates header storage logic and adds helper method to detect sole "aws-chunked" encoding. |
| server/src/main/java/com/adobe/testing/s3mock/service/ServiceBase.java | Refactors usage of header-checking methods to align with updated HeaderUtil.java. |
| integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/S3TestBase.kt | Removes condition that previously skipped cleanup of a specific test bucket. |
| integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/AwsChunkedEncodingIT.kt | Fixes a typo in the test class name and updates tests to assert the absence of "aws-chunked" encoding. |
| CHANGELOG.md | Updates version information and changelog content to reflect the new changes. |
Comments suppressed due to low confidence (1)
integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/S3TestBase.kt:229
- The removal of the condition that skips the 'testputandgetretention-545488000' bucket in cleanupStores might lead to unintended deletion of this special test bucket. Consider reintroducing the condition or adding a comment to clarify the intended change.
if(bucket.name() == "testputandgetretention-545488000") {return}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
AWS docs specify that this encoding is not persisted or returned if it's the only value sent in the "Content-Encoding" header.
Related Issue
Fixes #2218
Tasks