diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2016-04-21 21:01:30 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2016-04-27 23:10:24 -0400 |
commit | b9940f9856c166dc7368207d1869cb203774db87 (patch) | |
tree | dab18a3c2da99d3bc01d5b89c75e3d972991c816 /doc | |
parent | 4a51d2ab8ccfa8f8da476da100963c1b26b5b67f (diff) | |
download | lighttpd-git-b9940f9856c166dc7368207d1869cb203774db87.tar.gz |
[mod_fastcgi] use http_response_xsendfile() (fixes #799, fixes #851, fixes #2017, fixes #2076)
handle X-Sendfile and X-LIGHTTPD-send-file w/ http_response_xsendfile()
if host is configured ( "x-sendfile" = "enable" )
Note: X-Sendfile path is url-decoded for consistency, like X-Sendfile2
(response headers should be url-encoded to avoid tripping over
chars allowed in filesystem but which might change response
header parsing semantics)
Note: deprecated: "allow-x-send-file"; use "x-sendfile"
Note: deprecated: X-LIGHTTPD-send-file header; use X-Sendfile header
Note: deprecated: X-Sendfile2 header; use X-Sendfile header
For now, X-Sendfile2 is still handled internally by mod_fastcgi.
Since http_response_send_file() supports HTTP Range requests,
X-Sendfile2 is effectively obsolete. However, any code, e.g. PHP,
currently using X-Sendfile2 is probably manually generating 206 Partial
Content status and Range response headers. A future version of lighttpd
might *remove* X-Sendfile2. Existing code should be converted to use
X-Sendfile, which is easily done by removing all the special logic
around using X-Sendfile2, since the 206 Partial Content status and Range
response headers are handled in http_response_send_file().
x-ref:
"mod_fastcgi + X-Sendfile -> mod_staticfile"
https://redmine.lighttpd.net/issues/799
"Feature Request: New option "x-send-file-docroot""
https://redmine.lighttpd.net/issues/851
"X-Sendfile handoff to mod-static-file in 1.4.x"
https://redmine.lighttpd.net/issues/2017
"X-sendfile should be able to set content-type"
https://redmine.lighttpd.net/issues/2076
Diffstat (limited to 'doc')
-rw-r--r-- | doc/outdated/fastcgi.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/outdated/fastcgi.txt b/doc/outdated/fastcgi.txt index eee5f791..ee3c0b92 100644 --- a/doc/outdated/fastcgi.txt +++ b/doc/outdated/fastcgi.txt @@ -107,7 +107,8 @@ fastcgi.server "max-procs" => <integer>, # OPTIONAL "broken-scriptfilename" => <boolean>, # OPTIONAL "disable-time" => <integer>, # optional - "allow-x-send-file" => <boolean>, # optional + "x-sendfile" => <boolean>, # optional (replaces "allow-x-send-file") + "x-sendfile-docroot" => <boolean>, # optional "kill-signal" => <integer>, # OPTIONAL "fix-root-scriptname" => <boolean>, # OPTIONAL @@ -143,8 +144,10 @@ fastcgi.server PHP can extract PATH_INFO from it (default: disabled) :"disable-time": time to wait before a disabled backend is checked again - :"allow-x-send-file": controls if X-LIGHTTPD-send-file headers - are allowed + :"x-sendfile": controls if X-Sendfile backend response header is allowed + (deprecated headers: X-Sendfile2 and X-LIGHTTPD-send-file) + ("x-sendfile" replaces "allow-x-sendfile") + :"x-sendfile-docroot": list of directory trees permitted with X-Sendfile :"fix-root-scriptname": fix broken path-info split for "/" extension ("prefix") If bin-path is set: |