Commit Graph

8 Commits (6ad325c659c4f602584c9450242204f410e74952)

Author SHA1 Message Date
Glenn Strauss 07517ff30a [tests] some test config cleanup
including limiting use of php in tests to mod-fastcgi.t
5 years ago
Glenn Strauss dbdab5dbc9 [core] server.error-handler new directive for error pages (fixes #2702)
server.error-handler preserves HTTP status error code when error page
is static, and allows dynamic handlers to change HTTP status code
when error page is provided by dynamic handler.  server.error-handler
intercepts all HTTP status codes >= 400 except when the content is
generated by a dynamic handler (cgi, ssi, fastcgi, scgi, proxy, lua).
The request method is unconditionally changed to GET for the request
to service the error handler, and the original request method is
later restored (for logging purposes).  request body from the
original request, if present, is discarded.

server.error-handler is somewhat similar to server.error-handler-404,
but server.error-handler-404 is now deprecated, intercepts only 404
and 403 HTTP status codes, and returns 200 OK for static error pages,
a source of confusion for some admins.  On the other hand, the new
server.error-handler, when set, will intercept all HTTP status error
codes >= 400.  server.error-handler takes precedence over
server.error-handler-404 when both are set.

NOTE: a major difference between server.error-handler and the
now-deprecated server.error-handler-404 is that the values of the
non-standard CGI environment variables REQUEST_URI and REDIRECT_URI
have been swapped.  Since REDIRECT_STATUS is the original HTTP
status code, REDIRECT_URI is now the original request, and REQUEST_URI
is the current request (e.g. the URI/URL to the error handler).
The prior behavior -- which reversed REQUEST_URI and REDIRECT_URI values
from those described above -- is preserved for server.error-handler-404.

Additionally, REDIRECT_STATUS is now available to mod_magnet, which
continues to have access to request.uri and request.orig_uri.

See further discussion at https://redmine.lighttpd.net/issues/2702
and https://redmine.lighttpd.net/issues/1828

github: closes #36
7 years ago
Stefan Bühler 87c5ec9651 [tests] search for perl in PATH instead of /usr/bin; whitespace + test config cleanups
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3019 152afb58-edef-0310-8abb-c4023f1b3aa9
8 years ago
Stefan Bühler b3ba9f0fb9 tests: use breakage log
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2555 152afb58-edef-0310-8abb-c4023f1b3aa9
14 years ago
Stefan Bühler cbd40dc44b [tests] Remove pidfile from test system
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2242 152afb58-edef-0310-8abb-c4023f1b3aa9
15 years ago
Marcus Rückert 2573648c4b - added testcase for #948
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1901 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Marcus Rückert 029d32039c - fixed 404 testsuite
- added optional fastcgi handler

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1898 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Marcus Rückert 420abdb295 - added test cases for 404 handler
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1894 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago