Skip to content

Treat runtime HeaderMap values as literals - #3612

Open
hutiefang76 wants to merge 1 commit into
OpenFeign:masterfrom
hutiefang76:frank/newten-feign-headers-20261010-01a11186
Open

hutiefang76 wants to merge 1 commit into
OpenFeign:masterfrom
hutiefang76:frank/newten-feign-headers-20261010-01a11186

Conversation

@hutiefang76

Copy link
Copy Markdown
Contributor

Runtime @HeaderMap values 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 verify with 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.

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>
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.

1 participant