Repository navigation
Treat runtime HeaderMap values as literals - #3612
Open
hutiefang76 wants to merge 1 commit into
Open
hutiefang76 wants to merge 1 commit into
hutiefang76 wants to merge 1 commit into
Conversation
Use literal headers for runtime maps, including Content-Type, while retaining annotation template expansion and first Content-Type selection. Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
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.
Runtime
@HeaderMapvalues currently go through URI template parsing. A valid header containing a braced literal longer than the URI expression limit throws before the HTTP request is sent; the same problem occurs in a quoted Content-Type parameter.Use the existing literal header path for runtime maps, and honor it in the Content-Type special case. Preserve annotated header expansion and the existing rule that only the first Content-Type value is sent. Add regressions for large JSON and quoted media-type values, plus compatibility coverage and a changelog entry.
Validation: the affected FeignTest, RequestTemplateTest and ExpressionsTest classes pass 132 tests. With the original implementation, the two large-value regressions fail before the request is sent. The full core-module
verifywith the development profile passes: 777 reported tests, 773 executed successfully and 4 skipped by the project configuration. License and format checks remain enabled; the other integration modules were not run.AI assistance was used for investigation, implementation and source review.