You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2020/08/05 07:00:41 UTC

[Bug 64646] New: Header "set" does not replace content-disposition header passed from content handler

https://bz.apache.org/bugzilla/show_bug.cgi?id=64646

            Bug ID: 64646
           Summary: Header "set" does not replace content-disposition
                    header passed from content handler
           Product: Apache httpd-2
           Version: 2.4.43
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_headers
          Assignee: bugs@httpd.apache.org
          Reporter: raffaele.sandrini@origammi.co
  Target Milestone: ---

In a setup where an incoming request is handled by PHP-FPM through "SetHandler
"proxy:fcgi:...", the handling PHP script is setting the response header:

content-disposition: attachment; filename="foo.pdf"

The directive:

Header set "content-disposition" "baz"

set in a .htaccess file

will result in headers:

HTTP/1.1 200 OK
Server: Apache
content-disposition: attachment; filename="foo.pdf"
content-disposition: baz
[...]

Which is unexpected according to what is specified in the documentation of
mod_header.

"set
The response header is set, replacing any previous header with this name. The
value may be a format string."

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64646] Header "set" does not replace content-disposition header passed from content handler

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64646

Raffaele Sandrini <ra...@origammi.co> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #2 from Raffaele Sandrini <ra...@origammi.co> ---
You are right. Using "always" solved the issue. You are also right that it is
documented in the same segment.
However, this whole thing with the different header tables is convoluted and
one need some brain power to understand the documentation segment ;-).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 64646] Header "set" does not replace content-disposition header passed from content handler

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64646

--- Comment #1 from Christophe JAILLET <ch...@wanadoo.fr> ---
Hi,

In the doc, a few lines above what you mention, you have a warning which
explains that the 'onsucess" or 'always' "conditions" may give different
results depending of your use case. One of this difference is when:

  - You're modifying or removing a header generated by a CGI script or by
mod_proxy_fcgi, in which case the CGI scripts' headers are in the table
corresponding to always and not in the default table.

This looks like your use case.

Does:
   Header always set "content-disposition" "baz"
helps?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org