Commit Graph

33 Commits

Author SHA1 Message Date
Glenn Strauss c987bec18e [multiple] use <algo>_iov() digest funcs
reduce code duplication
make it easier to add new algos

mod_authn_file:
- leverage r->tmp_buf instead of temporary allocating buffer_init()
- mod_authn_file_htpasswd_basic()
  - compare binary SHA1 (shorter) rather than base64 (longer)
  - split crypt() from mod_authn_file_htpasswd_basic() to separate func
  - apr_md5_encode() modifications for slightly better performance
2021-08-27 02:16:53 -04:00
Glenn Strauss 13ea2d880b [core] consistent inclusion of sys-time.h 2021-04-28 14:08:29 -04:00
Glenn Strauss 1fc8a3e1f2 [core] sys-crypto-md.h w/ inline message digest fn
sys-crypto-md.h w/ inline message digest functions; shared code
2020-07-08 22:51:31 -04:00
Glenn Strauss 3dd3cde902 [core] abstraction layer for HTTP header manip
http_header.[ch]
convert existing calls to manip request/response headers
convert existing calls to manip environment array (often header-related)
2018-09-23 18:01:58 -04:00
Glenn Strauss 04d76e7afd [core] some header cleanup
provide standard types in first.h instead of base.h
provide lighttpd types in base_decls.h instead of settings.h
reduce headers exposed by headers for core data structures
  do not expose <pcre.h> or <stdlib.h> in headers
move stat_cache_entry to stat_cache.h
reduce use of "server.h" and "base.h" in headers
2018-04-08 22:22:23 -04:00
Glenn Strauss 9e75b81982 [core] reduce exposure of unistd.h, other includes
reduce exposure of unistd.h, and some other include cleanup
2017-07-15 22:42:15 -04:00
Glenn Strauss a53f662a30 [core] remove some unused header includes
remove exposure of stdio.h in buffer.h for print_backtrace(), now static
2017-03-28 02:17:33 -04:00
Glenn Strauss 445bc2914a [mod_cml] include lua headers before base.h
to avoid (historical) conflict with IN and OUT macros used in lua
and openssl headers (since base.h includes openssl headers when present)
2016-12-05 17:47:35 -05:00
Glenn Strauss ac90699d28 [autobuild] rm module stub code for missing deps
remove module stub code since the build system(s) no longer build any
module when the dependencies for a given module are not present.
2016-10-17 14:15:50 -04:00
Glenn Strauss e5006d88eb pass buf size to li_tohex()
also change passing of fixed-sized arrays: need to pass pointer to array
as otherwise size does not get enforced

From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3135 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-04-01 16:54:46 +00:00
Glenn Strauss f5453290b7 validate return values from strtol, strtoul (fixes #2564)
From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3122 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-03-26 10:58:49 +00:00
Glenn Strauss 8abd06a7ff consistent inclusion of config.h at top of files (fixes #2073)
From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3113 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-03-19 15:14:35 +00:00
Stefan Bühler f3b577ddee use libmemcached instead of deprecated libmemcache
Differential Revision: https://review.lighttpd.net/D5

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

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3071 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-01-03 14:48:11 +00:00
Stefan Bühler c354229f42 add handling for lua 5.2 and 5.3 (fixes #2674)
Reviewers: stbuehler

Differential Revision: https://review.lighttpd.net/D4

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

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3070 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-01-03 14:48:09 +00:00
Stefan Bühler ad3e93ea96 Use buffer API to read and modify "used" member
- 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
2015-02-08 19:10:44 +00:00
Stefan Bühler 90dd8af32b Always use our 'own' md5 implementation, fixes linking issues on MacOS (fixes #2331)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2799 152afb58-edef-0310-8abb-c4023f1b3aa9
2011-07-30 09:16:03 +00:00
Stefan Bühler c66d21bc2b [md5] fix md5 includes if openssl is not available (#2269)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2790 152afb58-edef-0310-8abb-c4023f1b3aa9
2011-04-24 16:14:54 +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 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 c60b60e7f0 workaround some warnings from libmemcache
- as libmemcache isn't maintained anymore, it is unlikely
   the function signature get fixed (should be const char* instead of char*)


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2413 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-03-07 21:05:21 +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 62d8d1ef53 fixed md5 on 64bit platforms
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@856 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-11-17 14:39:07 +00:00
Jan Kneschke e45388fc44 added file_isdir
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@664 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-31 23:06:59 +00:00
Jan Kneschke b8e6fee3c3 removed unused variable
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@573 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-18 11:56:07 +00:00
Jan Kneschke 487dd60613 added fucntionname to errormsg
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@476 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-26 08:27:08 +00:00
Jan Kneschke d576e0ad64 added functions file_isreg() and dir_files() and added last-modified handling
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@472 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-24 06:58:03 +00:00
Jan Kneschke 1408a4820d ported mod_cml to lua
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@452 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-15 17:46:13 +00:00
Jan Kneschke 1c7fb65b56 a small rename
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@445 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-14 09:08:00 +00:00
Jan Kneschke c1777b764b check parameters for memcache functions and added functions for md5() and fetching params from the query string
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@438 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-11 10:59:39 +00:00
Jan Kneschke a03091d79e added memcache support
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@432 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-09 20:17:07 +00:00
Jan Kneschke 673a6cd0a9 replace mysql my memcache prototypes, fixes parameter handling
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@431 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-08 22:29:40 +00:00
Jan Kneschke 6d60bcb040 use log_* functions for debugging and don't segfault on evaluation
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@428 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-07 22:39:14 +00:00
Jan Kneschke 81368ccd4e added mod_cml (Cache Meta Language)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@421 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-06 11:58:19 +00:00