Commit Graph

153 Commits (26dce93086ba46a3d9ead391b33b8a02515416ae)

Author SHA1 Message Date
Stefan Bühler 559b198f86 [auth] put REMOTE_USER into cgi environment, making it accessible to lua via 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
10 years ago
Stefan Bühler 05858f6cf2 [ssl] Fix $HTTP["scheme"] conditional, could be "http" for ssl connections if the ssl $SERVER["socket"] conditional was nested (fixes #2501)
con->conf.is_ssl got removed and replaced by:
 * con->conf.ssl_enabled for the config var "ssl.engine" - it is only
   used to determine which server-sockets should use ssl. (usually not
   needed as it is mandatory and enough to set ssl.pemfile anyway)
 * con->srv_socket->is_ssl to detect the actual ssl status of the
   bound socket, which is the same as the ssl status of the connection
 * con->uri.scheme for the actual $HTTP["scheme"] value, also used for
   the CGI "HTTPS=ON" variable. This defaults to "https" if the
   connection uses ssl, but can be changed for example by mod_extforward
   if X-Forwarded-Proto: is set to either "http" or "https" (other values
   are ignored right now)

Also removed the broken srv_socket->is_proxy_ssl as it was a connection
value in a server_socket struct...

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2887 152afb58-edef-0310-8abb-c4023f1b3aa9
10 years ago
Cyril Brulebois 0c6a564543 Fix non-ANSI function declarations.
The proper way to declare a function taking no parameters isn't:
  foo bar();

But this instead:
  foo bar(void);

Signed-off-by: Cyril Brulebois <kibi@debian.org>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2843 152afb58-edef-0310-8abb-c4023f1b3aa9
11 years ago
Stefan Bühler 5677f17442 [mod_*cgi,mod_accesslog] Fix splitting :port with ipv6 (fixes #2333, thx simoncpu)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2834 152afb58-edef-0310-8abb-c4023f1b3aa9
11 years ago
Stefan Bühler f434d514ad Limit amount of bytes we send in one go; fixes stalling in one connection and timeouts on slow systems.
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2801 152afb58-edef-0310-8abb-c4023f1b3aa9
12 years ago
Stefan Bühler adc97e5ba3 [*cgi] Use physical base dir (alias, userdir) as DOCUMENT_ROOT in cgi environments (fixes #2216)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2794 152afb58-edef-0310-8abb-c4023f1b3aa9
12 years ago
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
13 years ago
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
13 years ago
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
14 years ago
Stefan Bühler 9e6b2c63f0 Fix handling network-write return values (#2024)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2596 152afb58-edef-0310-8abb-c4023f1b3aa9
14 years ago
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
14 years ago
Stefan Bühler 909a546abd Fix hanging connection in mod_scgi (fixes #2024)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2585 152afb58-edef-0310-8abb-c4023f1b3aa9
14 years ago
Stefan Bühler 839aa7dbd9 Reset ignored signals to SIG_DFL before exec() in fastcgi/scgi (fixes #2029)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2582 152afb58-edef-0310-8abb-c4023f1b3aa9
14 years ago
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
14 years ago
Stefan Bühler 9c53e2ef80 Fix workaround for incorrect path info/scriptname if scgi prefix is "/" (fixes #729)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2498 152afb58-edef-0310-8abb-c4023f1b3aa9
14 years ago
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
14 years ago
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
14 years ago
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
14 years ago
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
14 years ago
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
14 years ago
Stefan Bühler a7ecb6b93a Fix segfault in mod_scgi (fixes #1911)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2404 152afb58-edef-0310-8abb-c4023f1b3aa9
14 years ago
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
15 years ago
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
15 years ago
Stefan Bühler 6ce1dfb0d1 mod_{fast,s}cgi: overwrite environment variables (#1722)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2265 152afb58-edef-0310-8abb-c4023f1b3aa9
15 years ago
Stefan Bühler 60b90dad70 Use filedescriptor 0 for mod_scgi spawn socket, redirect STDERR to /dev/null (#1716)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2257 152afb58-edef-0310-8abb-c4023f1b3aa9
15 years ago
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
15 years ago
Stefan Bühler a70ba6c625 Fix scgi HTTP/1.* status parsing (#1638), found by met@uberstats.com
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2223 152afb58-edef-0310-8abb-c4023f1b3aa9
15 years ago
Xuefer b5632eada1 fixed #729: Incorrect PATH_INFO when FastCGI is serving "/", use "fix-root-scriptname" => "enable" to workaround
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2182 152afb58-edef-0310-8abb-c4023f1b3aa9
15 years ago
Xuefer 5921dc1f2d sync code between fastcgi->scgi: copy note_is_sent, fix typos
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2173 152afb58-edef-0310-8abb-c4023f1b3aa9
15 years ago
Xuefer b557589f05 sync the "if" logic block with mod_fastcgi to make the indention same
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2172 152afb58-edef-0310-8abb-c4023f1b3aa9
15 years ago
Stefan Bühler 6754ad5116 fix min-procs handling in mod_scgi.c, just set to max-procs (patch from #623)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2109 152afb58-edef-0310-8abb-c4023f1b3aa9
15 years ago
Elan Ruusamäe 513057ebd4 - fix also scgi and proxy modules. #1489
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2035 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
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
16 years ago
Jan Kneschke c4e3150283 fixed possible overflow in unix-socket path checks on BSD (#713)
- use sizeof(sun_path) instead of UNIX_PATH_MAX which might not be
  defined


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1944 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Jan Kneschke 8f9f532083 * fixed crash on 32bit archs when debug-msgs are printed in mod_scgi,
mod_fastcgi and mod_webdav (#1263)



git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1882 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Jan Kneschke 768a0d0eab fixed type-cast for NULL in execl() (fixes #1235), fix provided by Frank
DENIS


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1872 152afb58-edef-0310-8abb-c4023f1b3aa9
16 years ago
Robert Jakabosky 5d8855bdef commit fix from Ticket #964
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1501 152afb58-edef-0310-8abb-c4023f1b3aa9
17 years ago
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
17 years ago
Jan Kneschke 9d3c1b09de fixed calculation of unix-socket path length if SUN_LEN is not defined (fixes #553)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@1022 152afb58-edef-0310-8abb-c4023f1b3aa9
17 years ago
Jan Kneschke 0525ed2816 fixed calculation of socket-len if SUN_LEN is not defined
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@1009 152afb58-edef-0310-8abb-c4023f1b3aa9
17 years ago
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
18 years ago
Jan Kneschke ea57fa1747 ok, rel_path is not updated by mod_indexfile or the pathinfo handling
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@924 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 415e215746 use physical.rel_path instead url.path to handle case-insensitive file-systems in the right way
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@923 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
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
18 years ago
Jan Kneschke e3cac26e27 fixed unsinged compare
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@848 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
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
18 years ago
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
18 years ago
Jan Kneschke b3a8abd09d added the same check-local behaviour as in mod_fastcgi
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@701 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
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
18 years ago
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
18 years ago
Jan Kneschke 2ff9f5822e removed debug output
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@401 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 91f59d67b1 fixed scgi protocol handling and run first tests again pythonpaste
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@382 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago
Jan Kneschke 53c6ac0628 added a mod_scgi.c to implement SCGI for the python folks. This just
a skeleton and has to tested against a real SCGI server.


git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.3.x@381 152afb58-edef-0310-8abb-c4023f1b3aa9
18 years ago