https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412009-02-11T08:49:26Zlighty labsLighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=54062009-02-11T08:49:26Zstbuehler
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Invalid</i></li></ul><p>You must load mod_setenv before mod_redirect.</p> Lighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=54082009-02-11T14:52:28Zamandato
<ul><li><strong>Status</strong> changed from <i>Invalid</i> to <i>Reopened</i></li></ul><p>I just triple checked, "mod_setenv" is included in the server.modules settings and the following settings are setup for my server:</p>
<p>$HTTP["host"] =~ "angelomandato\.com$" {<br /> setenv.add-response-header = ("X-Meaning-Of-Life"=>"42")<br /> url.redirect = ( "^(.*)" => "http://angelo.mandato.com$0" )<br />}</p>
<p>When you go to angelomandato.com, one of the headers included in the redirect should be X-Meaning-Of-Life: 42 and it is not included. I'm using the Firefox Live HTTP Headers plugin. for my particular solution, I've added the following line just above the line with con->http_status = 301;</p>
<p>response_header_insert(srv, con, CONST_STR_LEN("My_Header_Title"), CONST_STR_LEN("My_Header_Value"));</p>
<p>It would be nice if this feature actually worked for redirects. I've also submitted a ticket to add 302 redirect option for Lighttpd 1.4.x branch but it was rejected. I would like the option reconsidered because 1.5.x series is classified as beta for many linux distributions which means if I want Lighttpd 1.5.x I have to compile it myself on all the servers I manage.</p> Lighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=54092009-02-11T14:55:54Zicy
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Need Feedback</i></li></ul><p>Did you actually try what stbuehler said and put mod_setenv <strong>before</strong> mod_redirect in the <strong>modules list</strong>?</p> Lighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=54102009-02-11T15:18:55Zamandato
<ul></ul><p>Yes. I am using the lighttpd.conf from the distro which loads setenv near the top of the structure. The redirect module is near the bottom. I take it your copy works or are you just assuming that it should work?</p> Lighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=54112009-02-11T15:28:54Zicy
<ul></ul><p>stbuehler tested it and it worked. Maybe you are using an old version which had a bug since you are using your distros package?</p> Lighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=54122009-02-11T15:32:01Zamandato
<ul></ul><p>oh, i'll chech that i have the latest version and see what happens.</p> Lighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=54132009-02-11T17:49:23Zamandato
<ul></ul><p>Okay, running 1.4.20 and the redirect + header is working correctly now. Sorry for wasting your time. Looking forward to 1.5.x coming out of beta so it's included in most all distros then I will no longer have to recompile with the redirect set to 302 cause I can set the setting in 1.5. :-)</p> Lighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=54172009-02-11T18:53:06Zicy
<ul><li><strong>Status</strong> changed from <i>Need Feedback</i> to <i>Invalid</i></li></ul> Lighttpd - Bug #1895: setenv.add-response-header not used in url.redirecthttps://redmine.lighttpd.net/issues/1895?journal_id=117392019-04-11T01:39:02Zgstrauss
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-5 priority-4 priority-default closed" href="/issues/2946">Feature #2946</a>: modules.conf order unhelpful (setenv vs. redirect)</i> added</li></ul>