Existing header not overwritten when using the 'always' condition with Header set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Expired
|
Undecided
|
Unassigned |
Bug Description
I have an application that sets some headers, but I also have Apache setting them as well to handle some special cases. I'm using the mod_headers syntax of 'Header always set X-Foo "bar"'. I specifically use the 'always' condition table, as I want to include these headers on non-2xx responses (such as 301, 302). However, if I use 'always' (instead of the default 'onsuccess' condition table), the headers are duplicated, which goes against what the 'set' action is supposed to do (overwrite any existing header).
STR:
* Have some app served by Apache set 'X-Foo: bar'
* Add 'Header always set X-Foo "bar"' to Apache config
* Notice duplicate headers
* Remove the 'always' condition, and everything will be fine (only one header)
Package: apache2 2.2.14-5ubuntu8.10
Distibution: Ubuntu 10.04.4 LTS
Thank you for taking the time to report this bug and helping to make Ubuntu better.
Please could you test the current development version (2.2.22-6ubuntu5) and also the latest upstream release? Once done, please set the bug status back to New.