Thread (8 messages) flat view 8 messages, 2 authors, 2021-09-10

Re: [PATCH] Docs: web server must setenv GIT_PROTOCOL for v2

From: Junio C Hamano <hidden>
Date: 2021-09-09 17:35:54

Possibly related (same subject, not in this thread)

Junio C Hamano [off-list ref] writes:
quoted
@@ -789,6 +790,9 @@ int cmd_main(int argc, const char **argv)
 	http_config();
 	max_request_buffer = git_env_ulong("GIT_HTTP_MAX_REQUEST_BUFFER",
 					   max_request_buffer);
+	proto_header = getenv("HTTP_GIT_PROTOCOL");
+	if (proto_header)
+		setenv(GIT_PROTOCOL_ENVIRONMENT, proto_header, 1);
Since this overwrites (I noticed the "1" at the end), the server
operator cannot force a particular protocol with their server
configuration, no?

Would a weaker form to use 0 (set if there isn't any, but keep the
value if somebody else already has set it) work OK?  Would that have
a downside?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help