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

Re: [PATCH] http-backend: give a hint that web browser access is not supported

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 5, 2021, 20:13 UTC
Message-ID
<xmqq7dcilsig.fsf@gitster.g>
In-Reply-To
<34pqs81o-36p6-s416-s791-1onsqo1734oo@vanv.qr>
Jan Engelhardt <jengelh@inai.de> writes:
Show 15 quoted lines
>>Also, will the real Git clients, which are the primary intended
>>audiences this program is trying to talk to, be OK if we suddenly
>>start giving a non-empty 404 page?
>
> I am confident enough to say yes. It's not like git-http-backend
> returned anything previously in the 404 case (like JSON or so),
> therefore clients could not possibly depend on content.
>
>>If any implementations of Git HTTP client this program is serving
>>(1) uses a 404 response as a cue to decide its next request
>>(e.g. there may be some "try this URL and if it fails, do another
>>one" fallback logic)
>
> Not sure if they heed Location: headers, but I am not changing
> that :-)

I was more worried about clients barfing because they depend on *not* having content. They parse the status (404) out, and then leave the message part untouched---they may not even read the message in full, and that did not matter because there wasn't anything to read and discard. Now we are sending more.

As long as the leftover bytes would not cause problem with the action they take after that step, we would be OK.

Previous: Jan EngelhardtNext: Junio C Hamano
Message 10 of 11 in “http-backend: give a hint that web browser access is not supported”
  1. http-backend: give a hint that web browser access is not supportedJan Engelhardt, Dec 2, 2021
  2. Junio C HamanoDec 2, 2021
  3. RFE: Split diff.noprefix for git-diff and git-format-patch (was: http-backend: give a hint that web browser access is not supported)Jan Engelhardt, Dec 2, 2021
  4. Junio C HamanoDec 2, 2021
  5. http-backend: give a hint that web browser access is not supportedJan Engelhardt, Dec 2, 2021
  6. Junio C HamanoDec 4, 2021
  7. Jan EngelhardtDec 4, 2021
  8. Junio C HamanoDec 5, 2021
  9. Jan EngelhardtDec 5, 2021
  10. Junio C HamanoDec 5, 2021
  11. Junio C HamanoDec 5, 2021

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.