#13421 [Csd->Opn]: Problematic MIME-Type "application/x-httpd-php"
| From: | hholzgra@php.net | Date: | Fri, 09 Aug 2002 09:39:03 +0000 |
| Subject: | #13421 [Csd->Opn]: Problematic MIME-Type "application/x-httpd-php" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-16373@lists.php.net to get a copy of this message | ||
ID: 13421
Updated by: hholzgra@php.net
Reported By: php@matthias-wimmer.de
-Status: Closed
+Status: Open
Bug Type: Apache related
Operating System: Linux
PHP Version: 4.0.6
New Comment:
sorry, mixed up two bugs here, reopening
Previous Comments:
------------------------------------------------------------------------
[2002-08-08 16:40:25] hholzgra@php.net
thats something you have to deal with at the application level IMHO
PHP cannot do much about it as it does not deal with static content
like apache does, so it makes no sense to run a script first and
discard the results later just because the do not match the accept
types
a client sending accept headers should be clever enogh to deal with
unexpected return types so no harm should be taken by this
------------------------------------------------------------------------
[2001-09-24 17:53:15] php@matthias-wimmer.de
I noticed that using the MIME-Type "application/x-httpd-php" for
php-Scripts produces a problem under Apache 1.3.x with MultiViews
turned on.
When an user agent (like Google or Altavista) sends the Header "Accept:
text/*" and the complete location is not given (e.g.
"http://domain.com/index" instead of "http://domain.com/index.php")
Apache tries to guess the right file-name extension. But Apache will
answer the request with a 406 error ("not acceptable") becaus it thinks
the php file is of type "application/x-httpd-php", which is not
compatible to "text/*".
Me suggested solution would be to change the MIME-Type to
"text/x-httpd-php". Content negotiation under Apache 1.3 would work
then.
Note: This problem is non existend at Apache 2.0.x where I can change
the MIME type without any problems because php is a filter there.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=13421&edit=1