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

Re: [PATCH] http: fix v1 protocol tests with apache httpd < 2.4

From
BWBrandon Williams <bmwill@google.com>
Date
Jan 3, 2018, 00:21 UTC
Message-ID
<20180103002145.GA242551@google.com>
In-Reply-To
<20171231023234.21215-1-tmz@pobox.com>
On 12/30, Todd Zullinger wrote:
Show 29 quoted lines
> The apache config used by tests was updated to use the SetEnvIf
> directive to set the Git-Protocol header in 19113a26b6 ("http: tell
> server that the client understands v1", 2017-10-16).
> 
> Setting the Git-Protocol header is restricted to httpd >= 2.4, but
> mod_setenvif and the SetEnvIf directive work with lower versions, at
> least as far back as 2.0, according to the httpd documentation:
> 
>     https://httpd.apache.org/docs/2.0/mod/mod_setenvif.html
> 
> Drop the restriction.  Tested with httpd 2.2 and 2.4.
> 
> Signed-off-by: Todd Zullinger <tmz@pobox.com>
> ---
> 
> These tests fail with 2.16.0-rc0 on CentOS-6, which uses
> httpd-2.2.
> 
> I removed the version restriction entirely rather than adjust
> the version.  I believe SetEnvIf works on httpd >= 2.0.  I'm
> not sure if we aim to support anything less than httpd 2.0,
> but I'm betting not.  If that's incorrect, I can add some
> IfVersion conditions.
> 
> As noted in the commit message, I only tested with httpd 2.2
> and 2.4 (on CentOS 6/7 and Fedora 26-28).  If anyone has older
> httpd systems which need support, it would be great if they
> could test this before 2.16.0 is finalized, so we can avoid
> shipping with any failing tests.

Seems good to me. I think I was just being overly cautious when i was implementing those patches. Thanks!

Show 42 quoted lines
> 
>  t/lib-httpd/apache.conf | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
> index df19436314..724d9ae462 100644
> --- a/t/lib-httpd/apache.conf
> +++ b/t/lib-httpd/apache.conf
> @@ -25,6 +25,9 @@ ErrorLog error.log
>  <IfModule !mod_headers.c>
>  	LoadModule headers_module modules/mod_headers.so
>  </IfModule>
> +<IfModule !mod_setenvif.c>
> +	LoadModule setenvif_module modules/mod_setenvif.so
> +</IfModule>
>  
>  <IfVersion < 2.4>
>  LockFile accept.lock
> @@ -67,9 +70,6 @@ LockFile accept.lock
>  <IfModule !mod_unixd.c>
>  	LoadModule unixd_module modules/mod_unixd.so
>  </IfModule>
> -<IfModule !mod_setenvif.c>
> -	LoadModule setenvif_module modules/mod_setenvif.so
> -</IfModule>
>  </IfVersion>
>  
>  PassEnv GIT_VALGRIND
> @@ -79,9 +79,7 @@ PassEnv ASAN_OPTIONS
>  PassEnv GIT_TRACE
>  PassEnv GIT_CONFIG_NOSYSTEM
>  
> -<IfVersion >= 2.4>
> -	SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
> -</IfVersion>
> +SetEnvIf Git-Protocol ".*" GIT_PROTOCOL=$0
>  
>  Alias /dumb/ www/
>  Alias /auth/dumb/ www/auth/dumb/
> -- 
> 2.16.0.rc0
> 
-- 
Brandon Williams
Previous: Todd ZullingerNext: Todd Zullinger
Message 2 of 6 in “http: fix v1 protocol tests with apache httpd < 2.4”
  1. http: fix v1 protocol tests with apache httpd < 2.4Todd Zullinger, Dec 31, 2017
  2. Brandon WilliamsJan 3, 2018
  3. Todd ZullingerJan 3, 2018
  4. Jeff KingJan 3, 2018
  5. Todd ZullingerJan 3, 2018
  6. Jeff KingJan 3, 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.