Commit Graph

16 Commits

Author SHA1 Message Date
Glenn Strauss ac9822f468 [core] combine duplicated connection reset code
connection_reset() now calls connection_response_reset()
instead of duplicating the code in both routines
2016-12-05 22:53:09 -05:00
Glenn Strauss 8047c2f448 fix errors detected by Coverity Scan
fix potential NULL pointer dereference in mod_deflate.c
remove logically dead code in connection-glue.c
add coverity annotations to see if some issues will be reclassified
2016-09-23 09:09:57 -04:00
Glenn Strauss a95aaa9de9 [TLS] read all available records from SSL_read()
read all available records from SSL_read(), even if larger than
MAX_READ_LIMIT, since the data is already in memory.  openssl is
configured with SSL_MODE_RELEASE_BUFFERS and will release openssl
buffers once records have been read.

Without reading available data, there was a chance that the connection
would hang waiting for a read event on the fd, even though all the
data had already been read from kernel socket buffers and was in openssl
memory waiting to be read with SSL_read().

(thx glen and avij)
2016-07-27 06:00:44 -04:00
Glenn Strauss bce293e4a7 [TLS] better handling of SSL_ERROR_WANT_READ/WRITE
2016-07-27 02:24:53 -04:00
Glenn Strauss acad2c903a fix some warnings reported by cppcheck
fix some warnings reported by cppcheck and
change mod_skeleton.c to use buffer_string_length()
2016-07-17 16:13:31 -04:00
Glenn Strauss 8861c2bb54 [mod_cgi] handle local redirect response (fixes #2108)
RFC3875 CGI 1.1 specification section 6.2.2 Local Redirect Response

  "CGI local redirect not implemented correctly"
2016-07-14 16:31:08 -04:00
Glenn Strauss bfac0285a7 remove excess calls to joblist_append()
(recent commits streamlined dynamic handler flow control)
2016-06-19 23:34:16 -04:00
Glenn Strauss f69f209e6d [core] option to stream request body to backend (fixes #376)
Set = 1 or = 2
to have lighttpd connect to backend (CGI, FastCGI, SCGI, proxy)
immediately after parsing request headers, and to stream request body
as it arrives.

default: buffer entire request body before connecting to backend,
in order to avoid tying up (limited) backend resources which are often
implemented using libraries which wait for entire request body before

  "Reimplement upload (POST) handling to match apache/zeus/thttpd/boa functionality"
2016-06-19 23:34:16 -04:00
Glenn Strauss 695c8f4e07 [config] config options to stream request/response (#949, #376)
This allows admin to configure if response is collected in entirety
prior to sending data to client

For compatibility with existing configs, default is existing behavior:
  buffer entire response prior to sending data to client

The following are config options, though not all implemented yet

// default: buffer entire request body before connecting to backend = 0

// stream request body to backend; buffer to temp files = 1

// stream request body to backend; minimal buffering might block upload = 2

// default: buffer entire response body before sending to client = 0

// stream response body to client; buffer to temp files = 1

// stream response body to client; minimal buffering might block backend = 2

  "fastcgi, cgi, flush, php5 problem."
 "Reimplement upload (POST) handling to match apache/zeus/thttpd/boa functionality"
2016-06-19 23:34:15 -04:00
Glenn Strauss 0fb91b026e minor: add missing #include <errno.h>
(needed by connections-glue.c when not building with openssl)
2016-04-28 13:20:34 -04:00
Glenn Strauss 49c74fff65 [core] compile with upcoming openssl 1.1.0 release (fixes #2727)
(thx falemagn)

  "Won't compile with OpenSSL 1.1.0"
2016-04-24 20:28:03 -04:00
Glenn Strauss 635ab6f802 mv funcs from connections.c to connections-glue.c

no code changes besides making connection_handle_read() public
(by removing 'static' and adding to connections.h)
2016-04-18 06:19:03 -04:00
Glenn Strauss 8abd06a7ff consistent inclusion of config.h at top of files (fixes #2073)
From: Glenn Strauss <>

git-svn-id: svn:// 152afb58-edef-0310-8abb-c4023f1b3aa9
2016-03-19 15:14:35 +00:00
Stefan Bühler a6218765c2 Fix some problems with more strict compilers (#1923)
git-svn-id: svn:// 152afb58-edef-0310-8abb-c4023f1b3aa9
2009-03-07 13:54: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:// 152afb58-edef-0310-8abb-c4023f1b3aa9
2006-10-04 13:26:23 +00:00
Jan Kneschke d26f6893d9 moved external functions to *-glue.c
this simplifies the linkage on windows and macosx
which can't reference the binary for symbols

git-svn-id: svn:// 152afb58-edef-0310-8abb-c4023f1b3aa9
2005-02-28 08:42:47 +00:00