]> source.dussan.org Git - jgit.git/commit
Ensure the HTTP request is fully consumed 88/3588/1
authorShawn O. Pearce <spearce@spearce.org>
Fri, 27 May 2011 19:04:19 +0000 (12:04 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 31 May 2011 15:58:45 +0000 (08:58 -0700)
commit67a1a0993f3969357c554b2030cfd794b3c3af89
treec05749de9ac453f37713528a9289c2e6490e72c2
parentc1525e2aa5e444a2a234de27d6b7189d5d7f715e
Ensure the HTTP request is fully consumed

Some servlet containers require the servlet to read the EOF marker
from the input stream before a response can be output if the stream
is using "Transfer-Encoding: chunked"... which is typical for any
sort of large push to a repository over smart HTTP.

Ensure the EOF is always read by the PackParser when it is handling
the stream, and fail fast if there is more data present than expected
since this does indicate a protocol error.

Also ensure the EOF is read by UploadPack before it starts to output
a partial response using packing progress meters.

Change-Id: I131db9dea20b2324cb7c3272a814f21296bc64bd
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PackParserTest.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java