You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2024/05/08 12:44:52 UTC
svn commit: r1917576 - /httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
Author: jorton
Date: Wed May 8 12:44:52 2024
New Revision: 1917576
URL: http://svn.apache.org/viewvc?rev=1917576&view=rev
Log:
* modules/proxy/mod_proxy_fcgi.c (dispatch): Only allocate a heap
buffer if the configured size is greater than the stack-allocated
buffer.
Modified:
httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c?rev=1917576&r1=1917575&r2=1917576&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c Wed May 8 12:44:52 2024
@@ -569,7 +569,11 @@ static apr_status_t dispatch(proxy_conn_
*err = NULL;
if (conn->worker->s->io_buffer_size_set) {
iobuf_size = conn->worker->s->io_buffer_size;
- iobuf = apr_palloc(r->pool, iobuf_size);
+ /* Allocate a buffer if the configured size is larger than the
+ * stack buffer, otherwise use the stack buffer. */
+ if (iobuf_size > AP_IOBUFSIZE) {
+ iobuf = apr_palloc(r->pool, iobuf_size);
+ }
}
pfd.desc_type = APR_POLL_SOCKET;