Commit Graph

2744 Commits (9749503b1dc221aed4ba6e215c6acb893d8281be)

Author SHA1 Message Date
Glenn Strauss 9749503b1d [core] separate func to reset FILE_CHUNK 2018-11-21 00:23:40 -05:00
Glenn Strauss 19b5fbdd3d [mod_fastcgi] transfer chunks minus packet padding
(thx avij)
2018-11-19 20:52:34 -05:00
Glenn Strauss f0df89a996 [mod_redirect,mod_rewrite] use server_name
use server_name for authority if Host not provided
(Host is not required in HTTP/1.0)
2018-11-18 22:38:47 -05:00
Glenn Strauss b5cd216781 [mod_fastcgi] minor: copy packet without padding 2018-11-18 17:04:02 -05:00
Glenn Strauss 758c58cda5 [core] clear chunk buffer upon release
(before adding back to reusable buffer pool)
2018-11-18 17:02:06 -05:00
Glenn Strauss b74188e5b3 [mod_cgi] reset reused buffer on internal redir 2018-11-18 05:29:15 -05:00
Glenn Strauss aba45f68d8 [core] perf: simpler buffer_string_space() (tests) 2018-11-18 04:57:05 -05:00
Glenn Strauss 473ce93c14 [core] perf: faster HTTP pipelined requests
separate reading header from connection_handle_read_state() into
connection_read_header() so that HTTP pipelined requests can skip
optimistic read()/recv()
2018-11-18 04:36:58 -05:00
Glenn Strauss d1bf435573 [core] perf: simpler buffer_string_space() (fixed) 2018-11-18 02:47:22 -05:00
Glenn Strauss 70d7d0a0a1 [core] server.chunkqueue-chunk-sz = 4096
server.chunkqueue-chunk-sz = 4096 (default)
Can be configured any integral value greater than 0.
Value is rounded up to next 1024 if not an even multiple of 1k.

Sites with large request or response headers may benefit from
an 8k or 16k chunk size.  Embedded systems might choose to minimize
memory use by using a 1k chunk size.
2018-11-17 23:53:50 -05:00
Glenn Strauss cc1c2f0e37 [core] server.compat-module-load = "disable"
controls whether default and compatibility modules are loaded,
including default modules mod_indexfile, mod_staticfile, mod_dirlisting
and if mod_authn* modules are loaded when mod_auth in server.modules
and if mod_openssl is loaded when ssl. directives are seen

default: server.compat-module-load = "enable"
(preserve existing behavior)

