Commit Graph

58 Commits

Author SHA1 Message Date
Stefan Bühler 7e5b0fe9ab Rename fdevent_event_add to _set to reflect what the function does. Fix some handlers.
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2765 152afb58-edef-0310-8abb-c4023f1b3aa9
2010-08-17 09:54:42 +00:00
Stefan Bühler 38f2d1ddd7 cleanup fdevent code, removed linux-rtsig handler, replaced some fprintf calls
* use log functions
 * convert flags
 * fix handler callback prototype

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2752 152afb58-edef-0310-8abb-c4023f1b3aa9
2010-08-06 21:57:15 +00:00
Stefan Bühler 73e0bb2715 mod_cgi: fix race condition leaving response not forwarded to client (fixes #2217)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2737 152afb58-edef-0310-8abb-c4023f1b3aa9
2010-07-04 10:37:34 +00:00
Stefan Bühler 85b1f6afd3 Fix fd leaks in mod_cgi (fds not closed on pipe/fork failures, found by Rodrigo, fixes #2158, #2159)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2706 152afb58-edef-0310-8abb-c4023f1b3aa9
2010-01-30 11:32:12 +00:00
Stefan Bühler e21a83934e Fix mod_cgi cgi.execute-x-only option in global block
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2702 152afb58-edef-0310-8abb-c4023f1b3aa9
2010-01-06 16:07:43 +00:00
Stefan Bühler 22e8b456a9 Fix header inclusion order, always include "config.h" before any system header
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2624 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-11 14:31:42 +00:00
Stefan Bühler 4df22f2a32 Fix issues found with clang analyzer
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2594 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-07-21 20:35:27 +00:00
Stefan Bühler 3c11705903 Add "cgi.execute-x-only" to mod_cgi, requires +x for cgi scripts (fixes #2013)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2558 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-07-04 20:23:00 +00:00
Stefan Bühler fbdb305f8a Add server.breakagelog, a "special" stderr (fixes #1863)
* The breakage-log simply replaces stderr (the old stderr is moved away if needed for errorlog),
  and stderr isn't closed after forking.
  It defaults to stderr if started with -n (no daemonize), otherwise it defaults to /dev/null.
  It is _not_ reopened in log_error_cycle, as there may be many long running childs which have it
  still open anyway. Use a pipe-logger with cycle-support if you need it.


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2550 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-21 17:25:39 +00:00
Stefan Bühler a78acf99a1 Fix mod_cgi environment keys mangling (fixes #1969)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2497 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-28 18:32:03 +00:00
Stefan Bühler ecfdc60945 Fix SERVER_NAME port stripping (fixes #1968)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2492 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-28 18:26:23 +00:00
Stefan Bühler 2e823e8d14 Use server.tag for SERVER_SOFTWARE if configured (fixes #357)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2471 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-11 12:48:27 +00:00
Stefan Bühler 638ee6cad9 Add revision number to package version for svn/git checkouts
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2467 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-10 17:35:19 +00:00
Stefan Bühler 1527160c69 Add support for pipe logging for server.errorlog (fixes #296)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2466 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-10 10:50:51 +00:00
Stefan Bühler ff5c18bee8 Check for regular file in mod_cgi, so we don't try to start directories
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2439 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-09 16:51:56 +00:00
Stefan Bühler def70d86e9 Remove the optional port info from SERVER_NAME (thx Mr_Bond)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2431 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-09 16:51:44 +00:00
Stefan Bühler 63f785a2f8 Added some extra warning options in cmake and fix the resulting warnings (unused/static functions)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2414 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-03-07 21:05:37 +00:00
Stefan Bühler 90bfe20bf5 Fix mod_cgi segfault when bound to unix domain socket (#653)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2316 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-09-30 14:20:59 +00:00
Stefan Bühler b8835ab9a8 Allow digits in [s]cgi env vars (#1712)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2274 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-08-01 18:35:12 +00:00
Stefan Bühler ad12e4c5b2 Insert many con->mode checks; they should prevent two modules to handle the same request if they shouldn't (#631)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2271 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-08-01 16:13:34 +00:00
Stefan Bühler 52861d77df Replace buffer_{append,copy}_string with the _len variant where possible (#1732, thx crypt)
Replace BUFFER_{APPEND,COPY}_STRING_CONST with _len(b, CONST_STRL_LEN(x))


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2250 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-07-30 19:38:32 +00:00
Stefan Bühler 93e7167f84 Implement a clean way to open /dev/null and use it to close stdin/out/err in the needed places (#624)
- as stderr gets redirected to /dev/null before exec in childs, we cannot
   write to the log afterwards, so disabled that log messages too.


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2163 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-04-29 20:59:39 +00:00
Stefan Bühler 8dd78e06c7 Handle EINTR in mod_cgi during write() (#1640)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2153 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-04-23 15:05:50 +00:00
Stefan Bühler c065f36bc1 r2136@chromobil: stefan | 2008-02-28 22:18:14 +0100
Fix sending source of cgi script instead of 500 error if fork fails


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2107 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-02-28 21:19:24 +00:00
Jan Kneschke 830bb59d86 don't report the "cgi died ?" in case we killed the dangling CGI process
with SIGTERM


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2065 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-01-28 07:01:54 +00:00
Jan Kneschke 51826fc05c renamed ltostr() to LI_ltostr() to fix compile on HP/UX (fixes #465)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1951 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-08-18 12:25:52 +00:00
Jan Kneschke 41e836b410 fixed extracting status code from NPH scripts (fixes #1125)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1948 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-08-18 11:35:27 +00:00
Jan Kneschke dc4879473f removed debug msg
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1937 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-08-17 22:35:19 +00:00
Jan Kneschke f0333c8c0d fixed crash on mixed \r\n and \n sequences
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1925 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-08-17 21:04:20 +00:00
Marcus Rückert ba424e2293 - fix the previous commit
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1687 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-02-21 19:55:16 +00:00
Marcus Rückert b3f333d32e - add HTTPS=on to the environment of cgi scripts (#861)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1684 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-02-21 19:30:20 +00:00
Marcus Rückert 8cd1471cb3 - white space cleanup part 2 this time 1.4 ;)
i hope it helps with merging stuff back to 1.5

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1371 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-04 13:26:23 +00:00
Jan Kneschke 1982fda295 - close unused pipe-fds as soon as possible to generate a SIGPIPE if the remote end dies.
- only send REQUEST_URI and QUERY_STRING if they are set


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@1006 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-02-22 13:16:47 +00:00
Jan Kneschke ba50f7fbfc don't terminate the request, just ignore it
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@999 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-02-15 15:19:10 +00:00
Jan Kneschke 562f5c8e1f mod_scgi was illegally returning HANDLER_ERROR which cause a running cgi-request to be terminated.
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@984 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-02-08 12:01:58 +00:00
Jan Kneschke 433f1883ac improved performance of env-creation and added DOCUMENT_ROOT to the env
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@973 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-02-01 11:34:30 +00:00
Jan Kneschke 6e193e4040 make AIX happy and include fcntl.h instead of sys/fcntl.h (fixes #417)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@892 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-12-20 12:47:39 +00:00
Jan Kneschke d35482ee9a fixed typo (and next time I should at least compile before commiting)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@886 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-12-05 13:30:37 +00:00
Jan Kneschke 4de36723c0 cleanup the connection-internals at the end of the of the response and not at the end of the connection
- fixed 100% loops and error-log messages for mod_cgi ("sandy" <sjen@cs.stanford.edu>)


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@884 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-11-30 14:28:18 +00:00
Jan Kneschke 2cc4f96765 fixed streaming cgi output (like cgi-irc)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@870 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-11-20 09:28:51 +00:00
Jan Kneschke a4be52451f more unsigned/sign compare fixes
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@861 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-11-18 12:00:48 +00:00
Jan Kneschke 95132d93c8 fixed warnings about unused vars and unhandled enum-values in switch()
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@821 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-11-07 13:13:50 +00:00
Jan Kneschke 1c09f28447 removed con->request.content (mem-buffer) by a chunk-queue
which can buffer to tempfiles of the content is to large


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@741 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-09-26 08:56:39 +00:00
Jan Kneschke ff8637dee0 call create-env only for the first match. (for #220)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@619 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-24 21:01:34 +00:00
Jan Kneschke 9db5407390 HANDLER_GO_ON results in HANDLER_FINISHED later even if the we only received the header yet which is a bit too early.
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@613 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-23 10:42:03 +00:00
Jan Kneschke 2bc0d28842 wait for the cgi response before we send the HTTP header
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@601 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-21 23:08:50 +00:00
Jan Kneschke c5249103fd sol10 needs them
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@581 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-19 11:14:04 +00:00
Jan Kneschke bac9212c8f fixed possible uninit variables of the config-parser fails (merged [183])
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@551 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-16 13:07:46 +00:00
Jan Kneschke cd4c324ff2 allow numbers in header-keys
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@523 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-08 16:32:17 +00:00
Jan Kneschke c8408d015c removed setup_connection (merged [295])
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@512 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-08 10:27:07 +00:00