Commit Graph

276 Commits

Author SHA1 Message Date
Glenn Strauss 9af58a9716 revert 1.4.40 swap of REQUEST_URI, REDIRECT_URI (fixes #2738)
reverts part of commit:dbdab5db which swapped REQUEST_URI, REDIRECT_URI

x-ref:
  "mediawiki redirect loop if REQUEST_URI not orig req in 1.4.40"
  https://redmine.lighttpd.net/issues/2738

Explanation:

REQUEST_URI and REDIRECT_URI are not part of CGI standard environment.
The reason for their existence is that PATH_INFO in CGI environment may
be different from the path in the current request.  The main reason for
this potential difference is that the URI path is normalized to a path
in the filesystem and tested against the filesystem to determine which
part is SCRIPT_NAME and which part is PATH_INFO.  In case-insensitive
filesystems, the URI might be lowercased before testing against the
filesystem, leading to loss of case-sensitive submission in any
resulting PATH_INFO.  Also, duplicated slashes "///" and directory
references "/." and "/.." are removed, including prior path component in
the case of "/..".  This might be undesirable when the information after
the SCRIPT_NAME is virtual information and there target script needs the
virtual path preserved as-is.  In that case, the target script can
re-parse REQUEST_URI (or REDIRECT_URI, as appropriate) to obtain the
unmodified information from the URI.

con->request.uri is equivalent to con->request.orig_uri unless the
request has been internally rewritten (e.g. by mod_rewrite, mod_magnet,
others), in which case con->request.orig_uri is the request made by the
client, and con->request.uri is the current URI being processed.

Historical REQUEST_URI (environment variable) lighttpd inconsistencies
- mod_cml     set REQUEST_URI to con->request.orig_uri
- mod_cgi     set REQUEST_URI to con->request.orig_uri
- mod_fastcgi set REQUEST_URI to con->request.orig_uri
- mod_scgi    set REQUEST_URI to con->request.orig_uri

- mod_ssi     set            REQUEST_URI to current con->request.uri
- mod_magnet  set MAGNET_ENV_REQUEST_URI to current con->request.uri
              and MAGNET_ENV_REQUEST_ORIG_URI to con->request.orig_uri

Historical REDIRECT_URI (environment variable) previously set only in
mod_fastcgi and mod_scgi, and set to con->request.uri

Since lighttpd 1.4.40 provides REDIRECT_URI with con->request.orig_uri,
changes were made to REQUEST_URI for consistency, with the hope that
there would be little impact to existing configurations since the
request uri and original request uri are the same unless there has been
an internal redirect.  It turns out that various PHP frameworks use
REQUEST_URI and require that it be the original URI requested by client.

Therefore, this change is being reverted, and lighttpd will set
REQUEST_URI to con->request.orig_uri in mod_cgi, mod_fastcgi, mod_scgi
as was done in lighttpd 1.4.39 and earlier.  Similarly, REDIRECT_URI
also has the prior behavior in mod_fastcgi and mod_scgi, and added to
mod_cgi.

A future release of lighttpd might change mod_ssi to be consistent with
the other modules in setting REQUEST_URI to con->request.orig_uri and to
add REDIRECT_URI, when an internal redirect has occurred.
2016-07-23 02:13:41 -04:00
Glenn Strauss 00cc4d7c0e [mod_auth] fix Digest auth to be better than Basic (fixes #1844)
Make Digest authentication more compliant with RFC.

Excerpt from https://www.rfc-editor.org/rfc/rfc7616.txt Section 5.13:
    The bottom line is that any compliant implementation will be
    relatively weak by cryptographic standards, but any compliant
    implementation will be far superior to Basic Authentication.

x-ref:
  "Serious security problem in Digest Authentication"
  https://redmine.lighttpd.net/issues/1844
2016-07-16 23:25:53 -04:00
Glenn Strauss 8861c2bb54 [mod_cgi] handle local redirect response (fixes #2108)
RFC3875 CGI 1.1 specification section 6.2.2 Local Redirect Response
http://www.ietf.org/rfc/rfc3875

x-ref:
  "CGI local redirect not implemented correctly"
  https://redmine.lighttpd.net/issues/2108
2016-07-14 16:31:08 -04:00
Glenn Strauss bcddcf8b0e [tests] remove some tests duplicated in mod-cgi.t 2016-07-14 13:21:43 -04:00
Glenn Strauss ce7d040bf3 [mod_access] new directive url.access-allow (fixes #1421)
url.access-allow is list of allowed url suffixes (e.g. file extensions)
If url.access-allow has been set, then deny any URL that does not match
the explicitly listed suffixes.

(thx japc)

x-ref:
  "access_allow directive for lighttpd"
  https://redmine.lighttpd.net/issues/1421
2016-07-13 04:12:08 -04:00
Glenn Strauss d147673d40 [tests] remove dependency on CGI.pm
CGI.pm is no longer shipped as part of Perl core distribution
(and is easily replaced)
2016-07-02 13:47:22 -04:00
Glenn Strauss 8dcbd61a45 [cygwin] fix mod_proxy and mod_fastcgi ioctl use
cygwin does not support ioctl on sockets, returning EOPTNOTSUPP
(would be better if cygwin used Windows ioctlsocket() instead)

Windows uses signed (socklen_t), so add some casts to quiet warnings

Windows path handling is convoluted, so disable one tests in mod_fastcgi
since trailing spaces are removed from URL for _WIN32 and __CYGWIN__ in
response.c
2016-06-23 15:46:44 -04:00
Glenn Strauss 16a3f3b6fc [build] update Makefile.am EXTRA_DIST w/ new files 2016-06-21 04:46:04 -04:00
Glenn Strauss a5fcfee6fc [mod_ssi] more flexible quoting (fixes #1768)
allow double-quotes, single-quotes or no quote on SSI param values

remove use of PCRE from mod_ssi

fix misspelling of 'unknow' to be 'unknown'

x-ref:
  "mod_ssi doesn't accept single quotes"
  https://redmine.lighttpd.net/issues/1768
2016-05-14 05:50:37 -04:00
Glenn Strauss df146a7724 [mod_ssi] fix SSI statement parser
bug introduced in 8e3c6bf7 when statement parser was replaced
2016-05-14 01:17:52 -04:00
Glenn Strauss b47c393e26 [mod_auth] skip blank lines and comment lines (fixes #2327)
x-ref:
  "Ignore comments and empty lines in ht{digest,passwd} files"
  https://redmine.lighttpd.net/issues/2327
2016-04-28 13:13:43 -04:00
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
2016-04-25 01:01:08 -04:00
Glenn Strauss 1c01a42aa3 [core] never evaluate else branches until the previous branches are aready (fixes #2598)
The first condition which evaluates true in any if-else... condition
chain short-circuits the chain, and any remaining conditions in the
chain are marked false.

Previous conditions in if-else condition chaining must be evaluatable
(to true or false) -- must not remain in unset (not yet evaluatable)
state -- prior to evaluating later conditions.  Since any true
condition short-circuits remaining conditions, all prev conditions
must be false prior to evaluating later conditions.

From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3081 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-02-21 17:56:24 +00:00
Stefan Bühler ab05eb7cec [tests] do not half-close socket before having received the response (fixes #2688)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3058 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:22:38 +00:00
Stefan Bühler 1566748b1a [tests] test apr-md5 in mod-auth.t
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3057 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:11:35 +00:00
Kyle J. McKay 2bcb73cdb8 mod-auth.t: no crypt md5 for darwin
Darwin's crypt does not support the '$...' extensions.

Signed-off-by: Kyle J. McKay

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3056 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-12-04 20:11:33 +00:00
Stefan Bühler bfaa48260a [mod_secdownload] add required algorithm option; old behaviour available as "md5", new options "hmac-sha1" and "hmac-sha256"
Differential Revision: https://review.lighttpd.net/D7

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3054 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-22 22:22:22 +00:00
Stefan Bühler 85d8a17575 [core] encode path with ENCODING_REL_URI in redirect to directory (fixes #2661, thx gstrauss)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3052 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-11-07 15:00:18 +00:00
Stefan Bühler 68284bd7f1 [scons] various improvements
- don't generate files in src/
- move all build stuff to sconsbuild/
- have different output directories for static/ and fullstatic/,
  so we can use that directory for the test suite
- each build type (dynamic, static, fullstatic) has its own check target
- read CFLAGS, LDFLAGS and LIBS from environment
  (LIBS are appended after all other dependencies)

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3030 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-29 09:28:04 +00:00
Stefan Bühler 9290e923d9 [tests] fix warning about newline in filename
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3021 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-22 21:39:22 +00:00
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
2015-08-22 20:51:08 +00:00
Stefan Bühler 403afcd251 [cmake] lowercase commands, whitespace cleanup, remove clutter in else(...), endif(...), endforeach(...)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3013 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-08-22 16:01:02 +00:00
Stefan Bühler 9f05b61ab4 parse If-None-Match for ETag validation (fixes #2578)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2994 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-07-05 16:59:01 +00:00
Stefan Bühler e6925949ab add some until now missing files to dist tarball
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2990 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-06-21 12:47:14 +00:00
Stefan Bühler 673923daf8 [tests] fix undefined index warning in sendfile.php
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2985 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-02-08 19:10:58 +00:00
Stefan Bühler adfa06de99 [tests] improve valgrind and strace TRACEME, disable condition logging in normal configs
- condition logging is way too noisy and rarely useful
- increate timeout to wait for port bind; if the process dies we fail
  early anyway

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2978 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-02-08 19:10:41 +00:00
Stefan Bühler d1a2356916 fix SQL injection / host name validation (thx Jann Horn)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2959 152afb58-edef-0310-8abb-c4023f1b3aa9
2014-03-12 12:03:55 +00:00
Stefan Bühler d7c90814c3 [tests] add cleanup.sh to cmake test runs, reset SLOWREQUEST in request.t
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2932 152afb58-edef-0310-8abb-c4023f1b3aa9
2014-01-10 12:05:12 +00:00
Stefan Bühler a4640b457e [tests] use list for perl exec to skip the sh wrapper
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2903 152afb58-edef-0310-8abb-c4023f1b3aa9
2013-09-06 16:44:41 +00:00
Stefan Bühler 95dc1ed79e [tests] add mod_simplevhost tests
* next commit fixes the bug

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2897 152afb58-edef-0310-8abb-c4023f1b3aa9
2013-08-30 13:15:01 +00:00
Stefan Bühler f0a2c0f293 [mod_user] add test cases to check handling of encoded ~ as %7E (#2124)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2881 152afb58-edef-0310-8abb-c4023f1b3aa9
2013-06-29 10:07:45 +00:00
Stefan Bühler c26b50d9ad [mod_auth] add htpasswd -s (SHA1) support if openssl is used (needs openssl for SHA1). This doesn't use any salt, md5 with salt is probably better.
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2870 152afb58-edef-0310-8abb-c4023f1b3aa9
2013-04-29 13:08:25 +00:00
Stefan Bühler 543bd249fb fix handling of If-Modified-Since if If-None-Match is present (don't return 412 for date parsing errors); follow current draft for HTTP/1.1, which tells us to ignore If-Modified-Since if we have matching etags.
See:
 http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-21#section-5
 > it makes sense to ignore the If-Modified-Since when entity tags are
 > understood and available for the selected representation.

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2865 152afb58-edef-0310-8abb-c4023f1b3aa9
2013-01-22 13:08:21 +00:00
Stefan Bühler 6200764f05 tests: check different combination of empty values, leading/trailing spaces and commas in the Connection header
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2859 152afb58-edef-0310-8abb-c4023f1b3aa9
2012-11-21 12:01:42 +00:00
Cyril Brulebois 4f4bcdd3c3 tests: make sure mod_proxy doesn't leave running processes (fixes #2435, thx kibi)
In case the proxy instance goes wrong, the clean-up doesn't kill the
real instance. So close both instances explicitly in the clean-up
phase.

Signed-off-by: Cyril Brulebois <kibi@debian.org>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2857 152afb58-edef-0310-8abb-c4023f1b3aa9
2012-11-09 14:23:25 +00:00
Cyril Brulebois 0c6a564543 Fix non-ANSI function declarations.
The proper way to declare a function taking no parameters isn't:
  foo bar();

But this instead:
  foo bar(void);

Signed-off-by: Cyril Brulebois <kibi@debian.org>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2843 152afb58-edef-0310-8abb-c4023f1b3aa9
2012-08-31 14:11:41 +00:00
Stefan Bühler 7187271fb6 [auth] Add "AUTH_TYPE" environment (for *cgi), remove fastcgi specific workaround, add fastcgi test case (fixes #889)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2833 152afb58-edef-0310-8abb-c4023f1b3aa9
2012-04-19 13:02:11 +00:00
Stefan Bühler 6c9dff7cda [mod_auth] Fix signedness error in http_auth (fixes #2370, CVE-2011-4362)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2806 152afb58-edef-0310-8abb-c4023f1b3aa9
2011-11-29 22:27:11 +00:00
Stefan Bühler e05f1b3eec Add static-file.disable-pathinfo option to prevent handling of urls like .../secret.php/image.jpg as static file
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2803 152afb58-edef-0310-8abb-c4023f1b3aa9
2011-08-30 22:13:59 +00:00
Stefan Bühler bf0d57d505 two additional test cases for absolute http(s) uris in the request line
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2787 152afb58-edef-0310-8abb-c4023f1b3aa9
2011-04-04 22:39:48 +00:00
Stefan Bühler 1eef447d32 [tests] Add path traversal check with $HTTP['url']
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2777 152afb58-edef-0310-8abb-c4023f1b3aa9
2011-02-10 07:56:11 +00:00
Stefan Bühler 48fea28651 Fix request parser to handle packets with splitted \r\n\r\n (fixes #2105)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2696 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-11-29 14:13:13 +00:00
Stefan Bühler 6ecb86159c Fix accesslog escape segfault (#1551)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2664 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-16 18:56:04 +00:00
Stefan Bühler 8c83976dbe mod_fastcgi: Add "X-Sendfile2" - supporting multiple ranged files (fixes #2008)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2651 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-14 17:32:38 +00:00
Peter Colberg 8b6dae4139 Add TLS servername indication (SNI) support (fixes #386, thx Peter Colberg <peter@colberg.org>)
* This patch may "break" some configs, if they do stupid things. Like setting
  ssl.pemfile to a not existing file in a "non-socket/non-ssl" block.
  Fix them! :)

From: Peter Colberg <peter@colberg.org>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2648 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-14 13:39:59 +00:00
Stefan Bühler 83145e8ba6 mod_rewrite: add url.rewrite-[repeat-]if-not-file to rewrite if file doesn't exist or is not a regular file (fixes #985, thx lucas aerbeydt)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2647 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-12 21:49:09 +00:00
Stefan Bühler fd13e94427 mod_fastcgi: restart local procs immediately after they terminated, fix local procs handling
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2639 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-11 21:54:50 +00:00
Stefan Bühler ce74fd521c tests: Rename env-var to select tests to RUNTESTS
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2637 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-11 20:32:40 +00:00
Stefan Bühler d21c645bfa mod_compress: match partial+full content-type (fixes #1552)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2634 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-11 19:27:55 +00:00
Stefan Bühler 17d0c36eed Read hostname from absolute uris in the request line (fixes #1937)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2631 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-11 18:31:25 +00:00
Stefan Bühler 0eff441bb6 tests: fix endless loop if connect fails without the child dying
Found as make check on ubuntu hardy hanged itself, as perl-base
dependencies were broken and didn't require /etc/protocols but it
needed the file.


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2610 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-08-08 12:51:05 +00:00
Stefan Bühler 64c2e93336 Cleanup tree: remove .cvsignore and ChangeLog (deprecated by NEWS)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2600 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-07-23 21:55:00 +00:00
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
2009-07-01 16:16:40 +00:00
Stefan Bühler 5865a2e3f2 Removed sendfile.php from dist
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2543 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-19 19:18:26 +00:00
Stefan Bühler b2108c436c Remove X-Sendfile-Range feature; it will be replaced with something more powerful (#2005, #2008)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2542 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-19 19:06:39 +00:00
Stefan Bühler 60e745695a Fix 100% cpu usage if time() < 0 (thx to gaspa and cate, fixes #1964)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2532 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-11 14:04:57 +00:00
Stefan Bühler ad1e80e5af Add X-Sendfile-Range feature (fixes #2005)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2531 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-11 12:35:00 +00:00
Stefan Bühler 59eaedf353 [tests] Remove index.html~ from repository, create it on the fly for tests
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2530 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-11 12:34:54 +00:00
Stefan Bühler 3af67d1392 Ignore multiple "If-None-Match" headers (only use first one, fixes #753)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2528 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-11 10:18:36 +00:00
Stefan Bühler 57066345e4 Workaround broken operating systems: check for trailing '/' in filenames (fixes #1989)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2510 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-07 19:07:31 +00:00
Stefan Bühler b8b4fe19c8 Finally removed spawn-fcgi
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2423 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-03 22:41:02 +00:00
Stefan Bühler ce39062dd2 Fix workaround for incorrect path info/scriptname if fastcgi prefix is "/" (fixes #729)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2421 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-01 17:35:17 +00:00
Stefan Bühler b06a8648df [tests] Fix mod-rewrite test (skipped too many tests if php wasn't running)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2393 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-02-10 19:47:15 +00:00
Stefan Bühler fdcb6f60f4 Allow mod_compress to return 304 (Not Modified); compress ignores the static-file.etags option.(fixes #1884)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2384 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-02-04 10:27:42 +00:00
Stefan Bühler 36f74e5d23 Revert url decoding+simplifying before matching of mod_rewrite/mod_redirect
- Lot of regressions (we forgot to reencode the result)
  - Generic problem: after decode and rewrite "a?b?c": which '?' was the path?query seperator?
  - Possible solution: only decode printable characters (without '?'), and encode the result; do not encode the '%' of a not decoded character.
  - Still a problem with path simplifying, it seems many people use urls like this: http://server1/http%3a//server2/xxx
    and rewrite the path into the querystring.
  - Probably only usable with an extra config option

  => Do NOT use rewrite/redirect to protect specific urls.


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2362 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-12-07 15:22:42 +00:00
Stefan Bühler 454aefc51a [cmake] Add basic cmake support
- Not distributed yet (so only available in svn checkout)


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2359 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-12-05 22:30:32 +00:00
Stefan Bühler 34172dfb09 [tests] Fix tests/mod-compress.conf distribution
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2358 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-12-05 22:27:51 +00:00
Elan Ruusamäe c6c2bf8308 - Add possibility to disable methods in mod_compress (#1773)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2325 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-10-03 10:05:33 +00:00
Stefan Bühler 80a4f7a721 Fix fastcgi authorization in subdirectories with check-local=disabled; don't split pathinfo for authorizer. (#963)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2324 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-10-01 20:08:23 +00:00
Stefan Bühler 124d8cd555 Fix make dist (remove dummydir)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2293 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-08-20 10:12:20 +00:00
Stefan Bühler 24804542d2 [tests] fix skip in mod-rewrite
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2284 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-08-19 00:11:52 +00:00
Stefan Bühler 3cb2c1c39c [tests] Added env var TESTS to select only a subset of tests
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2279 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-08-02 16:24:33 +00:00
Stefan Bühler 5547928112 Decode url before matching in mod_rewrite (#1720)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2278 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-08-02 16:24:31 +00:00
Stefan Bühler 0c8ebbeb60 [tests] Fix fastcgi php finding
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2249 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-07-30 17:40:09 +00:00
Stefan Bühler 2bd973108d [tests] remove env TODO test: don't use undefined env vars
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2244 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-07-29 21:22:36 +00:00
Stefan Bühler 3bb07cad07 [tests] Fixed tests needing php running (if not running on port 1026, search php in env[PHP] or /usr/bin/php-cgi)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2243 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-07-29 21:22:28 +00:00
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
2008-07-29 21:22:13 +00:00
Stefan Bühler 0b257bcefa [tests] Fixed test system, use foreground daemons and waitpid
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2241 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-07-29 21:21:34 +00:00
Xuefer 765d3cbe6a avoid undefined index triggered by user's php.ini
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2178 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-05-22 06:50:01 +00:00
Xuefer ead7276368 mark testcase executable
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2174 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-05-22 06:25:54 +00:00
Stefan Bühler 074223041a Fix typo in test description
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2156 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-04-23 19:45:05 +00:00
Stefan Bühler ac92ea3616 Allow all http status codes by default; disable body only for 204,205 and 304; generate error pages for 4xx and 5xx (#1639)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2154 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-04-23 19:10:42 +00:00
Jan Kneschke abe8e3613e added support to run dtruss as TRACEME
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2122 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-03-10 19:14:05 +00:00
Stefan Bühler 0663d67c1a Fix symlink.t check to run with builddir != srcdir
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2115 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-03-02 12:59:54 +00:00
Stefan Bühler 1431deba81 Add option to configure verbosity of check in commandline: "VERBOSE=1 make check"
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2114 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-03-02 12:59:36 +00:00
Stefan Bühler 52840fa1ed fix sending "408 - Timeout" instead of "410 - Gone" for timedout urls in mod_secdownload (#1440)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2111 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-03-01 19:10:47 +00:00
Stefan Bühler 4875c125eb r2124@chromobil: stefan | 2008-02-27 19:34:57 +0100
test procedure: increased select timeout after killing lighttpd to avoid "Address already in use".


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2100 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-02-27 18:36:01 +00:00
Stefan Bühler debd30876a r2123@chromobil: stefan | 2008-02-27 19:30:54 +0100
do not generate a "Content-Length: 0" header for HEAD requests, added test too


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2099 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-02-27 18:35:42 +00:00
Stefan Bühler 8b28023c85 Fix mod-proxy.t to run outside of the srcdir
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2094 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-02-26 19:13:55 +00:00
Xuefer 925e96f5ed fix tests build for scons that has no config.h
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2078 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-02-25 06:56:48 +00:00
Elan Ruusamäe cde46f6a3d - support chained proxies in mod_extforward (#1528)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2061 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-01-21 08:21:20 +00:00
Elan Ruusamäe b6d6b82b70 - add test for extforward module
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2044 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-01-17 09:50:17 +00:00
Elan Ruusamäe 0f2fd1efd8 - add more missing files
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2042 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-01-16 16:07:10 +00:00
Elan Ruusamäe 1f72c848af - add missing tests
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2041 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-01-16 16:04:16 +00:00
Elan Ruusamäe f7dab695cc - sort
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2040 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-01-16 16:01:23 +00:00
Elan Ruusamäe c65ad47a55 - change s/// separator that it doesn't confuse vim
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2027 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-01-15 22:03:59 +00:00
Jan Kneschke 708f499d75 fixed case-sensitive match of auth-method (fixes #1456)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2026 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-11-23 15:23:35 +00:00
Jan Kneschke 5b2e697cfa * fixed hanging redirects with keep-alive due to missing
"Content-Length: 0" headers


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1985 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-09-06 11:24:20 +00:00
Marcus Rückert 8cb24edfd1 - added test case for crash on undefined environment variables
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1975 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-08-28 23:11:56 +00:00
Marcus Rückert ea872bea37 - added testcase for bug #1322
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1968 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-08-27 21:48:53 +00:00