recommended config: explicitly load desired modules in desired order
2018-11-17 22:26:18 -05:00
Glenn Strauss 1b8453886f [mod_webdav] quiet coverity false positive 2018-11-17 01:48:52 -05:00
Glenn Strauss f13db69012 [core] fix setting of headers previously reset (fixes #2919)
bug may result in long delays when using mod_deflate on connections
with keep-alive, as the result is sent without Content-Length or
Transfer-Encoding

(regression in lighttpd 1.4.51)

(thx GilGalaad)

x-ref:
  "high latency on 1.4.51 + proxy + deflate"
  https://redmine.lighttpd.net/boards/2/topics/8365
  https://redmine.lighttpd.net/issues/2919
2018-11-17 01:24:26 -05:00
Glenn Strauss 41b50cfa71 [core] fix 301 -> 302 overwrite with Location (fixes #2918)
fix bug resulting in status code being overwritten from 301 to 302 if
Location response header is returned by a backend which is not mod_proxy

(regression in lighttpd 1.4.51)

(thx shochodev)

x-ref:
  "lighttpd is not obeying the http status code sent by our application (302 sent by lighttpd when 301 is sent by application)"
  https://redmine.lighttpd.net/issues/2918
2018-11-15 04:01:17 -05:00
Glenn Strauss 2d91475828 [mod_cgi] perf: cache getenv() results at start up 2018-11-15 04:01:17 -05:00
Glenn Strauss 5ff1ddeb66 [mod_wstunnel] perf: reuse large buffers 2018-11-12 23:01:34 -05:00
Glenn Strauss 88ee73d0a2 [multiple] perf: simplify chunkqueue_get_memory() 2018-11-12 23:01:34 -05:00
Glenn Strauss f512bfa4af [core] use chunk_buf_sz instead of hard-coded num 2018-11-12 21:56:05 -05:00
Glenn Strauss 9f6a46738d [multiple] dynamic handlers hint backend header sz 2018-11-12 21:56:05 -05:00
Glenn Strauss 31d16af78b [core] perf: simpler buffer_string_space() 2018-11-12 21:56:05 -05:00
Glenn Strauss 1539cbfdc1 [core] perf: chunkqueue buffers already sized up
provide new interface for sizing to even larger if very large request
(chunkqueue_prepend_buffer_open_sz())
2018-11-12 21:56:05 -05:00
Glenn Strauss f1e5f74f8f [mod_webdav] return 403 if file should exist
return 403 if file should exist for PROPPATCH or LOCK, but stat fails
2018-11-12 21:56:05 -05:00
Glenn Strauss a1cda77f9b [mod_openssl] prefer using TLS_server_method()
prefer TLS_server_method() instead of SSLv23_server_method()
(SSLv23_server_method() is deprecated in openssl 1.1.0)
2018-11-12 21:56:05 -05:00
Glenn Strauss aa00359e6c [mod_cgi] perf: use stat_cache for cgi handler 2018-11-12 21:56:05 -05:00
Glenn Strauss d182e90bb1 [mod_openssl] SSL_read before second SSL_shutdown
call SSL_read() before calling SSL_shutdown() a second time.

Drain SSL read buffers in case pending records need processing.

x-ref:
  "New session ticket breaks bidirectional shutdown of TLS 1.3 connection"
  https://github.com/openssl/openssl/issues/6262
  reported to lighttpd by intexk
  https://www.lighttpd.net/2018/10/14/1.4.51/
2018-11-12 21:56:05 -05:00
Glenn Strauss 89062d8134 [mod_openssl] move SSL_shutdown() to separate func
mod_openssl_close_notify()
2018-11-12 21:56:05 -05:00
Rosen Penev bc91bbd0c6 [core] Don't call RAND_cleanup with OpenSSL 1.1.x
RAND_cleanup is deprecated and does nothing with 1.1.x.

It also breaks with OpenSSL compiled with no deprecated APIs.
(-DOPENSSL_API_COMPAT=<version>)

github: closes #93
2018-11-12 21:56:05 -05:00
Glenn Strauss 6dcdc1af18 [mod_fastcgi,mod_scgi] perf: env accumulation 2018-11-12 21:56:05 -05:00
Glenn Strauss 407b4d140b [mod_cgi] perf: reuse buffers for creating CGI env 2018-11-12 21:56:05 -05:00
Glenn Strauss e0dbff4750 [core] slightly simpler flag append to string 2018-11-12 21:56:05 -05:00
Glenn Strauss 5fe9339942 [core] perf: inline buffer_append_string_buffer() 2018-11-12 21:56:05 -05:00
Glenn Strauss 8c0792a58c [multiple] better packing of struct chunk
remove c->file.name
previous commit modified c->file.name to share buffer with c->mem
2018-11-12 21:56:05 -05:00
Glenn Strauss 3d8d56d8de [multiple] perf: reuse large buffers w/ backend 2018-11-12 21:56:05 -05:00
Glenn Strauss fccc7fc607 [core] perf: chunk.c chunk pool
reuse chunks across chunkqueues; remove cq->unused, cq->unused_chunks
reuse same buffer c->mem and c->file.name in chunk
2018-11-12 08:25:28 -05:00
Glenn Strauss c79bc31609 [mod_fastcgi] perf: reduce data copies
http_chunk_transfer_cqlen()
2018-11-12 08:25:05 -05:00
Glenn Strauss 2df8f9ebf4 [mod_fastcgi] perf: reduce data copies
reduce data copies while reading FastCGI packets from FastCGI backend
2018-11-12 08:25:05 -05:00
Glenn Strauss f934615466 [core] permit env vars to be set with blank value
(regression in lighttpd 1.4.51)
2018-11-12 08:25:05 -05:00
Glenn Strauss f410431b58 [multiple] perf: use larger initial backend buffer
use larger initial backend buffer if the client request is large
2018-11-12 08:25:01 -05:00
Glenn Strauss 7e8beee577 [multiple] perf: power-2 alloc large headers
allocate large headers by power-2 as headers to backend is generated
(mod_proxy, mod_fastcgi, mod_scgi)
2018-10-29 09:00:46 -04:00
Glenn Strauss 610d5c03ab [multiple] perf: write headers to backend write cq
write headers directly to dynamic backend write chunkqueue
(mod_proxy, mod_fastcgi, mod_scgi)
2018-10-29 09:00:46 -04:00
Glenn Strauss a9ae35128d [core] chunk.c code reuse 2018-10-28 10:00:03 -04:00
Glenn Strauss 61e507bfe5 [core] perf: better buf reuse reading from backend 2018-10-28 02:38:10 -04:00
Glenn Strauss 40d3408328 [core] perf: append response directly into write q
prepend non-dynamic response directly into write queue chunkqueue
2018-10-28 02:38:10 -04:00
Glenn Strauss 758174ecbc [core] perf: specialized func for array sorting
specialized func for array sorting for use in binary search
2018-10-28 02:38:10 -04:00
Glenn Strauss 59a71815dc [core] perf: copy small strings; extend last chunk
copy small strings; extend last chunk
(instead of creating new, tiny chunk)
2018-10-28 02:38:06 -04:00
Glenn Strauss e7c840502a [core] perf: copy small strings; better buf reuse
copy small strings to write queue for better buffer reuse
(instead of swapping with larger buffers in write chunkqueue)
2018-10-27 14:00:08 -04:00
Glenn Strauss 23c72fc606 [core] perf: prepend headers directly into write q
prepend response headers directly into write queue chunkqueue
2018-10-27 14:00:08 -04:00
Glenn Strauss 5a159e828d [core] perf: size write buffers for reuse
size write buffers for reuse in common cases
(so that write buffers are BUFFER_MAX_REUSE_SIZE)
2018-10-27 11:40:57 -04:00
Glenn Strauss 2e23b43d12 [core] perf: buffer_align_size() identity if align
use identity if requested size is already aligned to BUFFER_PIECE_SIZE
2018-10-27 11:40:54 -04:00
Glenn Strauss 929909a999 [core] perf: skip redundant prepare copy calls
skip redundant calls to buffer_string_prepare_copy() when simply
clearing buffer is sufficient, e.g. when a blanked buffer is desired
before calling buffer_append_strftime(), which internally prepares
buffer for the resultant formatted string
2018-10-25 03:19:16 -04:00