{{ message }}
Repository navigation
Reads response charset after other Content-Type parameters - #3628
Open
hutiefang76 wants to merge 1 commit into
Open
hutiefang76 wants to merge 1 commit into
hutiefang76 wants to merge 1 commit into
Conversation
Scan parameter boundaries outside quoted strings to recognize charset at any position without treating quoted parameter data as a charset. Preserve UTF-8 fallback for missing or unsupported charsets and add decoder tests. Fixes OpenFeign#3626
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.

Content-Type: text/plain; format=flowed; charset=ISO-8859-1currently falls back to UTF-8 becauseResponse.charset()only reads the first parameter. Latin-1 bytes forcaféconsequently decode ascaf�.Scan parameter boundaries outside quoted strings and recognize
charsetat any position. The scanner handles escaped quotes and ignores fake charset text inside another parameter's quoted value. Missing or unsupported charsets retain the UTF-8 fallback. Includes actual decoder regressions and a changelog entry; no dependency or public API change.Fixes #3626. Separate from outgoing FormEncoder handling in #3611 and streaming in #3551.
Validation: baseline
ResponseTest/DefaultDecoderTestreported seven failures among 26 tests. The fixed core passes 783 tests, zero failures/errors, four existing conditional skips withmvn -B -Pdev --toolchains <local-toolchains> -pl core clean install. Root devvalidatepasses (repeated after a test-comment correction). Main sources compile with JDK 8; tests use actual Temurin 25.0.4.1. The skips are the existing parameter-name test and three restricted-header property tests. Independently reviewed full diff.Implemented, tested, independently reviewed and posted with AI assistance for @hutiefang76.