Commit Graph

45 Commits

Author SHA1 Message Date
Glenn Strauss dc9f95c75d [mod_status] table w/ count of con states (fixes #2427)
(replaces "legend")
2016-04-13 02:12:54 -04:00
Glenn Strauss c68f83aed4 [mod_status] page refresh option (fixes #2170)
e.g. http://server-address/server-status?refresh=10

x-ref:
  "server-status page should have an automatic reload"
  https://redmine.lighttpd.net/issues/2170
2016-04-13 02:08:24 -04:00
Glenn Strauss dac02e257c [mod_status] use snprintf() instead of sprintf()
From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3134 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-04-01 16:54:43 +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 c512345fa2 [config] check config option scope; warn if server option is given in 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
2015-11-07 12:51:11 +00:00
Stefan Bühler c31bf21f97 fix memory leak in mod_status when no counters are set (found by coverity)
From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2996 152afb58-edef-0310-8abb-c4023f1b3aa9
2015-07-05 21:34:07 +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 1be163b44a Remove chunkqueue_get_{append,prepend}* API
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
2015-02-08 19:10:36 +00:00
Stefan Bühler 6afad87d2e fix buffer, chunk and http_chunk API
* 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
2015-02-08 12:37:10 +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 f15ee9becb Fix mod_status bug: always showed "0/0" in the "Read" column for uploads (fixes #2351)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2805 152afb58-edef-0310-8abb-c4023f1b3aa9
2011-10-05 13:39:50 +00:00
Stefan Bühler f0816d8db2 fdevent: add solaris eventports (fixes #2171)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2796 152afb58-edef-0310-8abb-c4023f1b3aa9
2011-06-13 17:34:57 +00:00
Stefan Bühler 743230643e report libev handler in feature list/mod_status
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2755 152afb58-edef-0310-8abb-c4023f1b3aa9
2010-08-07 11:03:30 +00:00
Stefan Bühler f65467386f mod_status: Add version to status page (fixes #2219)
* the status page shouldn't be public anyway, so no reason to hide the version;
   but it makes debugging easier

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2744 152afb58-edef-0310-8abb-c4023f1b3aa9
2010-07-11 17:18:59 +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 214484dec0 Keep url/host values from connection to display information while keep-alive in mod_status (fixes #1202)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2549 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-06-21 17:25:34 +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 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 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
Elan Ruusamäe 299ae40e78 - add IdleServers and Scoreboard directives in ?auto mode for mod_status (#1507)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2045 152afb58-edef-0310-8abb-c4023f1b3aa9
2008-01-17 09:54:00 +00:00
Jan Kneschke 7d2665843f fixed counter overrun in ?auto in mod_status (#909)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1941 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-08-17 23:35:26 +00:00
Marcus Rückert 991ebdf36f - add the orig_uri to the uri column in mod_status.
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1864 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-05-25 14:23:46 +00:00
Marcus Rückert 1f8bceba8f - added query string to the uri column
- make the table cell content nowrap


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1846 152afb58-edef-0310-8abb-c4023f1b3aa9
2007-05-08 16:29:34 +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 874173ce56 added summary-tag to all tables in dirlisting and status
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1367 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-04 07:27:59 +00:00
Marcus Rückert acd628fe09 - remove unused variable
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1362 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-03 22:20:32 +00:00
Jan Kneschke fbcecd3303 fixed wording
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@935 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-01-11 10:18:58 +00:00
Jan Kneschke 7096a842b8 fix hang if mod_status is used without mod_fastcgi (fixes #439)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@916 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-01-04 23:27:22 +00:00
Jan Kneschke bc95f8024a added statistics to the fastcgi module and a simple text/plain reporter to mod_status
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@914 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-01-04 01:03:32 +00:00
Jan Kneschke 4d5dd7fe4d don't try to encode a empty uri.path
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@852 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-11-17 12:54:09 +00:00
Jan Kneschke 976f32182e simplified buffer-encoding functions into one function
- all of them do some kind of string-to-hex conversion
  (html, rel-uri, hex)
- add a rel-uri encoding next to the old rel-uri-part one
- fixes #266


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@822 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-11-07 13:15:51 +00:00
Jan Kneschke e290b119db added startup-time selectable network-backend
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@808 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-10-31 15:34:00 +00:00
Jan Kneschke 74d0c3d0de added BusyServer compat for ?auto
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@800 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-10-31 07:57:09 +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
Xuefer 68f009a99f make default of sort to work
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@688 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-09-05 17:04:29 +00:00
Xuefer 1f00903dd2 fix table css for easy of embeding
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@633 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-28 11:04:12 +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 9d5d48548f use the 'len' parameter for html-encoding
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@539 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-08-15 09:51: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
Jan Kneschke 99c3f027ce added sorting to output (by erik^)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@494 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-07-31 13:03:32 +00:00
Jan Kneschke b4400d0085 - added ?auto handling from Matthijs van der Klip
- divide by 1024 only if we are about 10240
- divide non-byte counters by 1000 and not 1024


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@408 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-06-26 13:28:15 +00:00
Jan Kneschke 0cccf378c7 PACKAGE -> PACKAGE_NAME (by smi)
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@67 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-03-01 22:16:42 +00:00
Jan Kneschke bcdc6a3bbc moved everything below trunk/ and added branches/ and tags/
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@30 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-02-20 14:27:00 +00:00