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

Re: [PATCH 2/2] Smart-http: check if repository is OK to export before serving it

From
Shawn O. Pearce <spearce@spearce.org>
Date
Dec 28, 2009, 15:59 UTC
Message-ID
<20091228155931.GC2252@spearce.org>
In-Reply-To
<905315640912272007i8b4904dv2b93879789b453fb@mail.gmail.com>
Tarmigan <tarmigan+git@gmail.com> wrote:
Show 7 quoted lines
> On Sun, Dec 27, 2009 at 4:10 PM, Shawn O. Pearce <spearce@spearce.org> wrote:
> > Tarmigan Casebolt <tarmigan+git@gmail.com> wrote:
> >> Similar to how git-daemon checks whether a repository is OK to be
> >> exported, smart-http should also check. ?This check can be satisfied
> >> in two different ways: the environmental variable GIT_HTTP_EXPORT_ALL
> >> may be set to export all repositories, or the individual repository
> >> may have the file git-daemon-export-ok.
...
> I've been thinking that the not_found() to a forbidden() instead.
Oh.  Interesting question.

Because you can't resolve the access error by authenticating to the server, we may actually want to just return not_found() here with a message in the log of "Repository not exported: '%s'".

That would mirror the behavior of git-daemon.
-- 
Shawn.
Previous: Tarmigan CaseboltNext: Tarmigan
Message 8 of 14 in “Does smart-http need git-daemon-export-ok?”
  1. TarmiganDec 26, 2009
  2. Junio C HamanoDec 26, 2009
  3. 1/2 Smart-http: Add tests and documentation for export-okTarmigan Casebolt, Dec 26, 2009
  4. 2/2 Smart-http: check if repository is OK to export before serving itTarmigan Casebolt, Dec 26, 2009
  5. Shawn O. PearceDec 27, 2009
  6. TarmiganDec 28, 2009
  7. Smart-http: check if repository is OK to export before serving itTarmigan Casebolt, Dec 28, 2009
  8. Shawn O. PearceDec 28, 2009
  9. TarmiganDec 28, 2009
  10. Shawn O. PearceDec 28, 2009
  11. Smart-http: check if repository is OK to export before serving itTarmigan Casebolt, Dec 28, 2009
  12. Junio C HamanoDec 29, 2009
  13. Shawn O. PearceDec 29, 2009
  14. Shawn O. PearceDec 27, 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.