]> source.dussan.org Git - jgit.git/commit
Enable smart HTTP transport to place EOF at end of pack 48/5348/2
authorShawn O. Pearce <spearce@spearce.org>
Tue, 13 Mar 2012 18:10:33 +0000 (11:10 -0700)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 13 Mar 2012 18:41:51 +0000 (11:41 -0700)
commitdfff04742f371c57f1f014c023ee90585af52ef1
tree05ef33d52f2dddc5f78565a8c0cb827a9f76f42e
parent95d311f8886f42f31a4475f84aa23c6345ab7059
Enable smart HTTP transport to place EOF at end of pack

When fetching over smart HTTP the InputStream that gets fed into
a PackParser doesn't really support EOF at the end of the pack. It
instead tries to make a new HTTP request, which fails because there
is no request body currently buffered by the client.

Make EOF work correctly on the end of an HTTP derived InputStream
for the pack by denoting no more requests are expected as the higher
level code is now consuming the pack (or side-band embedded pack).
Smart HTTP support doesn't automatically enqueue execute support onto
the end of the UnionInputStream, which allows the UnionInputStream
to correctly reflect EOF when the HTTP response is consumed.

Change-Id: I975f1ab1c81ab1c1af925716970088bc7b8d6b1a
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java