Project

General

Profile

Feature #650

setenv.add-or-replace-response-header

Added by chernousov over 11 years ago. Updated 7 months ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_setenv
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:

Description

Please add one more config option - setenv.add-or-replace-response-header.
This one will be very useful, because add-response-header really adds, but not replaces header.


Related issues

Related to Feature #2295: set-request-header or remove-request-header support for mod_setenvFixed2011-02-07

Associated revisions

Revision 4d92366a (diff)
Added by gstrauss 8 months ago

[mod_setenv] directives to overwrite/remove hdrs (fixes #650, fixes #2295)

directives to set value, rather than append values to headers, env
setenv.set-request-header
setenv.set-response-header
setenv.set-environment
These directives take precedence over the setenv.add-* counterparts

Set a blank value for request or response header to remove the header
(blank value in environment will be set as the value; not removed)

setenv.*-environment is now deferred to handle_request_env hook.
setenv.*-response-header is now processed in handle_response_start hook.

x-ref:
"setenv.add-or-replace-response-header"
https://redmine.lighttpd.net/issues/650
"set-request-header or remove-request-header support for mod_setenv"
https://redmine.lighttpd.net/issues/2295

History

#1 Updated by Anonymous over 9 years ago

A list might be enough, but I used this change extensively to do really intelligent filtering on a project where I got hundreds of notifications a day. It was far easier to setup filters for specific headers; parsing (especially with server side filtering agents like Sieve) might be much harder. Besides, aren't headers pretty well understood?

#2 Updated by aredridel almost 9 years ago

+1. I'd love to have this -- I need to set the Host header in mod_proxy.

#3 Updated by gstrauss 11 months ago

  • Related to Feature #2295: set-request-header or remove-request-header support for mod_setenv added

#4 Updated by gstrauss 9 months ago

  • Description updated (diff)
  • Status changed from New to Patch Pending
  • Assignee deleted (jan)
  • Target version set to 1.4.45

aredridel: Messing with Host request header using mod_setenv is not recommended.
Instead, use proxy.replace-http-host directive in Docs_ModProxy for what it seems like you are trying to do.

#5 Updated by gstrauss 8 months ago

  • Target version changed from 1.4.45 to 1.4.46

#6 Updated by gstrauss 7 months ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom