summaryrefslogtreecommitdiff
path: root/src/mod_ssi.c
Commit message (Collapse)AuthorAgeFilesLines
* [mod_ssi] enhance support for ssi varsfbrosson2016-01-031-2/+3
| | | | | | | | | Try ssi_vars if ssi_cgi_env does not have a matching var name. Allow var names to also include digits after the initial letter or underscore. From: fbrosson <fbrosson@users.noreply.github.com> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3069 152afb58-edef-0310-8abb-c4023f1b3aa9
* [config] check config option scope; warn if server option is given in ↵Stefan Bühler2015-11-071-1/+2
| | | | | | | | conditional From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3049 152afb58-edef-0310-8abb-c4023f1b3aa9
* fix segfaults in many plugins if they failed configurationStefan Bühler2015-05-141-0/+2
| | | | | | From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2988 152afb58-edef-0310-8abb-c4023f1b3aa9
* Use buffer API to read and modify "used" memberStefan Bühler2015-02-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | - a lot of code tried to handle manually adding terminating zeroes and keeping track of the correct "used" count. Replaced all "external" usages with simple wrapper functions: * buffer_string_is_empty (used <= 1), buffer_is_empty (used == 0); prefer buffer_string_is_empty * buffer_string_set_length * buffer_string_length * CONST_BUF_LEN() macro - removed "static" buffer hacks (buffers pointing to constant/stack memory instead of malloc()ed data) - buffer_append_strftime(): refactor buffer+strftime uses - li_tohex(): no need for a buffer for binary-to-hex conversion: the output data length is easy to predict - remove "-Winline" from extra warnings: the "inline" keyword just supresses the warning about unused but defined (static) functions; don't care whether it actually gets inlined or not. From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2979 152afb58-edef-0310-8abb-c4023f1b3aa9
* Remove buffer_prepare_copy() and buffer_prepare_append()Stefan Bühler2015-02-081-38/+2
| | | | | | | | | | * removed almost all usages of buffer as "memory" (without terminating zero) * refactored cgi variable name encoding From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2977 152afb58-edef-0310-8abb-c4023f1b3aa9
* Remove chunkqueue_get_{append,prepend}* APIStefan Bühler2015-02-081-34/+29
| | | | | | | | | | | | | | | | Although those were "easy" to use, they violated the abstraction: content of the chunkqueue should only be modified via the API. Replace with chunkqueue_get_memory() and chunkqueue_use_memory() for functions that read data from network (reusing large buffers), chunkqueue_steal_with_tempfiles() to store request bodies on disk temporarily. Modules that were generating content and need a buffer maintain the buffer manually (have to be careful to free the buffer on errors, as it isn't part of the chunkqueue yet). From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2976 152afb58-edef-0310-8abb-c4023f1b3aa9
* fix buffer, chunk and http_chunk APIStefan Bühler2015-02-081-17/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove unused structs and functions (buffer_array, read_buffer) * change return type from int to void for many functions, as the return value (indicating error/success) was never checked, and the function would only fail on programming errors and not on invalid input; changed functions to use force_assert instead of returning an error. * all "len" parameters now are the real size of the memory to be read. the length of strings is given always without the terminating 0. * the "buffer" struct still counts the terminating 0 in ->used, provide buffer_string_length() to get the length of a string in a buffer. unset config "strings" have used == 0, which is used in some places to distinguish unset values from "" (empty string) values. * most buffer usages should now use it as string container. * optimise some buffer copying by "moving" data to other buffers * use (u)intmax_t for generic int-to-string functions * remove unused enum values: UNUSED_CHUNK, ENCODING_UNSET * converted BUFFER_APPEND_SLASH to inline function (no macro feature needed) * refactor: create chunkqueue_steal: moving (partial) chunks into another queue * http_chunk: added separate function to terminate chunked body instead of magic handling in http_chunk_append_mem(). http_chunk_append_* now handle empty chunks, and never terminate the chunked body. From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2975 152afb58-edef-0310-8abb-c4023f1b3aa9
* fix unchecked return values from stream_open/stat_cache_get_entryStefan Bühler2014-02-161-11/+11
| | | | | | From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2954 152afb58-edef-0310-8abb-c4023f1b3aa9
* fix/silence bugs reported by ccc-analyzer (clang)Stefan Bühler2013-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* [auth] put REMOTE_USER into cgi environment, making it accessible to lua via ↵Stefan Bühler2013-08-301-5/+0
| | | | | | | | lighty.req_env (fixes #2495) From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2892 152afb58-edef-0310-8abb-c4023f1b3aa9
* Fix header inclusion order, always include "config.h" before any system headerStefan Bühler2009-10-111-13/+13
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2624 152afb58-edef-0310-8abb-c4023f1b3aa9
* Fix issues found with clang analyzerStefan Bühler2009-07-211-1/+6
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2594 152afb58-edef-0310-8abb-c4023f1b3aa9
* Add ssi.content-type option (default text/html, fixes #615)Stefan Bühler2009-06-101-1/+12
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2519 152afb58-edef-0310-8abb-c4023f1b3aa9
* mod_ssi printenv: print cgi env, add environment vars to cgi env (fixes #1713)Stefan Bühler2009-04-271-5/+38
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2485 152afb58-edef-0310-8abb-c4023f1b3aa9
* Add revision number to package version for svn/git checkoutsStefan Bühler2009-04-101-1/+2
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2467 152afb58-edef-0310-8abb-c4023f1b3aa9
* Added some extra warning options in cmake and fix the resulting warnings ↵Stefan Bühler2009-03-071-1/+2
| | | | | | (unused/static functions) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2414 152afb58-edef-0310-8abb-c4023f1b3aa9
* Insert many con->mode checks; they should prevent two modules to handle the ↵Stefan Bühler2008-08-011-0/+4
| | | | | | 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
* Replace buffer_{append,copy}_string with the _len variant where possible ↵Stefan Bühler2008-07-301-12/+12
| | | | | | | | | (#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
* fixed handling of waitpid() == EINTR mod_ssi on solarisJan Kneschke2008-03-101-32/+39
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2124 152afb58-edef-0310-8abb-c4023f1b3aa9
* - cosmeticElan Ruusamäe2008-01-181-2/+2
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2054 152afb58-edef-0310-8abb-c4023f1b3aa9
* - generate ETag and Last-Modified headers for mod_ssi based on newest ↵Elan Ruusamäe2008-01-181-0/+37
| | | | | | modified include (#1491) git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2053 152afb58-edef-0310-8abb-c4023f1b3aa9
* renamed ltostr() to LI_ltostr() to fix compile on HP/UX (fixes #465)Jan Kneschke2007-08-181-2/+2
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1951 152afb58-edef-0310-8abb-c4023f1b3aa9
* fixed type-cast for NULL in execl() (fixes #1235), fix provided by FrankJan Kneschke2007-06-151-1/+1
| | | | | | | DENIS git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1872 152afb58-edef-0310-8abb-c4023f1b3aa9
* - white space cleanup part 2 this time 1.4 ;)Marcus Rückert2006-10-041-229/+229
| | | | | | 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
* added comment on waitpid() + -HUPJan Kneschke2006-09-101-0/+8
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.11-ssl-fixes@1291 152afb58-edef-0310-8abb-c4023f1b3aa9
* fixed handling of subdirs in ssi (fixes #462), patch by robeJan Kneschke2006-03-041-8/+6
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@1021 152afb58-edef-0310-8abb-c4023f1b3aa9
* fixed missing sys/filio.h on solaris (fixes #332)Jan Kneschke2005-10-181-0/+5
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@790 152afb58-edef-0310-8abb-c4023f1b3aa9
* only get a buffer if we really need it (fixed #280)Jan Kneschke2005-09-211-8/+24
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@723 152afb58-edef-0310-8abb-c4023f1b3aa9
* on SEGFAULT tell were we whereJan Kneschke2005-08-211-0/+1
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@603 152afb58-edef-0310-8abb-c4023f1b3aa9
* fixed possible uninit variables of the config-parser fails (merged [183])Jan Kneschke2005-08-161-2/+2
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@551 152afb58-edef-0310-8abb-c4023f1b3aa9
* ..physical_path is gone and has ben replaced by subrequest_startJan Kneschke2005-08-151-1/+1
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@532 152afb58-edef-0310-8abb-c4023f1b3aa9
* allow numbers in header-keysJan Kneschke2005-08-081-3/+9
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@523 152afb58-edef-0310-8abb-c4023f1b3aa9
* removed setup_connection (merged [295])Jan Kneschke2005-08-081-22/+7
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@512 152afb58-edef-0310-8abb-c4023f1b3aa9
* dropped file-cache, added stat-cache and modules ALWAYS cleanup at ↵Jan Kneschke2005-08-081-4/+8
| | | | | | connection-end git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@502 152afb58-edef-0310-8abb-c4023f1b3aa9
* Looks like the '+' -> ' ' transformation is only applied in the ?query part ↵Jan Kneschke2005-06-041-1/+1
| | | | | | and not the rel-path. git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@366 152afb58-edef-0310-8abb-c4023f1b3aa9
* PACKAGE -> PACKAGE_NAME (by smi)Jan Kneschke2005-03-011-4/+0
| | | | git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@67 152afb58-edef-0310-8abb-c4023f1b3aa9
* * If sizeof(long) == sizeof(off_t), buffer_{append,copy}_off_t()Jan Kneschke2005-02-281-1/+1
| | | | | | | | | | | | | | are only macros to buffer_{append,copy}_long() * ltostr() returns the string length instead of always 0 * Don't check return value of buffer_prepare_append(buffer *b), since it only returns -1 if b == NULL, which we do a few lines above anyway. * Improved buffer_path_simplify(). No "dot_stack" required anymore. Operation can also be performed inplace. * Check errno also against EACCES at pidfile-unlink for not logging a "Permission denied". git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@54 152afb58-edef-0310-8abb-c4023f1b3aa9
* moved everything below trunk/ and added branches/ and tags/Jan Kneschke2005-02-201-0/+1073
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@30 152afb58-edef-0310-8abb-c4023f1b3aa9