git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tarmigan <tarmigan+git@gmail.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, rctay89@gmail.com, drizzd@aon.at,
	warthog9@kernel.org
Subject: Re: [PATCH 2/2] Smart-http: check if repository is OK to export  before serving it
Date: Mon, 28 Dec 2009 11:57:18 -0500	[thread overview]
Message-ID: <905315640912280857g710b45fcne21a21d53ff0fedf@mail.gmail.com> (raw)
In-Reply-To: <20091228155931.GC2252@spearce.org>

On Mon, Dec 28, 2009 at 10:59 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
> 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

  reply	other threads:[~2009-12-28 16:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-26 16:21 Does smart-http need git-daemon-export-ok? Tarmigan
2009-12-26 17:33 ` Junio C Hamano
2009-12-26 23:29   ` [PATCH 1/2] Smart-http: Add tests and documentation for export-ok Tarmigan Casebolt
2009-12-26 23:29     ` [PATCH 2/2] Smart-http: check if repository is OK to export before serving it Tarmigan Casebolt
2009-12-27 21:10       ` Shawn O. Pearce
2009-12-28  4:07         ` Tarmigan
2009-12-28  4:22           ` [PATCH] " Tarmigan Casebolt
2009-12-28 15:59           ` [PATCH 2/2] " Shawn O. Pearce
2009-12-28 16:57             ` Tarmigan [this message]
2009-12-28 17:08               ` Shawn O. Pearce
2009-12-28 21:49                 ` [PATCH] " Tarmigan Casebolt
2009-12-29  9:19                   ` Junio C Hamano
2009-12-29 15:00                     ` Shawn O. Pearce
2009-12-27 21:06   ` Does smart-http need git-daemon-export-ok? Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=905315640912280857g710b45fcne21a21d53ff0fedf@mail.gmail.com \
    --to=tarmigan+git@gmail.com \
    --cc=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rctay89@gmail.com \
    --cc=spearce@spearce.org \
    --cc=warthog9@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).