Actions
Bug #2794
closed1.4.40 regression: regexp subst vars mangled by config-glue condition caching
ASK QUESTIONS IN Forums:
Description
When lighttpd is accessed through a reverse proxy (such as haproxy), mod_extforward is required to allow lighttpd to pick up the X-Forwarded-Prot header.
But in doing so, it corrupts the reg expression vars in some config rules...
Basic Lighty config
server.modules = ( "mod_expire", "mod_rewrite", "mod_redirect", "mod_access", "mod_auth", "mod_setenv", "mod_fastcgi", "mod_status", "mod_compress", "mod_magnet", "mod_accesslog", "mod_extforward" ) extforward.headers = ("X-Forwarded-For") extforward.forwarder = ("127.0.0.1" => "trust") $HTTP["scheme"] == "http" { $HTTP["host"] =~ ".+" { url.redirect = (".*" => "https://%0$0/foo1") } }
Curl shows the redirect response is missing %0 and $0 vars..
$ curl -v http://msolo.domain.local/bar * Trying 192.168.1.79... * TCP_NODELAY set * Connected to 192.168.1.79 (192.168.1.79) port 80 (#0) > GET /bar HTTP/1.1 > Host: msolo.domain.local > User-Agent: curl/7.51.0 > Accept: */* > < HTTP/1.1 301 Moved Permanently < Location: https:///bar/foo1 < Content-Length: 0 < Date: Thu, 23 Feb 2017 12:38:54 GMT < Server: lighttpd
Full discussion at https://redmine.lighttpd.net/boards/2/topics/7076
Updated by gstrauss over 7 years ago
- Status changed from New to Patch Pending
- Target version changed from 1.4.x to 1.4.46
Updated by gstrauss over 7 years ago
- Status changed from Patch Pending to Fixed
- % Done changed from 0 to 100
Applied in changeset 350d39b4cae6f4614c03cd075dbc86d248b5b461.
Actions
Also available in: Atom