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

Re: Cloning from sites with 404 overridden

From
Junio C Hamano <junkio@cox.net>
Date
Mar 23, 2006, 20:45 UTC
Message-ID
<7vwtek51r4.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060323184351.GA3892@reactrix.com>
Nick Hengeveld <nickh@reactrix.com> writes:
Show 7 quoted lines
> Seems like there are three cases to worry about:
>
> 1) the server returns a 200 status and a text/html response instead of a
>    404, and the server's default content type is not text/html
> 2) the server returns a 200 status and a text/html response instead of a
>    404, and the server's default content type is text/html
> 3) the server returns a corrupt object from the repository
> I don't think there's a way to distinguish between #2 and #3, so all we
> can really do is display as helpful an error message as possible.

The code behaves correctly the same way whether the server says 404 or 200 with human readable "No such object", and this is just for formatting error messages, and to be honest I do not really care at this point. I think the existing error message at the end of transfer we added recently should be sufficient.

> On a related note, I noticed that http-fetch will continue to try
> inflating/sha1_updating the response after an inflate error has been
> detected.  It's probably not a huge deal, but we could just error out
> immediately at that point or at least stop the unnecessary processing.
That would probably be more helpful.
Previous: Nick HengeveldNext: Radoslaw Szkodzinski
Message 17 of 18 in “Re: Cloning from sites with 404 overridden”
  1. linux@horizon.comMar 22, 2006
  2. Shawn PearceMar 22, 2006
  3. Linus TorvaldsMar 22, 2006
  4. Marco CostalbaMar 22, 2006
  5. Junio C HamanoMar 22, 2006
  6. Andreas EricssonMar 22, 2006
  7. Mark WoodingMar 24, 2006
  8. Junio C HamanoMar 24, 2006
  9. Linus TorvaldsMar 24, 2006
  10. Morten WelinderMar 24, 2006
  11. Andreas EricssonMar 24, 2006
  12. Nick HengeveldMar 22, 2006
  13. Nick HengeveldMar 22, 2006
  14. Junio C HamanoMar 22, 2006
  15. Junio C HamanoMar 22, 2006
  16. Nick HengeveldMar 23, 2006
  17. Junio C HamanoMar 23, 2006
  18. Radoslaw SzkodzinskiMar 22, 2006

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.