Bug #68006 [Fbk->Opn]: PHP-FPM strips headers
| From: | aneganov at gmail dot com | Date: | Thu, 08 Jan 2015 23:22:47 +0000 |
| Subject: | Bug #68006 [Fbk->Opn]: PHP-FPM strips headers | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189777@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68006&edit=1
ID: 68006
User updated by: aneganov at gmail dot com
Reported by: aneganov at gmail dot com
Summary: PHP-FPM strips headers
-Status: Feedback
+Status: Open
Type: Bug
Package: FPM related
Operating System: Ubuntu 12.04
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
PHP 5.3.10-1ubuntu3.15 with Suhosin-Patch (cli) (built: Oct 29 2014 12:19:04)
But as you said, it's not PHP-FPM fault, this issue should be closed and probably a follow-up
opened for underlying "libapache2-mod-fastcgi", but IIRIC it's not actively
maintained.
After I upgraded from Apache 2.2 to Apache 2.4 and replaced "libapache2-mod-fastcgi" with
"mod-proxy", and started adding headers by hand in LUA hooks, it started working.
Previous Comments:
------------------------------------------------------------------------
[2015-01-08 21:43:04] danack@php.net
Hi,
can you provide some more information about this issue as it's not clear what issue you are
seeing. In CGI, after PHP processes the request, the response and the headers are passed to Apache,
which then serves them to the user.
If you've configured Apache to add some headers to the response, then it wouldn't be
possible for PHP to 'strip' them from the response.
Also please say which version of PHP are you using, and some example config for Apache that shows
this issue.
------------------------------------------------------------------------
[2014-09-11 12:42:23] aneganov at gmail dot com
Description:
------------
Whatever header I added via apache config it is stripped by PHP-FPM.
Example headers why are stripped:
Content-Type's charset
X-Frame-Option
Access-Control-Allow-Origin
- all of them are stripped from the output.
I didn't find any configuration or something which allows to change this.
I use PHP-FPM with Apache 2.2 and mod_fastcgi.
This make it impossible to use AddDefaultCharset in apache confs for example.
Expected result:
----------------
Trasparent passing the headers to the user
Actual result:
--------------
Custom headers are stripped
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68006&edit=1