-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Martin Bonato opened SPR-13906 and commented
Commit 8ab2e4 for #17312 added support for streaming to BufferedImageHttpMessageConverter. However, it breaks setting the content-type header on non-streaming HttpOutputMessages like ServerServletHttpOutputMessage (also used in MockMvc unit tests).
getBody() is called on the outputMessage before the content-type header is added:
writeInternal(image, contentType, outputMessage.getHeaders(),
outputMessage.getBody());
Calling ServerServletHttpOutputMessage.getBody() causes headers to get written. Headers added afterwards have no effect.
Affects: 4.2 GA, 4.2.1, 4.2.2, 4.2.3, 4.2.4
Reference URL: https://github.com/mbonato/testcase-springframework-SPR-13906
Issue Links:
- All HttpMessageConverters should support StreamingHttpOutputMessage [SPR-12715] #17312 All HttpMessageConverters should support StreamingHttpOutputMessage
Referenced from: commits 39c05c5, b49235a
1 votes, 3 watchers
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug