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

Re: [PATCH] lib-httpd/apache.conf: check version only after mod_version loads

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 21, 2013, 20:59 UTC
Message-ID
<7vmwqjkwmr.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20130621181250.GA5290@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 57 quoted lines
> Cool. I think the patch should look like the one below, then.
>
> Just to double-check that I have explained the issue correctly, can you
> share the output of "apache2 -l"? Mine has:
>
>   $ apache2 -l
>   Compiled in modules:
>     core.c
>     mod_log_config.c
>     mod_logio.c
>     mod_version.c
>     prefork.c
>     http_core.c
>     mod_so.c
>
> which explains why it works here. I'm assuming you will not have
> mod_version.c compiled in.
>
> -- >8 --
> Subject: lib-httpd/apache.conf: check version only after mod_version loads
>
> Commit 0442743 introduced an <IfVersion> directive near the
> top of the apache config file. However, at that point we
> have not yet checked for and loaded the mod_version module.
> This means that the directive will behave oddly if
> mod_version is dynamically loaded, failing to match when it
> should.
>
> We can fix this by moving the whole block below the
> LoadModule directive for mod_version.
>
> Reported-by: Brian Gernhardt <brian@gernhardtsoftware.com>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  t/lib-httpd/apache.conf | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf
> index 56ae548..dd17e3a 100644
> --- a/t/lib-httpd/apache.conf
> +++ b/t/lib-httpd/apache.conf
> @@ -1,7 +1,4 @@ ServerName dummy
>  ServerName dummy
> -<IfVersion < 2.4>
> -LockFile accept.lock
> -</IfVersion>
>  PidFile httpd.pid
>  DocumentRoot www
>  LogFormat "%h %l %u %t \"%r\" %>s %b" common
> @@ -26,6 +23,10 @@ ErrorLog error.log
>  	LoadModule version_module modules/mod_version.so
>  </IfModule>
>  
> +<IfVersion < 2.4>
> +LockFile accept.lock
> +</IfVersion>
> +

Once you see it in the patch form, it is very clear what this change does and why it is necessary in the context ;-)

Thanks, both of you, for digging this down to the root cause; you guys have done before it graduates to 'master', which I especially appreciate.

Will queue.
Previous: Jeff King
Message 12 of 12 in “HTTP tests fail on OS X”
  1. Brian GernhardtJun 21, 2013
  2. Jeff KingJun 21, 2013
  3. Jeff KingJun 21, 2013
  4. Brian GernhardtJun 21, 2013
  5. Jeff KingJun 21, 2013
  6. Brian GernhardtJun 21, 2013
  7. Jeff KingJun 21, 2013
  8. Brian GernhardtJun 21, 2013
  9. lib-httpd/apache.conf: check version only after mod_version loadsJeff King, Jun 21, 2013
  10. Brian GernhardtJun 21, 2013
  11. Jeff KingJun 21, 2013
  12. Junio C HamanoJun 21, 2013

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.