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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Bugzilla from bugzilla@apache.org
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: [hidden email]
          Reporter: [hidden email]
  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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

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

--- Comment #1 from Christophe JAILLET <[hidden email]> ---
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64646

Raffaele Sandrini <[hidden email]> changed:

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

--- Comment #2 from Raffaele Sandrini <[hidden email]> ---
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: [hidden email]
For additional commands, e-mail: [hidden email]