-
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: enhancementA general enhancementA general enhancement
Milestone
Description
Kazuki Shimizu opened SPR-13443 and commented
Currently,ResourceMessageConverter is reading as ByteArrayResource from the HTTP body. If large data has been set at http body, there is possibility that occur the OutOfMemoryError.
I want to be able to read as InputStreamResource as follows:
RestTemplate restTemplate = new RestTemplate();
Resource resource = restTemplate.getForObject("http://localhost:8080/myApp/foo.zip", InputStreamResource.class);How do think ?
I submit a PR at the later.
Affects: 4.2.1
Issue Links:
- RestTemplate with InputStreamResource does not work if Content-Length is not set [SPR-12017] #16633 RestTemplate with InputStreamResource does not work if Content-Length is not set
- resttemplate multipart post with InputStreamResource not working [SPR-13571] #18147 resttemplate multipart post with InputStreamResource not working
- Consistent throwing of HttpMessageNotReadableException in HttpMessageConverter implementations [SPR-16995] #21533 Consistent throwing of HttpMessageNotReadableException in HttpMessageConverter implementations
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement