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
TTarmigan <tarmigan+git@gmail.com>
Date
Dec 28, 2009, 16:57 UTC
Message-ID
<905315640912280857g710b45fcne21a21d53ff0fedf@mail.gmail.com>
In-Reply-To
<20091228155931.GC2252@spearce.org>
On Mon, Dec 28, 2009 at 10:59 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 8 quoted lines
> Tarmigan <tarmigan+git@gmail.com> wrote:
>> 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'".
I'm no http expert, but isn't that what 401 would be?  From
http://tools.ietf.org/html/rfc2616#section-10.4.4
403 Forbidden
   The server understood the request, but is refusing to fulfill it.
   Authorization will not help and the request SHOULD NOT be repeated.
   If the request method was not HEAD and the server wishes to make
   public why the request has not been fulfilled, it SHOULD describe the
   reason for the refusal in the entity.  If the server does not wish to
   make this information available to the client, the status code 404
   (Not Found) can be used instead.
which to me points to 403 instead of 404.

I don't have a strong preference, and will resend with those changes if you'd prefer 404.

Thanks, Tarmigan

Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 9 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.