buffer if the configured size is greater than the stack-allocated
buffer.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1917576 13f79535-47bb-0310-9956-
ffa450edef68
*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;