httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Seiler <>
Subject Re: stop copying r->content_type to r->handler?
Date Mon, 01 Jul 2013 16:16:02 GMT
Hi there,

> All releases still have what I guess is an old pre-SetHandler
> mechanism to allow content type -> handler mappings. If no r->handler
> has been set, but a content-type has, the content-type is copied to
> r->handler.

As an httpd user who's reading this proposal: Currently, I like to
configure PHP in combination with Apache in such a way that I set the
content type and then have Action application/x-httpd-php ... I don't
want to use AddHandler, since then Apache also processes files ending
in .php.txt with PHP, so the usage of the content type as handler has
been very useful to me. (Btw. this is PHP as CGI/FastCGI, hence the
Action statement.)

I've just skimmed the current httpd documentation for SetHandler and
there's the example of

<FilesMatch \.php$>
     SetHandler application/x-httpd-php

Obviously, this should also work for the standard case of a file just
ending in .php, but if you want to then combine the whole thing with
for example MultiViews, then the FilesMatch rule has to become more
compilicated. And since a .txt suffix shouldn't cause PHP to process
them, I'd have to provide and update a whitelist of languages
instead of just relying on the fact that MultiViews "just works". I
believe this makes these kinds of configurations unnecessarily
harder. Unless I overlooked something.

Just my 2c as a user.

-- Christian

View raw message