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

Re: Issue 323 in msysgit: Can't clone over http

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Sep 7, 2009, 05:53 UTC
Message-ID
<be6fef0d0909062253p1b86628et8a9f979952eebb00@mail.gmail.com>
In-Reply-To
<7v8wgrbb9e.fsf@alter.siamese.dyndns.org>
Hi,
On Mon, Sep 7, 2009 at 12:59 PM, Junio C Hamano<gitster@pobox.com> wrote:
Show 9 quoted lines
> Before 39dc52c (http: use new http API in fetch_index(), 2009-06-06), we
> used to run the slot by hand and checked results.curl_request against
> CURLE_OK.  Everything else was an error.
>
> With the updated code, that all went to http_get_strbuf() which in turn
> calls http_request() that does the same thing, and the function returns
> HTTP_OK only when it gets CURLE_OK, but now it says MISSING_TARGET when we
> ask for an idx file we think exists in the repository but the server says
> it doesn't, and all other errors will be ignored with this patch.

We should only be interested in the MISSING_TARGET error, because it tells us that the pack file is indeed not available. We aren't interested in other errors, like being unable to perform the request (HTTP_START_FAILED), or, say, a 401 (Unauthorized) error, or even a 500; we simply move along and we tell the user we couldn't perform the check.

> If this codepath is what was broken by github returning 500 [*1*], the
> client before 39dc52c would have failed the same way.  I do not think
> loosening error checking like this is a real solution, but I may be
> reading the patch incorrectly.

You're right to say that git before 39dc52c would have failed. It did, but no one had the chance to break anything, because 39dc52c was part of my http patch series that only went wild in v1.6.4.

We can trace this back to 48188c2 ("http-walker: verify remote packs"), which copied the "feature" from http-push.c to http-walker.c.

Before that, if you tried fetching a pack with http-push.c from a 500-prone server, you would also experience this.

-- 
Cheers,
Ray Chuan
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 16 in “Re: Issue 323 in msysgit: Can't clone over http”
  1. Junio C HamanoSep 4, 2009
  2. Tay Ray ChuanSep 4, 2009
  3. Junio C HamanoSep 7, 2009
  4. Tay Ray ChuanSep 7, 2009
  5. Junio C HamanoSep 7, 2009
  6. Junio C HamanoSep 7, 2009
  7. Tay Ray ChuanSep 7, 2009
  8. Junio C HamanoSep 7, 2009
  9. Jakub NarebskiSep 8, 2009
  10. Tay Ray ChuanSep 8, 2009
  11. Tay Ray ChuanSep 8, 2009
  12. Tay Ray ChuanSep 9, 2009
  13. Junio C HamanoSep 9, 2009
  14. Junio C HamanoSep 11, 2009
  15. Tay Ray ChuanSep 12, 2009
  16. Junio C HamanoSep 12, 2009

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.