Project

General

Profile

Feature #2295

set-request-header or remove-request-header support for mod_setenv

Added by mm over 6 years ago. Updated 7 months ago.

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

100%

Estimated time:
Missing in 1.5.x:
No

Description

I would like to suggest to add a new configuration option(s) to mod_setenv.c:
set-request-header (overwrites or defines a new header)
and/or
remove-request-header (removes all request headers of a specific name)

There has been already a proposed patch for set-request-header:
http://redmine.lighttpd.net/boards/3/topics/1569

This patch was submitted reversed, I am attaching the standard one.

patch-mod_setenv.c (2.79 KB) patch-mod_setenv.c set-request-header patch for mod_setenv.c mm, 2011-02-07 11:35

Related issues

Related to Feature #650: setenv.add-or-replace-response-headerFixed

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 georgexsh over 6 years ago

oops, someone finally noticed that patch! thanks for re-reverse the patch I originally submitted ...
lighty really should add this feature.
maybe I should add some test case for this patch to get it convinced.

#2 Updated by stbuehler over 6 years ago

  • Target version changed from 1.4.29 to 1.4.x

#3 Updated by ckujau about 3 years ago

Are there plans to include this into a 1.4.x release?

#4 Updated by darix about 3 years ago

who wins when you have add-request-header and set-request-header?

#5 Updated by georgexsh about 3 years ago

darix wrote:

who wins when you have add-request-header and set-request-header?

set-request-header , since it is processed it the end.

#6 Updated by gstrauss 11 months ago

  • Related to Feature #650: setenv.add-or-replace-response-header added

#7 Updated by gstrauss 9 months ago

  • Status changed from New to Patch Pending
  • Target version changed from 1.4.x to 1.4.45

#8 Updated by gstrauss 8 months ago

  • Target version changed from 1.4.45 to 1.4.46

#9 Updated by gstrauss 7 months ago

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

Also available in: Atom