All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Tarmigan <tarmigan+git@gmail.com>
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 09:08:11 -0800	[thread overview]
Message-ID: <20091228170811.GE2252@spearce.org> (raw)
In-Reply-To: <905315640912280857g710b45fcne21a21d53ff0fedf@mail.gmail.com>

Tarmigan <tarmigan+git@gmail.com> wrote:
> 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.
> >
> > 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.

Good point, that is 403.  But the last sentance leads me to believe
404 might be a better use here.  Under git-daemon we don't tell
the client the difference between "Not Found" and "Not Exported",
so I think we should be doing the same thing here under HTTP.
 
-- 
Shawn.

  reply	other threads:[~2009-12-28 17:09 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
2009-12-28 17:08               ` Shawn O. Pearce [this message]
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=20091228170811.GE2252@spearce.org \
    --to=spearce@spearce.org \
    --cc=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=rctay89@gmail.com \
    --cc=tarmigan+git@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.