[mod_cgi] cgi.local-redir = [enable|disable] (#2108, #2793)
commit57ab20ace504fdb6e0944ef6fa6e0ce35adc4446
authorGlenn Strauss <gstrauss@gluelogic.com>
Sun, 26 Feb 2017 22:49:47 +0000 (26 17:49 -0500)
committerGlenn Strauss <gstrauss@gluelogic.com>
Sun, 26 Feb 2017 23:03:10 +0000 (26 18:03 -0500)
tree78182f852e556d651dd1c2652917681179ae1c79
parentd56957211212f9f774173febae1e005955be82a1
[mod_cgi] cgi.local-redir = [enable|disable] (#2108, #2793)

new directive cgi.local-redir = [enable|disable]

*disable* RFC3875 6.2.2 local-redir by default.
(behavior change from when local-redir support added in lighttpd 1.4.40)

The reason for this behavior change is that CGI local-redir support
(RFC3875 6.2.2) is an optimization.  Absence of support may result in
additional latency in servicing a request due the additional round-trip
to the client, but that was the prior behavior (before lighttpd 1.4.40)
and is the behavior of web servers which do not support CGI local-redir.

However, enabling CGI local-redir by default may result in broken links
in the case where a user config (unaware of CGI local-redir behavior)
returns HTML pages containing *relative* paths (not root-relative paths)
which are relative to the location of the local-redir target document,
and the local-redir target document is located at a different URL-path
from the original CGI request.

x-ref:
  RFC3875 CGI 1.1 specification section 6.2.2 Local Redirect Response
  http://www.ietf.org/rfc/rfc3875
  "CGI local redirect not implemented correctly"
  https://redmine.lighttpd.net/issues/2108
  "1.4.40 regression: broken redirect (using Location) between url.rewrite-once URLs"
  https://redmine.lighttpd.net/issues/2793
src/mod_cgi.c
tests/lighttpd.conf