From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id B38791F8C6 for ; Thu, 9 Sep 2021 17:35:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241121AbhIIRhC (ORCPT ); Thu, 9 Sep 2021 13:37:02 -0400 Received: from pb-smtp2.pobox.com ([64.147.108.71]:54981 "EHLO pb-smtp2.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237190AbhIIRhB (ORCPT ); Thu, 9 Sep 2021 13:37:01 -0400 Received: from pb-smtp2.pobox.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 0E245EED86; Thu, 9 Sep 2021 13:35:52 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=58KV5TkvtQxCI55GMK9b69f4yLYNOHVmW5I3V6 0sX8E=; b=BGAd7w0HECLjG8i21uqcnboVdPTUMrQSQBjvOns2dnGXyqj8SFLqiO YMKtGgRvcEYs9J/elVhlM5HWUnSPg8I2gckyJkAICLPKsQcy3CETFKI6sngzhprK LweBd/7GzEN3EWsSMo2fBD9T3IaHi9SrQI84VYeIuVomC0GL0K9/4= Received: from pb-smtp2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp2.pobox.com (Postfix) with ESMTP id 045A0EED84; Thu, 9 Sep 2021 13:35:52 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [104.196.172.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp2.pobox.com (Postfix) with ESMTPSA id 85829EED83; Thu, 9 Sep 2021 13:35:51 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: Jeff King Cc: git@vger.kernel.org, Konstantin Ryabitsev , Philippe Blain Subject: Re: [PATCH] Docs: web server must setenv GIT_PROTOCOL for v2 References: <20210904151721.445117-1-konstantin@linuxfoundation.org> <20210907211128.mauwgxupbredgx7w@meerkat.local> Date: Thu, 09 Sep 2021 10:35:51 -0700 In-Reply-To: (Junio C. Hamano's message of "Thu, 09 Sep 2021 10:28:50 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 60A12A7C-1194-11EC-B111-CD991BBA3BAF-77302942!pb-smtp2.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Junio C Hamano writes: >> @@ -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?