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

Re: [PATCH] remote-curl: don't hang when a server dies before any output

From
Jeff King <peff@peff.net>
Date
Nov 15, 2016, 02:40 UTC
Message-ID
<20161115024043.iuescpzofmrwvfbf@sigill.intra.peff.net>
In-Reply-To
<20161115004426.unheihlmftlw6ex7@sigill.intra.peff.net>
On Mon, Nov 14, 2016 at 07:44:26PM -0500, Jeff King wrote:
Show 12 quoted lines
> > But it does seem to work. At least it doesn't seem to break anything in
> > the test suite, and it fixes the new tests you added. I'd worry that
> > there's some obscure case where the response isn't packetized in the
> > same way.
> 
> Actually, I take it back. I think it works for a single round of ref
> negotiation, but not for multiple. Enabling GIT_TEST_LONG=1 causes it to
> fail t5551.
> 
> I think I've probably made a mis-assumption on exactly when in the HTTP
> protocol we will see a flush packet (and perhaps that is a sign that
> this protocol-snooping approach is not a good one).

Yep, that is it. The server may end with an ACK or a NAK, not a flush packet. So going this route really does mean teaching remote-curl a lot more about the protocol, which is pretty nasty. I think trying to somehow signal the end-of-response to fetch-pack would be a more maintainable approach.

-Peff
Previous: Junio C Hamano
Message 18 of 18 in “remote-curl: don't hang when a server dies before any output”
  1. remote-curl: don't hang when a server dies before any outputDavid Turner, Nov 9, 2016
  2. Jeff KingNov 14, 2016
  3. Jeff KingNov 14, 2016
  4. Junio C HamanoNov 14, 2016
  5. Jeff KingNov 14, 2016
  6. David TurnerNov 14, 2016
  7. Jeff KingNov 14, 2016
  8. David TurnerNov 15, 2016
  9. Jeff KingNov 15, 2016
  10. Junio C HamanoNov 15, 2016
  11. Jeff KingNov 15, 2016
  12. Junio C HamanoNov 15, 2016
  13. Jeff KingNov 18, 2016
  14. David TurnerNov 18, 2016
  15. Jeff KingNov 18, 2016
  16. David TurnerNov 18, 2016
  17. Junio C HamanoNov 18, 2016
  18. Jeff KingNov 15, 2016

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.