[core] don't buffer request bodies smaller than 64k on disk
From: Stefan Bühler <stbuehler@web.de> git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3046 152afb58-edef-0310-8abb-c4023f1b3aa9svn/tags/lighttpd-1.4.38
parent
d7be04beb5
commit
f19128086c
1
NEWS
1
NEWS
|
@ -9,6 +9,7 @@ NEWS
|
|||
* [core] fix search for header end if split across chunks (fixes #2670)
|
||||
* [core] check configparserAlloc() result with force_assert
|
||||
* [mod_auth] implement and use safe_memclear, using memset_s or explicit_bzero if available (thx loganaden)
|
||||
* [core] don't buffer request bodies smaller than 64k on disk
|
||||
|
||||
- 1.4.37 - 2015-08-30
|
||||
* [mod_proxy] remove debug log line from error log (fixes #2659)
|
||||
|
|
|
@ -983,7 +983,11 @@ found_header_end:
|
|||
}
|
||||
break;
|
||||
case CON_STATE_READ_POST:
|
||||
if (0 != chunkqueue_steal_with_tempfiles(srv, dst_cq, cq, con->request.content_length - dst_cq->bytes_in )) {
|
||||
if (con->request.content_length <= 64*1024) {
|
||||
/* don't buffer request bodies <= 64k on disk */
|
||||
chunkqueue_steal(dst_cq, cq, con->request.content_length - dst_cq->bytes_in);
|
||||
}
|
||||
else if (0 != chunkqueue_steal_with_tempfiles(srv, dst_cq, cq, con->request.content_length - dst_cq->bytes_in )) {
|
||||
con->http_status = 413; /* Request-Entity too large */
|
||||
con->keep_alive = 0;
|
||||
connection_set_state(srv, con, CON_STATE_HANDLE_REQUEST);
|
||||
|
|
Loading…
Reference in New Issue