Commit Graph

33 Commits (f0074a7ded08d52b39f3ccc3829a3a830cd16261)

Author SHA1 Message Date
Glenn Strauss 5ec5e124c1 [tests] consolidate some tests/ content 2 years ago
Glenn Strauss b598bb53f9 [tests] remove FastCGI test dependency on PHP 2 years ago
Glenn Strauss 96abd9cfb8 [core] coalesce nearby ranges in Range requests
Range requests must be HTTP/1.1 or later (not HTTP/1.0)
3 years ago
Glenn Strauss 1d9709b8ab [core] update HTTP status codes list from IANA 3 years ago
Glenn Strauss 61f85d14ee [core] reject WS following header field-name (fixes #2985)
reject whitespace following request header field-name and before colon
Such whitespace is forbidden in RFC 7230 Section 3.2.4.

strict header parsing is enabled by default in lighttpd.  However,
if explicitly disabled in lighttpd.conf, lighttpd will continue to
accept (and re-format) such field-names before passing to any backend.
  UNSAFE: server.http-parseopts = ( "header-strict" => "disable" )
  This is NOT RECOMMENDED since doing so disables other protections
  provided by lighttpd strict http header parsing.

(thx fedormixalich)

x-ref:
  stricter request header parsing
  https://redmine.lighttpd.net/issues/2985
3 years ago
Glenn Strauss 90c30d5e90 [core] http_status_append() 5 years ago
Glenn Strauss d161f53de0 [core] security: use-after-free invalid Range req
(thx Marcus Wengelin)
5 years ago
Glenn Strauss 1b62dc325c [tests] test_request unit tests
unit tests for request processing
collect existing request processing tests from Perl tests/*.t
(test_request.c runs *much* more quickly than Perl tests/*.t)
5 years ago
Glenn Strauss dc1675ea32 [core] fix POST with chunked request body (fixes #2854)
(thx the_jk)

x-ref:
  "chunked transfer encoding in request body only works for tiny chunks"
  https://redmine.lighttpd.net/issues/2854
5 years ago
Glenn Strauss 37dac9a23c [core] support Expect: 100-continue with HTTP/1.1 (fixes #377, #1017, #1953, #2438)
support Expect: 100-continue with HTTP/1.1 requests

Ignore config option server.reject-expect-100-with-417;
server.reject-expect-100-with-417 will be removed in a future release.

x-ref:
  "Incorrect handling of the 100 (Continue) Status"
  https://redmine.lighttpd.net/issues/377
  "'Expect' header gives HTTP error 417"
  https://redmine.lighttpd.net/issues/1017
  "Improve DAV support to be able to handle git as a client"
  https://redmine.lighttpd.net/issues/1953
  "Change server.reject-expect-100-with-417 from flag to regular expression matching the URL"
  https://redmine.lighttpd.net/issues/2438
6 years ago
Glenn Strauss 4d7f5737f1 [core] support Transfer-Encoding: chunked req body (fixes #2156)
support Transfer-Encoding: chunked request body in conjunction with
  server.stream-request-body = 0

dynamic handlers will still return 411 Length Required if
  server.stream-request-body = 1 or 2 (!= 0)
  since CGI-like env requires CONTENT_LENGTH be set
  (and mod_proxy currently sends HTTP/1.0 requests to backends,
   and Content-Length recommended for robust interaction with backend)

x-ref:
  "request: support Chunked Transfer Coding for HTTP PUT"
  https://redmine.lighttpd.net/issues/2156
7 years ago
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
10 years ago
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
11 years ago
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
12 years ago
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
12 years ago
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
14 years ago
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
14 years ago
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
15 years ago
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
16 years ago
Jan Kneschke 30748f202c fixed timestamps for 32bit time_t which wraps at 2038
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1956 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Jan Kneschke f67cdb67df fixed handling of duplicate If-Modified-Since to return 304
- don't append the second string to the first, but free it instead


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1947 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Jan Kneschke 5bc539b63e don't send a Content-Length for 1xx, 204 and 304 (fixes #1002)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1946 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Jan Kneschke 9bc4c2a025 added testcases for #1286 and #1287
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1929 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Marcus Rückert b8df99f3db - a few more whitespace cleanups
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1374 152afb58-edef-0310-8abb-c4023f1b3aa9
17 years ago
Jan Kneschke 096ec7f1ca OPTIONS may have a content-length
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@1024 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke bd8e6919d2 added tests for possible crashes
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@974 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 580823f791 forbid Content-Length for GET, HEAD or OPTIONS requests
allow duplicate If-Modified-Since headers if they are equal


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@907 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke a77f7a90d8 the range-request options was not handled at all, added test case
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@781 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 3ebc17571a find perl at runtime
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@670 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 7988661090 added tests for keep-alive and setenv and passed a ARRAY ref instead of a HASH ref
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@654 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 877161c067 switch to LigtyTest module
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@394 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 7a25f1b5f5 Unified all tests to use the LighyTest framework
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@388 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 40e8c6714a seperated the tests for each section and let run-tests.pl use Test::Harness
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@72 152afb58-edef-0310-8abb-c4023f1b3aa9
19 years ago