Skip to content

Conversation

@velo
Copy link
Member

@velo velo commented May 2, 2020

Fixes #1217

Specially when using contracts, there is more than one way to set some headers.

Content-Type seems to be the most special one, were client sends one.

This change will guarantee that only one value for this header will survive.

@kdavisk6 do you think there is any situation feign would wan't to send more than one Content-Type header?

@velo velo requested a review from kdavisk6 May 2, 2020 05:06
@velo velo added ready to merge Will be merged if no other member ask for changes bug Unexpected or incorrect behavior labels May 2, 2020
@kdavisk6
Copy link
Member

kdavisk6 commented May 2, 2020

Content type is not a multi-value header according to the spec. Are you sure you don’t mean Accept here?

@velo
Copy link
Member Author

velo commented May 2, 2020

Content type is not a multi-value header according to the spec.

Exactly, but feign was adding multiple values on the Content-Type request.

Are you sure you don’t mean Accept here?

No, content type.

@velo velo merged commit 4ee8cd8 into master May 2, 2020
@velo velo deleted the headers-overwrite branch May 2, 2020 20:42
velo added a commit that referenced this pull request Oct 7, 2024
* Add unit test illustrating #1217

* Make sure content-type is limited to a single value

Co-authored-by: Pierre de Soyres <pierre.de-soyres@eptica.com>
velo added a commit that referenced this pull request Oct 8, 2024
* Add unit test illustrating #1217

* Make sure content-type is limited to a single value

Co-authored-by: Pierre de Soyres <pierre.de-soyres@eptica.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected or incorrect behavior ready to merge Will be merged if no other member ask for changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JAXRS contract on API with @HeaderParam("Content-Type") and @Consumes with multiple values cause feign client build fail

3 participants