s/paramterized/parameterized/

---

Based on:

  Message-ID: <be6fef0d0910100517h1a8b9551jc890251665bbcd69@mail.gmail.com>
fix casing

use MUST, MUST NOT, MAY, SHOULD.
use common rules

 - LF, SP are all defined in RFC 5234 - don't define them again.
 - use HTAB instead of HT - HTAB is another common rule.
 - use obj-id, zero-id, refname - they are defined in protocol-common.txt.
use '/' instead of '|'
ensure use of 2 SP for ABNF lines
whitespace change
fix capabilities definition

For "capabilties^{}" lines, replace obj-id with zero-id.

Define capabilities using rules from pack-protocol.txt - ideally, this
should be shifted to protocol-common.txt.

Also, update the sample conversation by removing the SP between NUL and
cap-list.
s/mangement/management/

---

Based on:

  Message-ID: <7vskdss3ei.fsf@alter.siamese.dyndns.org>

  > +Session State
  > +-------------
  > ...
  > +retained and managed by the client process.  This permits simple
  > +round-robin load-balancing on the server side, without needing to
  > +worry about state mangement.

  s/mangement/management/;
reword 404 para

---

Reflowed to 72 chars.

Based on:

  Message-ID: <20091016142135.GR10505@spearce.org>

  Mike Hommey <mh@glandium.org> wrote:
  > On Thu, Oct 15, 2009 at 10:59:25PM -0700, H. Peter Anvin wrote:
  > > On 10/10/2009 03:12 AM, Antti-Juhani Kaijanaho wrote:
  > > > On 2009-10-09, Junio C Hamano <gitster@pobox.com> wrote:
  > > >>> +If there is no repository at $GIT_URL, the server MUST respond with
  > > >>> +the '404 Not Found' HTTP status code.
  > > >>
  > > >> We may also want to add
  > > >>
  > > >>     If there is no object at $GIT_URL/some/path, the server MUST respond
  > > >>     with the '404 Not Found' HTTP status code.
  > > >>
  > > >> to help dumb clients.
  > > >
  > > > In both cases - is it really necessary to forbid the use of 410 (Gone)?

  My original text got taken a bit out of context here.  I guess MUST
  was too strong of a word.  I more ment something like:

    If there is no repository at $GIT_URL, the server MUST NOT respond
    with '200 OK' and a valid info/refs response.  A server SHOULD
    respond with '404 Not Found', '410 Gone', or any other suitable
    HTTP status code which does not imply the resource exists as
    requested.
whitespace
weaken cookie support para

---

Based on the discussion in
  <20091009195035.GA15153@coredump.intra.peff.net>,
  <20091015165228.GO10505@spearce.org> (patch),
  <20091015173902.GA22262@sigill.intra.peff.net> (agreement)

  Message-ID: <20091015165228.GO10505@spearce.org>

  I weakend the sections on cookies:

  + Authentication
  + --------------
  ....
  + Servers SHOULD NOT require HTTP cookies for the purposes of
  + authentication or access control.

  and that's all we say on the matter.  I took out the Servers MUST
  NOT line under session state.
remove pkt-line format section

This is already available in protocol-common.txt.

In response to <7vskdss3ei.fsf@alter.siamese.dyndns.org>.
fix ABNF reference for smart replies

This was spotted by Sverre and Junio.
mention different variations around $GIT_URL

From <loom.20091009T104530-586@post.gmane.org>.
reword dumb client info/refs para

---

Notes:
 - said "request to" instead of Junio's "request against", for
   consistency with the rest of the document.
 - said "E.g." instead of "I.e." since it's an example request and
   response

Based on:

  Message-ID: <7vskdss3ei.fsf@alter.siamese.dyndns.org>

  > +Dumb Clients
  > +~~~~~~~~~~~~
  > +
  > +HTTP clients that only support the "dumb" protocol MUST discover
  > +references by making a request for the special info/refs file of
  > +the repository.
  > +
  > +Dumb HTTP clients MUST NOT include search/query parameters when
  > +fetching the info/refs file.  (That is, '?' must not appear in the
  > +requested URL.)

  It is unclear if '?' can be part of $GIT_URL. E.g.

      $ wget http://example.xz/serve.cgi?path=git.git/info/refs
      $ git clone http://example.xz/serve.cgi?path=git.git

  It might be clearer to just say

      Dumb HTTP clients MUST make a GET request against $GIT_URL/info/refs,
      without any search/query parameters.  I.e.

          C: GET $GIT_URL/info/refs HTTP/1.0

  to also exclude methods other than GET.
also mention locations matched by $GIT_URL for 404s

---

Junio's suggested text was not used, but the issue (no object found) was
addressed.

Based on:

  Message-ID: <7vskdss3ei.fsf@alter.siamese.dyndns.org>

  > +General Request Processing
  > +--------------------------
  > +
  > +Except where noted, all standard HTTP behavior SHOULD be assumed
  > +by both client and server.  This includes (but is not necessarily
  > +limited to):
  > +
  > +If there is no repository at $GIT_URL, the server MUST respond with
  > +the '404 Not Found' HTTP status code.

  We may also want to add

      If there is no object at $GIT_URL/some/path, the server MUST respond
      with the '404 Not Found' HTTP status code.

  to help dumb clients.
add pkt-line lengths
reword 'remote repository' lines

---

Based on:

  Message-ID: <7vskdss3ei.fsf@alter.siamese.dyndns.org>

  > +Smart Service git-upload-pack
  > +------------------------------
  > +This service reads from the remote repository.

  The wording "remote repository" felt confusing.  I know it is "from the
  repository served by the server", but if it were named without
  "upload-pack", I might have mistaken that you are allowing to proxy a
  request to access a third-party repository by this server.  The same
  comment applies to the git-receive-pack service.
reword smart server response para

---

Based on:

  Message-ID: <7vskdss3ei.fsf@alter.siamese.dyndns.org>

  > +Smart Server Response
  > +^^^^^^^^^^^^^^^^^^^^^
  > +
  > +Smart servers MUST respond with the smart server reply format.
  > +If the server does not recognize the requested service name, or the
  > +requested service name has been disabled by the server administrator,
  > +the server MUST respond with the '403 Forbidden' HTTP status code.

  This is a bit confusing.

  If you as a server administrator want to disable the smart upload-pack for
  one repository (but not for other repositories), you would not be able to
  force smart clients to fall back to the dumb protocol by giving "403" for
  that repository.

  Maybe in 2 years somebody smarter than us will have invented a more
  efficient git-upload-pack-2 service, which is the only fetch protocol his
  server supports other than dumb.  If your v1 smart client asks for the
  original git-upload-pack service and gets a "403", you won't be able to
  fall back to "dumb".

  The solution for such cases likely is to pretend as if you are a dumb
  server for the smart request.  That unfortunately means that the first
  sentence is misleading, and the second sentence is also an inappropriate
  advice.
s/entire/extra/ in include-tag

---

Based on:

  Message-ID: <7vskdss3ei.fsf@alter.siamese.dyndns.org>

  > +Capability include-tag
  > +~~~~~~~~~~~~~~~~~~~~~~
  > +
  > +When packing an object that an annotated tag points at, include the
  > +tag object too.  Clients can request this if they want to fetch
  > +tags, but don't know which tags they will need until after they
  > +receive the branch data.  By enabling include-tag an entire call
  > +to upload-pack can be avoided.
  > +

  I think you are avoiding an "extra" call; you would need one entire call
  to upload-pack anyway for the primary transfer.