Thread (41 messages) flat view 41 messages, 12 authors, 2016-06-15
DORMANTno replies

[PATCH 09/14] reduce ambiguity over '?' in $GIT_URL for dumb clients

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:58:42
Subsystem: documentation, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

From: Junio C Hamano <redacted>

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

Signed-off-by: Tay Ray Chuan <redacted>
--

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:

  From:   Junio C Hamano [off-list ref]
  Message-ID: [ref]

  > +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.
---
 Documentation/technical/http-protocol.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Documentation/technical/http-protocol.txt b/Documentation/technical/http-protocol.txt
index d0955c2..5141c6a 100644
--- a/Documentation/technical/http-protocol.txt
+++ b/Documentation/technical/http-protocol.txt
@@ -150,9 +150,8 @@ 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.)
+Dumb HTTP clients MUST make a GET request to $GIT_URL/info/refs,
+without any search/query parameters.  E.g.
 
    C: GET $GIT_URL/info/refs HTTP/1.0
 
-- 
1.8.4.rc4.527.g303b16c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help