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

Add check to prevent redundant values in headers when using GZIPOutInterceptor #1819

Merged
merged 2 commits into from
Apr 20, 2024
Merged

Add check to prevent redundant values in headers when using GZIPOutInterceptor #1819

merged 2 commits into from
Apr 20, 2024

Conversation

yvrng
Copy link
Contributor

@yvrng yvrng commented Apr 18, 2024

I use a custom feature to retry a client request if it fails. Unfortunately, on each attempt, the Content-Encoding header is modified to add gzip, giving Content-Encoding: gzip,gzip on the 2nd attempt.

I've added a small check before adding the value to the header, to make sure it's not already defined with the expected value.

@reta reta merged commit e4f6a6d into apache:main Apr 20, 2024
4 checks passed
@reta
Copy link
Member

reta commented Apr 20, 2024

Thanks @yvrng !

reta pushed a commit that referenced this pull request Apr 30, 2024
…terceptor (#1819)

* Add check to prevent redundant values in headers when using GZIPOutInterceptor

* Simplify GZIPOutInterceptor#addHeader

(cherry picked from commit e4f6a6d)
reta pushed a commit that referenced this pull request May 1, 2024
…terceptor (#1819)

* Add check to prevent redundant values in headers when using GZIPOutInterceptor

* Simplify GZIPOutInterceptor#addHeader

(cherry picked from commit e4f6a6d)
reta pushed a commit that referenced this pull request May 2, 2024
…terceptor (#1819)

* Add check to prevent redundant values in headers when using GZIPOutInterceptor

* Simplify GZIPOutInterceptor#addHeader

(cherry picked from commit e4f6a6d)
(cherry picked from commit ecc1fb7)
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