feat(compress): support zstd compression#791
Merged
vicky-run merged 4 commits intoopenGemini:mainfrom Nov 20, 2024
Merged
Conversation
xkx9431
commented
Nov 10, 2024
fx408
reviewed
Nov 11, 2024
5c9bfa0 to
1a189a4
Compare
fx408
approved these changes
Nov 15, 2024
1a189a4 to
ceb8ab8
Compare
fx408
approved these changes
Nov 19, 2024
vicky-run
reviewed
Nov 19, 2024
xiangyu5632
reviewed
Nov 19, 2024
ceb8ab8 to
2472f57
Compare
xuthus5
approved these changes
Nov 20, 2024
hezhangjian
approved these changes
Nov 20, 2024
This was referenced Nov 20, 2024
hezhangjian
pushed a commit
that referenced
this pull request
Nov 21, 2024
<!-- Thank you for contributing to openGemini! --> <!-- Mark the checkbox [X] or [x] if you agree with the item. --> ### What problem does this PR solve? <!-- Please create an issue first to describe the problem. There MUST be one line starting with "Issue Number: " and linking the relevant issues via the "close","fix", "resolve" or "ref". --> Issue Number: fix #791 ### What is changed and how it works? Prior to the PR, there were two issues: 1. We should use the HTTP header **Accept-Encoding** instead of content-encoding to determine the compressor. ## Todo - [ ] we also need to consider the content negotiation if http headers contains a list of accept encoding suits. ### 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 - [x] Unit Test - [x] Integration Test - [ ] Test cases to be added - [ ] No code ## validation  # Checklist: - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules Signed-off-by: xkx <[email protected]>
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.
What problem does this PR solve?
Issue Number: close/fix/resolve/ref #775
What is changed and how it works?
lazyCompressResponseWriterWhen client query with http header ``"Accept-Encoding: "zstd"), then we change use the zstd compressor to encode the response
How Has This Been Tested?
In client sdk go side, this works fine with the example

Checklist: