mod_headers does not support 'edit'.

Bug #131512 reported by mihxil
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: apache2

In my virtual host:

 RequestHeader edit Cache-Control early

root@mitulo:/# /etc/init.d/apache2 restart
 * Forcing reload of web server (apache2)... Syntax error on line 12 of /etc/apache2/sites-enabled/001-mmbase:
first argument must be 'add', 'set', 'append', 'unset' or 'echo'.
                                                                                                                 [fail]
But according to:
http://httpd.apache.org/docs/2.2/mod/mod_headers.html

'edit' _is_ supported.

So, perhaps an old version of mod_headers was shipped or so, because in 2.0 it indeed did not exist.

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. I cannot reproduce your issue. RequestHeader edit takes two more arguments as outlined in the manual.

Could specify which version apache2 you are using.

Changed in apache2:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for apache2 (Ubuntu) because there has been no activity for 60 days.]

Revision history for this message
Dhanushka Jayathilaka (dm-jaya63) wrote :

Header edit Set-Cookie "^(JSESSIONID=.*; Path=^/itrax/irates/)(.*)$" "$1/$2"

this gives me the error

first argument must be add, set, append, unset or echo.

Changed in apache2 (Ubuntu):
status: Invalid → In Progress
Revision history for this message
Simon Déziel (sdeziel) wrote :

This works for me on Trusty with Apache 2.4.7:

  Header edit Set-Cookie "^(JSESSIONID=.*; Path=^/itrax/irates/)(.*)$" "$1/$2"

# apt-cache policy apache2
apache2:
  Installed: 2.4.7-1ubuntu4.4
  Candidate: 2.4.7-1ubuntu4.4
  Version table:
 *** 2.4.7-1ubuntu4.4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.4.7-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

Changed in apache2 (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.