Skip to content

Regression: AbstractHttpMessageConverter does not set ContentType [SPR-11685] #16308

@spring-projects-issues

Description

@spring-projects-issues

Thierry Messer opened SPR-11685 and commented

AbstractHttpMessageConverter does no longer set the content type of the generated message. It's now always text/html.
This is due to the fact that in a servlet3 environment the class ServletServerHttpResponse uses the new inner class ServletResponseHttpHeaders rather than HttpHeaders.
ServletServerHttpResponse returns the header values of the wrapped HttpServletResponse unlike HttpHeaders which returns null.
This causes the AbstractHttpMessageConverter to not set the ContentType header.


Affects: 4.0.3

Issue Links:

1 votes, 4 watchers

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions