Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Dev

Include strangeness

 

 

Apache dev RSS feed   Index | Next | Previous | View Threaded


sf at sfritsch

Jan 22, 2012, 10:14 AM

Post #1 of 7 (176 views)
Permalink
Include strangeness

Apart from the fact that the docs to Include do not match the code and
IncludeOptional is not documented at all, the way Include interacts
with directory wildcards is a bit strange:

I have conf/extra/httpd-userdir.conf and a directory conf/original
(without httpd-userdir.conf in it). This makes


Include conf/*/httpd-userdir.conf

fail with

httpd: Syntax error on line 481 of /usr/local/apache2/conf/httpd.conf:
Could not open configuration file
/usr/local/apache2/conf/original/httpd-userdir.conf: No such file or
directory

even though the whole Include statement does match one file. I think
this makes directory wildcards a lot less useful with Include. Is this
intentional or an implementation quirk? Of course, one can always use
IncludeOptional...


BTW, does anyone have some free cycles to fix the docs?


covener at gmail

Jan 22, 2012, 1:08 PM

Post #2 of 7 (164 views)
Permalink
Re: Include strangeness [In reply to]

> even though the whole Include statement does match one file. I think
> this makes directory wildcards a lot less useful with Include. Is this
> intentional or an implementation quirk? Of course, one can always use
> IncludeOptional...
>

See this relevant thread:

http://www.gossamer-threads.com/lists/apache/dev/382531?do=post_view_threaded#382531


sf at sfritsch

Jan 22, 2012, 2:59 PM

Post #3 of 7 (171 views)
Permalink
Re: Include strangeness [In reply to]

On Sunday 22 January 2012, Eric Covener wrote:
> > even though the whole Include statement does match one file. I
> > think this makes directory wildcards a lot less useful with
> > Include. Is this intentional or an implementation quirk? Of
> > course, one can always use IncludeOptional...
>
> See this relevant thread:
>
> http://www.gossamer-threads.com/lists/apache/dev/382531?do=post_vie
> w_threaded#382531

Looking at that thread I guess I should not have opened that can of
worms again. Let's just fix the docs to match the code.


isoma at jellybaby

Jan 22, 2012, 3:25 PM

Post #4 of 7 (162 views)
Permalink
Re: Include strangeness [In reply to]

On 22 Jan 2012, at 18:14, Stefan Fritsch wrote:

> I have conf/extra/httpd-userdir.conf and a directory conf/original (without httpd-userdir.conf in it). This makes
>
> Include conf/*/httpd-userdir.conf
>
> fail

> even though the whole Include statement does match one file. I think this makes directory wildcards a lot less useful with Include. Is this intentional or an implementation quirk? Of course, one can always use IncludeOptional...

Can of worms or not, I worry that releasing 2.4.x means setting this behaviour in stone. Until 2.6 comes out, at least.

Without writing a line of code, committers can agree on what the /expected/ behaviour is and document that for the release. Code to implement this can follow later.

If this triggers a long, unhappy discussion then I would regret posting. On the other hand, if Stefan's question leads to a better experience for httpd users, that's really great.

--
Tim Bannister – isoma [at] jellybaby
Attachments: smime.p7s (4.29 KB)


wrowe at rowe-clan

Jan 22, 2012, 7:45 PM

Post #5 of 7 (167 views)
Permalink
Re: Include strangeness [In reply to]

On 1/22/2012 12:14 PM, Stefan Fritsch wrote:
> Apart from the fact that the docs to Include do not match the code and
> IncludeOptional is not documented at all, the way Include interacts
> with directory wildcards is a bit strange:
>
> I have conf/extra/httpd-userdir.conf and a directory conf/original
> (without httpd-userdir.conf in it). This makes
>
>
> Include conf/*/httpd-userdir.conf
>
> fail with
>
> httpd: Syntax error on line 481 of /usr/local/apache2/conf/httpd.conf:
> Could not open configuration file
> /usr/local/apache2/conf/original/httpd-userdir.conf: No such file or
> directory
>
> even though the whole Include statement does match one file. I think
> this makes directory wildcards a lot less useful with Include. Is this
> intentional or an implementation quirk? Of course, one can always use
> IncludeOptional...

That is a bug. Any pattern matching at least one file is a success
for either Include or IncludeOptional. Any pattern matching no files
whatsoever should fail the Include statement, while IncludeOptional
would keep right on truckin with no emits.

That's what the principal of least astonishment would suggest.


wrowe at rowe-clan

Jan 22, 2012, 7:45 PM

Post #6 of 7 (163 views)
Permalink
Re: Include strangeness [In reply to]

On 1/22/2012 5:25 PM, Tim Bannister wrote:
>
> If this triggers a long, unhappy discussion then I would regret posting. On the other hand, if Stefan's question leads to a better experience for httpd users, that's really great.

+1


sf at sfritsch

Jan 23, 2012, 8:20 AM

Post #7 of 7 (163 views)
Permalink
Re: Include strangeness [In reply to]

On Monday 23 January 2012, William A. Rowe Jr. wrote:
> On 1/22/2012 5:25 PM, Tim Bannister wrote:
> > If this triggers a long, unhappy discussion then I would regret
> > posting. On the other hand, if Stefan's question leads to a
> > better experience for httpd users, that's really great.
>
> +1

OK, I have removed the buggy behavior from the docs and made PR 52505
out of it. Since fixing the bug won't break anyone's config (it will
just allow some more configs), this is no blocker for 2.4 GA.

Apache dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.