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

GH-1270: Fix conflict between single and multi-value headers #1347

Merged

Conversation

kdavisk6
Copy link
Member

Fixes: #1270

HeaderTemplate was confusing iterable values with literal values due
to the presence of comma , characters in the result. The result was
that, in certain cases like HTTP Dates, additional spaces were inserted
into the final expanded value.

The root cause of the issue is that HeaderTemplate combined all values
into a single String template, with each value separated by a comma.

This change refactors HeaderTemplate to treat all values as individual
Templates, removing the need to combine any provided values into a single
String.

Fixes: OpenFeign#1270

`HeaderTemplate` was confusing iterable values with literal values due
to the presence of comma `,` characters in the result.  The result was
that, in certain cases like HTTP Dates, additional spaces were inserted
into the final expanded value.

The root cause of the issue is that `HeaderTemplate` combined all values
into a single `String` template, with each value separated by a comma.

This change refactors `HeaderTemplate` to treat all `values` as individual
`Templates`, removing the need to combine any provided values into a single
String.
@kdavisk6 kdavisk6 merged commit f8ad867 into OpenFeign:master Dec 29, 2020
@kdavisk6 kdavisk6 deleted the gh-1270-comma-as-internal-separator branch December 29, 2020 20:34
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.

Feign HeaderTemplates adds an extra space to date headers after commas
1 participant