I was trying to prevent PHP from parsing POST requests. It does automatically when it sees the according MIME type. For that I was considering following RewriteRule hack:
RewriteCond %{HTTP:Content-Type} ^(multipart/form-data\s*;.*)$
RewriteRule mime.php - [E=CONTENT_TYPE:no/parsing;old=%1]
But the CGI environment still contains the original [CONTENT_TYPE] => multipart/form..
- I could set e.g. ALT_CONTENT_TYPE troublefree, but that's no use to me, because PHP still acts on the original then.
- Likewise changing the case
[E=ContEnt_Type]
will not remove the old header value, it just changes the case really. - Is the CONTENT_TYPE env var constructed at a later stage? Because I also had trouble accessing it as just %{CONTENT_TYPE}. But on a second look, the docs http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritecond didn't mention it anyway.
Is there another way to override this CGI variable?
local testserver:
Server version: Apache/2.2.14 (Ubuntu)
mod_php, not fastcgi
Linux snig 2.6.32-29-generic #58-Ubuntu SMP, 2011 x86_64 GNU/Linux