Bug 58475 - Support append/merge with semicolon-separated headers
Summary: Support append/merge with semicolon-separated headers
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_headers (show other bugs)
Version: 2.5-HEAD
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-03 02:40 UTC by Kevin Locke
Modified: 2015-10-03 02:40 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Locke 2015-10-03 02:40:29 UTC
Currently the append and merge actions for Header assume that the value is a comma-separated list.  Although this is the case for most headers, Content-Security-Policy is a notable exception, and one for which merged configurations are not unlikely (since different directives may have different stakeholders and be configured in different places).

It would be great if the append and merge actions provided a way to support such headers, either by providing a way to specify the list separator (such as treating the replacement argument as separator for these actions), or by changing behavior based on the header name.

If neither of those solutions is acceptable, perhaps adding a note to the documentation about how to use edit to emulate append or merge would be appropriate.  It's pretty straight-forward, but requires a bit of care in the regex to avoid errors and using setifempty before edit to ensure the header is set.   I documented the procedure I am using at https://kevinlocke.name/bits/2015/10/02/setting-content-security-policy-with-mod_headers/ which may be useful for comparison.

Thanks for considering,
Kevin