git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] protocol-v2 doc: put HTTP headers after request

From
Josh Steadmon <steadmon@google.com>
Date
Jun 22, 2018, 19:01 UTC
Message-ID
<20180622190112.7559-1-steadmon@google.com>
HTTP servers return 400 if you send headers before the GET request.
Signed-off-by: Josh Steadmon <steadmon@google.com>
---
 Documentation/technical/protocol-v2.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
index 49bda76d2..f58f24b1e 100644
--- a/Documentation/technical/protocol-v2.txt
+++ b/Documentation/technical/protocol-v2.txt
@@ -64,9 +64,8 @@ When using the http:// or https:// transport a client makes a "smart"
 info/refs request as described in `http-protocol.txt` and requests that
 v2 be used by supplying "version=2" in the `Git-Protocol` header.
 
-   C: Git-Protocol: version=2
-   C:
    C: GET $GIT_URL/info/refs?service=git-upload-pack HTTP/1.0
+   C: Git-Protocol: version=2
 
 A v2 server would reply:
 
-- 
2.18.0.rc2.346.g013aa6912e-goog
Next: Jonathan Nieder
Message 1 of 3 in “protocol-v2 doc: put HTTP headers after request”
  1. protocol-v2 doc: put HTTP headers after requestJosh Steadmon, Jun 22, 2018
  2. Jonathan NiederJun 22, 2018
  3. Jonathan NiederJun 22, 2018

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.