summaryrefslogtreecommitdiff
path: root/src/mod_scgi.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2018-11-12 00:33:06 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2018-11-12 21:56:05 -0500
commit9f6a46738d013b8074c432b01d2bff5b150a87c3 (patch)
tree4dec8f2a6a2d0dcb6ebb8505bed0c1c3080ee3f1 /src/mod_scgi.c
parent31d16af78b017c81702d23fb71ecd74ef73484ab (diff)
downloadlighttpd-git-9f6a46738d013b8074c432b01d2bff5b150a87c3.tar.gz
[multiple] dynamic handlers hint backend header sz
Diffstat (limited to 'src/mod_scgi.c')
-rw-r--r--src/mod_scgi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mod_scgi.c b/src/mod_scgi.c
index abd19626..bc40ee7b 100644
--- a/src/mod_scgi.c
+++ b/src/mod_scgi.c
@@ -156,7 +156,6 @@ static int scgi_env_add_uwsgi(void *venv, const char *key, size_t key_len, const
static handler_t scgi_create_env(server *srv, handler_ctx *hctx) {
- buffer *b = chunkqueue_prepend_buffer_open(hctx->wb);
gw_host *host = hctx->host;
connection *con = hctx->remote_conn;
http_cgi_opts opts = { 0, 0, host->docroot, NULL };
@@ -164,10 +163,7 @@ static handler_t scgi_create_env(server *srv, handler_ctx *hctx) {
? scgi_env_add_scgi
: scgi_env_add_uwsgi;
size_t offset;
-
- if ((off_t)buffer_string_space(b) < con->read_queue->bytes_out - hctx->wb->bytes_in) {
- buffer_string_prepare_copy(b, ((size_t)(con->read_queue->bytes_out - hctx->wb->bytes_in + 4095) & ~4095uL)-1);
- }
+ buffer * const b = chunkqueue_prepend_buffer_open_sz(hctx->wb, (size_t)(con->read_queue->bytes_out - hctx->wb->bytes_in));
/* save space for 9 digits (plus ':'), though incoming HTTP request
* currently limited to 64k (65535, so 5 chars) */