Skip to content

Make org.springframework.http.MediaType Serializable [SPR-8738] #13380

@spring-projects-issues

Description

@spring-projects-issues

Artem Bilan opened SPR-8738 and commented

Immediately show an example.

  1. HttpRequest is received with Spring-integration http:inbound-gateway/ without any mapped-request-headers restrictions.
  2. So it applies all HttpHeaders including Accept
  3. Then that String parsed with MediaType.parseMediaTypes and resulted ArrayList stored in MessageHeaders
  4. So, when I use some external messageStore in nested message-flow

java.io.NotSerializableException: org.springframework.http.MediaType

is throwed.
Total: add imlementation java.io.Serializable to org.springframework.http.MediaType for full compatibility of Spring-Web and Spring-integration-http


Affects: 3.0.6

Issue Links:

  • INT-2432 Multi-Valued Non-Serializable Http Headers Cause NotSerializableException in MessageHeaders.writeObject

Referenced from: commits 1fd7bc3

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions