Skip to content

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
velo pushed a commit that referenced this pull request Oct 7, 2024
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.

* Remove unnecessary string splits when expanding Headers in RequestTemplate
velo pushed a commit that referenced this pull request Oct 8, 2024
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.

* Remove unnecessary string splits when expanding Headers in RequestTemplate
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