Browse Source
Once we have read the user's entire command, there is no more need to buffer our response --- even the strictest servlet engine allows writing output once the input has been consumed. Noticed when the analogous code in the "fetch" command (introduced in a later patch) overflowed its buffer: java.lang.OutOfMemoryError at java.io.ByteArrayOutputStream.hugeCapacity(ByteArrayOutputStream.java:123) [...] at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:1905) at org.eclipse.jgit.transport.UploadPack.sendPack(UploadPack.java:1741) at org.eclipse.jgit.transport.UploadPack.fetchV2(UploadPack.java:1001) at org.eclipse.jgit.transport.UploadPack.serviceV2(UploadPack.java:1030) at org.eclipse.jgit.transport.UploadPack.upload(UploadPack.java:726) at org.eclipse.jgit.http.server.UploadPackServlet.doPost(UploadPackServlet.java:195) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) Change-Id: I33df56f1cb1c6c2c25ee95426cb7ad665134ac6bstable-5.0
Jonathan Nieder
7 years ago
1 changed files with 1 additions and 0 deletions
Loading…
Reference in new issue