Repository navigation
Conversation
Contributor
Author
|
Hi, just following up on this PR. I'd appreciate a review when you have time, and I'm happy to address any feedback. Thank you! |
The JDK client decodes gzip and deflate responses case-insensitively, but its response header cleanup compares the original encoding value. This leaves Content-Encoding and the compressed Content-Length attached to decoded responses for uppercase or mixed-case values. Normalize the cleanup comparison using Locale.ROOT and extend the POST and HEAD regression tests to cover encoding case variations. Preserve the encoding case in mock responses to reproduce the bug. Closes spring-projectsgh-37385 Signed-off-by: An Seunghyeon <abeb3@naver.com> Signed-off-by: 안승현 <abeb3@naver.com>
Restore the original compression tests and only add mixed-case values to the HEAD request test, which exercises the header cleanup. Wrap the lowercase check to match the code style. See spring-projectsgh-37385 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
bclozel
force-pushed
the
fix/jdk-client-compression-header-case
branch
from
October 22, 2026 09:03
49b0a89 to
3d5aaf3
Compare
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.
Fixes #37385.
JdkClientHttpRequestFactory decompresses gzip and deflate responses
case-insensitively, but retains Content-Encoding and the compressed
Content-Length when the encoding value contains uppercase characters.
Normalize the header cleanup comparison with Locale.ROOT so these
headers are consistently removed.
Extend the existing POST and HEAD tests to cover lowercase, uppercase,
and mixed-case gzip and deflate values. Preserve the original encoding
case in the mock server responses.
Validation:
The test JVM used --enable-native-access=ALL-UNNAMED to address the
Windows/Netty shared-buffer limitation.