Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MarshallingView should avoid temporary byte array when copying to response [SPR-11646] #16269

Closed
spring-projects-issues opened this issue Apr 1, 2014 · 0 comments
Assignees
Labels
status: backported type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Apr 1, 2014

Juergen Hoeller opened SPR-11646 and commented

MarshallingView's current code:

StreamUtils.copy(baos.toByteArray(), response.getOutputStream());

can be optimized to:

baos.writeTo(response.getOutputStream());

in order to avoid the temporary copy in a byte array.


Affects: 3.2.8, 4.0.3

Issue Links:

  • #16038 MarshallingView should not close response output stream
  • #16267 ResourceHttpRequestHandler not closing Resource's input stream

Backported to: 3.2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants