Commit Graph

30 Commits

Author SHA1 Message Date
Stefan Bühler 17762fad01 maintain physical.basedir (the "acting" doc-root as prefix of physical.path) in more places
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2926 152afb58-edef-0310-8abb-c4023f1b3aa9
2014-01-10 12:04:57 +00:00
Stefan Bühler 6f208cfde1 fix/silence bugs reported by ccc-analyzer (clang)
These should all be non critical:
 * memory leaks on startup in error cases (which lead to
   immediate shutdowns anyway)
 * http_auth/ldap: passing uninitialized "ret" to ldap_err2string
 * sizeof(T) not matching the target pointer in malloc/calloc calls;
   those cases were either:
   * T being the wrong pointer type - shouldn't matter as long as all
     pointers have same size
   * T being larger than the type needed
 * mod_accesslog: direct use after free in cleanup (server shutdown);
   could crash before "clean" shutdown
 * some false positives (mod_compress, mod_expire)
 * assert(srv->config_context->used > 0); - this is always the case,
   as there is always a global config block

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

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2920 152afb58-edef-0310-8abb-c4023f1b3aa9
2013-11-13 11:43:26 +00:00
Stefan Bühler f5f6b954b0 mod_magnet: add traceback for printing lua errors
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2681 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-26 14:16:20 +00:00
Stefan Bühler 07ae3fb815 mod_magnet: fix pairs() for normal tables and strings (fixes #1307)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2680 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-26 14:16:15 +00:00
Stefan Bühler 915a9e3e88 Add some iterators for mod_magnet (fixes #1307)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2644 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-10-12 19:49: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 4f4d40f3f7 Add "lighty.req_env" table to mod_magnet for setting/getting environment values for cgi (fixes #1967, thx presbrey)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2515 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-10 13:08:15 +00:00
Stefan Bühler c21623456c mod_magnet: Add env["request.path-info"]
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2474 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-15 22:33:36 +00:00
Stefan Bühler 1ff333cb4a mod_magnet: Add env["request.remote-ip"] (fixes #1740)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2473 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-04-15 22:33:34 +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 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 f08cd32877 Close connection in mod_magnet if returned status code
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2201 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-07-20 17:55:14 +00:00
Stefan Bühler 73189c64e7 Fix mod_magnet to set con->mode = p->id if it generates content, so returning 4xx/5xx doesn't append an error page
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2155 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-04-23 19:27:12 +00:00
Stefan Bühler 80be71bd43 Fix mod_magnet: enable "request.method" and "request.protocol" in lighty.env (#1308)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2137 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-03-26 13:51:33 +00:00
Jan Kneschke e49da67a47 only set the etag if we have one
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1380 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-07 07:46:22 +00:00
Jan Kneschke 41bcf415c4 added content-type to the .stat() and decoded the st_mode
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1378 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-06 11:21:00 +00:00
Jan Kneschke bf0f7832c1 added lighty.stat() which uses the stat-cache to reduce the number of syscalls
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1377 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-06 08:27:50 +00:00
Jan Kneschke 0780de8bfa added the original URI, before the rewrite, to the env.
the orig-uri is forwarded as REQUEST_URI to the *CGI backends


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1376 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-06 07:14:10 +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
Marcus Rückert 3e7e2d528d - marked parameter as unused
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1359 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-03 22:16:35 +00:00
Jan Kneschke 634ec365f5 make the config-options arrays instead of strings
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1338 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-23 11:19:31 +00:00
Jan Kneschke a34a3ae173 reverted [1312] as it led to seg-faults
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1319 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-20 14:40:28 +00:00
Jan Kneschke 2a3ac19883 rici pointed me the lua_cpcall() to call a lua-c-function in protected mode
instead of used lua_atpanic to handle errors myself



git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1312 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-16 11:29:48 +00:00
Jan Kneschke e931d4f27f fixed compile if lua is not enabled
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1300 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-15 11:49:57 +00:00
Jan Kneschke 63ec609a56 - added set() for .env[]
- added .RESTART_REQUEST
- fixed handling of .content = { { ... } } if offset is set, but no length
- added range checks for offset and length



git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1299 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-15 10:00:46 +00:00
Jan Kneschke c7b9858b03 added support for lighty.status[] in mod_magnet
- moved the status_counter_* functions from mod_fastcgi.c to status_counter.[ch]


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1298 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-14 12:00:32 +00:00
Jan Kneschke b79f1a24c9 - moved all global vars to the lighty.* namespace
- added lighty.env[] to get read access to uri.path, physical.path and friends


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1295 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-13 13:13:27 +00:00
Jan Kneschke 925cb27a14 - add a try-catch around add-content
- make the content-array simpler
- make request[] a porxy to the con->request array in c



git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1293 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-11 20:37:29 +00:00
Jan Kneschke daeab348cd added mod_magnet
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1292 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-09-10 22:01:43 +00:00