Project

General

Profile

Bug #2891

setenv.add-response-header does not work with url.redirect

Added by fory 4 months ago. Updated 4 months ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
mod_redirect
Target version:
Start date:
2018-06-14
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

Set-Cookie header does not appear with url.redirect. A normal use with dirlisting works fine.

$SERVER["socket"] == ":8888" {
setenv.add-response-header = ( "Set-Cookie" => "Secure" )
url.redirect = (".*" => "https://test.env.fory.com$0")
}

curl -I http://10.0.2.58:8888
HTTP/1.1 301 Moved Permanently
Location: https://test.env.fory.com/
Date: Thu, 14 Jun 2018 00:32:05 GMT
Server: lighttpd/1.4.49

History

#1

Updated by gstrauss 4 months ago

  • Status changed from New to Invalid

A simple test works just fine. Did you load the modules in the right order for mod_setenv to apply before mod_redirect generates a response?

server.document-root = "/valid/path/here" 
server.modules = ( "mod_setenv", "mod_redirect" )
$SERVER["socket"] == ":8888" {
  setenv.add-response-header = ( "Set-Cookie" => "Secure" )
  url.redirect = (".*" => "https://test.env.fory.com$0")
}
#2

Updated by fory 4 months ago

Yes, Like I said, the simple dirlisting works fine. It does not work with url.redirect.

#3

Updated by fory 4 months ago

That was it. I needed to move "mod_setenv" before "mod_redirect". Thx for the tip.

Also available in: Atom