jgit/org.eclipse.jgit.http.test
Thomas Wolf 0d7d98620f Protocol V2: respect MAX_HAVES only once we got at least one ACK
The negotiation in the git protocol contains a cutoff: if the client
has sent more than MAX_HAVES "have" lines without getting an ACK, it
gives up and sends a "done". MAX_HAVES is 256.

However, this cutoff must kick in only if at least one ACK has been
received. Otherwise the client may give up way too early, which makes
the server send all its history. See [1].

This was missed when protocol V2 was implemented for fetching in JGit
in commit 0853a241.

Compare also C git commit 0b07eecf6ed.[2] C git had the same bug.[3][4]

[1] https://github.com/git/git/blob/6c430a647cb9/Documentation/technical/pack-protocol.txt#L385
[2] https://github.com/git/git/commit/0b07eecf6ed
[3] https://lore.kernel.org/git/b7f5bfb9-61fb-2552-4399-b744428728e4@suse.cz/
[4] https://lore.kernel.org/git/20200422084254.GA27502@furthur.local/

Bug: 553083
Change-Id: I1f4e2cc16b5eed6971d981d472329185abb9e4a9
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2021-01-04 10:00:28 +01:00
..
.settings Ignore missing javadoc tags in test bundles 2020-11-29 20:16:38 +01:00
META-INF Prepare 5.11.0-SNAPSHOT builds 2020-12-02 15:57:16 +01:00
src/org/eclipse/jgit/http/test Update EDL 1.0 license headers to new short SPDX compliant format 2020-01-04 01:10:05 +01:00
tst/org/eclipse/jgit Protocol V2: respect MAX_HAVES only once we got at least one ACK 2021-01-04 10:00:28 +01:00
.classpath Configure classpath for separate test sources in Eclipse 2018-10-17 11:08:24 +09:00
.gitignore Make HTTP test project work in Eclipse 2010-01-23 11:29:25 -08:00
.project Enforce the use of Java5 API:s only (with a few exceptions) 2011-12-16 01:01:36 +01:00
BUILD Bazel: Remove superfluous dependencies flagged by unused_deps 2020-05-22 17:48:19 +02:00
build.properties Client-side protocol V2 support for fetching 2021-01-01 21:22:30 +01:00
org.eclipse.jgit.http--All-Tests.launch Add the other test launchers as favorites 2013-06-16 23:33:29 +02:00
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 5.11.0-SNAPSHOT builds 2020-12-02 15:57:16 +01:00