git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t5551: test usage of chunked encoding explicitly

From
Jeff King <peff@peff.net>
Date
Jun 5, 2019, 19:41 UTC
Message-ID
<20190605194143.GA12686@sigill.intra.peff.net>
In-Reply-To
<20190605192624.129677-1-jonathantanmy@google.com>
On Wed, Jun 05, 2019 at 12:26:24PM -0700, Jonathan Tan wrote:
Show 13 quoted lines
> When run using GIT_TEST_PROTOCOL_VERSION=2, a test in t5551 fails
> because 4 POSTs (probe, ls-refs, probe, fetch) are sent instead of 2
> (probe, fetch).
> 
> One way to resolve this would be to relax the condition (from "= 2" to
> greater than 1, say), but upon further inspection, the test probably
> shouldn't be counting the number of POSTs. This test states that large
> requests are split across POSTs, but this is not correct; the main
> change is that chunked transfer encoding is used, but the request is
> still contained within one POST. (The test coincidentally works because
> Git indeed sends 2 POSTs in the case of a large request, but that is
> because, as stated above, the first POST is a probing RPC - see
> post_rpc() in remote-curl.c for more information.)

That seems reasonable. What I was really going for with this test was just ensuring that we were actually hitting the "large request" code path at all. And checking for chunked encoding is another way of doing that. (And I certainly agree that "split across POSTs" is an inaccurate way of describing what it was trying for).

> With this change, all tests pass at master with
> GIT_TEST_PROTOCOL_VERSION=2.
Yay. Thanks for your persistence with this.
-Peff
Previous: Derrick Stolee
Message 3 of 3 in “t5551: test usage of chunked encoding explicitly”
  1. t5551: test usage of chunked encoding explicitlyJonathan Tan, Jun 5, 2019
  2. Derrick StoleeJun 5, 2019
  3. Jeff KingJun 5, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.