All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Docs: web server must setenv GIT_PROTOCOL for v2
@ 2021-09-04 15:17 Konstantin Ryabitsev
  2021-09-04 15:55 ` Jeff King
  0 siblings, 1 reply; 20+ messages in thread
From: Konstantin Ryabitsev @ 2021-09-04 15:17 UTC (permalink / raw)
  To: git; +Cc: Konstantin Ryabitsev, Philippe Blain

For the server-side to properly respond to v2 protocol requests, the
webserver must set the GIT_PROTOCOL environment variable to the value of
the Git-Protocol: request header.

Link: https://lore.kernel.org/git/YTNtVJy6sCfQ7T3L@coredump.intra.peff.net/
Reported-by: Philippe Blain <levraiphilippeblain@gmail.com>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
---
 Documentation/technical/protocol-v2.txt | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Documentation/technical/protocol-v2.txt b/Documentation/technical/protocol-v2.txt
index 1040d85319..7a0e97cc8d 100644
--- a/Documentation/technical/protocol-v2.txt
+++ b/Documentation/technical/protocol-v2.txt
@@ -81,6 +81,21 @@ A v2 server would reply:
 Subsequent requests are then made directly to the service
 `$GIT_URL/git-upload-pack`. (This works the same for git-receive-pack).
 
+The web server handling the requests must properly set the GIT_PROTOCOL
+environment variable when it finds `Git-Protocol` in the request headers.
+
+Apache example:
+
+   SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
+
+Nginx + uwsgi example:
+
+   uwsgi_param GIT_PROTOCOL $http_git_protocol;
+
+Nginx + fastcgi example:
+
+   fastcgi_param GIT_PROTOCOL $http_git_protocol;
+
 Capability Advertisement
 ------------------------
 

base-commit: e0a2f5cbc585657e757385ad918f167f519cfb96
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-09-10 22:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04 15:17 [PATCH] Docs: web server must setenv GIT_PROTOCOL for v2 Konstantin Ryabitsev
2021-09-04 15:55 ` Jeff King
2021-09-07 20:57   ` Junio C Hamano
2021-09-07 21:11   ` Konstantin Ryabitsev
2021-09-08 10:48     ` Jeff King
2021-09-08 10:57       ` Jeff King
2021-09-08 16:50         ` Eric Wong
2021-09-09 17:28         ` Junio C Hamano
2021-09-09 17:35           ` Junio C Hamano
2021-09-10 11:39             ` Jeff King
2021-09-10 14:02               ` Jeff King
2021-09-10 14:04                 ` [PATCH 1/5] t5551: test v2-to-v0 http protocol fallback Jeff King
2021-09-10 14:05                 ` [PATCH 2/5] http-backend: handle HTTP_GIT_PROTOCOL CGI variable Jeff King
2021-09-10 14:09                 ` [PATCH 3/5] docs/http-backend: mention v2 protocol Jeff King
2021-09-10 14:09                 ` [PATCH 4/5] docs/git: discuss server-side config for GIT_PROTOCOL Jeff King
2021-09-10 14:10                 ` [PATCH 5/5] docs/protocol-v2: point readers transport config discussion Jeff King
2021-09-10 22:08                 ` [PATCH] Docs: web server must setenv GIT_PROTOCOL for v2 Junio C Hamano
2021-09-09 17:50         ` Philippe Blain
2021-09-10  5:39           ` Junio C Hamano
2021-09-10 11:40             ` Jeff King

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.