summaryrefslogtreecommitdiff
path: root/src/mod_ajp13.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2021-10-21 09:45:06 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2021-10-27 04:16:38 -0400
commit1acf9db7d3c90c23917ea885dfcf668ffe264c1b (patch)
tree7ae2e75e71acef55a21db472940387004712b780 /src/mod_ajp13.c
parente78cd76511c08b30f808999126dc3abe9bf32ead (diff)
downloadlighttpd-git-1acf9db7d3c90c23917ea885dfcf668ffe264c1b.tar.gz
[mod_ajp13,mod_fastcgi] check resp w/ content len
limit response body from mod_ajp13 and mod_fastcgi to Content-Length, if Content-Length is provided in response headers; discard excess
Diffstat (limited to 'src/mod_ajp13.c')
-rw-r--r--src/mod_ajp13.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_ajp13.c b/src/mod_ajp13.c
index 97ca53ce..cb63cb85 100644
--- a/src/mod_ajp13.c
+++ b/src/mod_ajp13.c
@@ -888,7 +888,7 @@ ajp13_recv_parse (request_st * const r, struct http_response_opts_t * const opts
return HANDLER_FINISHED;
}
chunkqueue_mark_written(hctx->rb, 7);
- if (0 == http_chunk_transfer_cqlen(r, hctx->rb, len)) {
+ if (0 == http_response_transfer_cqlen(r, hctx->rb, len)) {
if (len != plen - 3)
chunkqueue_mark_written(hctx->rb, plen - 3 - len);
continue;
@@ -896,6 +896,7 @@ ajp13_recv_parse (request_st * const r, struct http_response_opts_t * const opts
else {
/* error writing to tempfile;
* truncate response or send 500 if nothing sent yet */
+ hctx->send_content_body = 0;
return HANDLER_FINISHED;
}
}