You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Akins <ba...@web.turner.com> on 2005/03/07 17:19:32 UTC
and Container
Any thoughts about having two new config containers like these?
<Host > and <HostMatch >
Only apply config when ap_get_server_name(r) matches the directive.
This could go after we walk the location.
I have some hacks in some modules where the same Virtual server answers
for multiple names but must act slightly different for some of them.
<Type > and <TypeMatch >
Only apply when r->content_type matches. This can be done, sort of, now
but it is very awkward.
Any thoughts? I can do a patch if anyone thinks it will be worth the
time. Otherwise, I'll keep my my own hacks in my modules.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Re: and Container
Posted by Brian Akins <ba...@web.turner.com>.
Paul Querna wrote:
> Hmm. Less sure about this one. It seems like it overlaps with other
> things like AddOutputFilterbyType, but, it might be a better way to
> handle it anyways:
>
> <Type application/xml>
> AddOutputFilter XSLT;DEFLATE
> TransformOptions +ApacheFS
> </Type>
I have cases where I need to apply some directive to all text files.
Currently I have to do it this way:
<FilesMatch "\.(htm|html|txt|)>
Blah On
</FilesMatch>
and it would be easier to do this:
<TypeMatch text/(html|plain)>
Blah On
</TypesMatch>
It seems trivial, but I do have some more complicated cases that I
currently have to hack up my modules to do this.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Re: and Container
Posted by Paul Querna <ch...@force-elite.com>.
Brian Akins wrote:
> Any thoughts about having two new config containers like these?
>
> <Host > and <HostMatch >
>
> Only apply config when ap_get_server_name(r) matches the directive. This
> could go after we walk the location.
+1, in concept.
I just was looking at the ap_get_server_name() function, and I didn't
like how it behaves when UseConicalName is 'on'. It currently will
return 'r->server->server_hostname'. This makes it hard for a dynamic
vhosting module to set it per-request. If we copied the
r->server->server_hostname into r->hostname when the request was
created, then modules could easily override r->hostname.
> I have some hacks in some modules where the same Virtual server answers
> for multiple names but must act slightly different for some of them.
>
>
> <Type > and <TypeMatch >
>
Hmm. Less sure about this one. It seems like it overlaps with other
things like AddOutputFilterbyType, but, it might be a better way to
handle it anyways:
<Type application/xml>
AddOutputFilter XSLT;DEFLATE
TransformOptions +ApacheFS
</Type>
I am already sort of liking it...
-Paul