X-Accel-Redirect not passing Content-Type?
mike503 at gmail.com
Wed Apr 8 04:14:39 MSD 2009
and if you want to FORCE the header
header('Content-Type: foo/bar', true);
the true will make sure it overrides
On Tue, Apr 7, 2009 at 4:59 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Tue, Apr 07, 2009 at 02:51:39PM -0700, Kon Wilms wrote:
>> I'm having an odd problem with x-accel-redirect when using PHP to
>> process the request:
>> Setting the headers in the php script:
>> header("Content-Type: blah/blah");
>> Result page header still comes through as:
>> Content-Type: text/html
>> Hence I am seeing .html tacked on to attachment filename downloads in
>> Chrome and Safari.
>> Is x-accel ignoring the Content-Type?
> No, it doesn't. X-Accel-Redirect preserves Content-Type header
> from original reply (the one which returned X-Accel-Redirect).
> Check your php script actual reply to make sure it's actually
> returns Content-Type header (actually as header, and no other
> headers with same name).
> Maxim Dounin
More information about the nginx