aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-07-05 10:12:10 +0000
committerChristian Grothoff <christian@grothoff.org>2013-07-05 10:12:10 +0000
commit6e07994a8bfa4227444ad5b178b4a54cb4ec69da (patch)
treef315a042e794ff227b4d7e1fa3d4d9074c3932cd /src/microhttpd/connection.c
parent9fe0e9d41112f2a75ee4d9461f1b93b59131029d (diff)
downloadlibmicrohttpd-6e07994a8bfa4227444ad5b178b4a54cb4ec69da.tar.gz
libmicrohttpd-6e07994a8bfa4227444ad5b178b4a54cb4ec69da.zip
-fixing #2899: allow clients to customize MHD_BUF_INC_SIZE via option
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index e54ae1b6..70661f9c 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -37,14 +37,6 @@
37#include <netinet/tcp.h> 37#include <netinet/tcp.h>
38#endif 38#endif
39 39
40/**
41 * Minimum size by which MHD tries to increment read/write buffers.
42 * We usually begin with half the available pool space for the
43 * IO-buffer, but if absolutely needed we additively grow by the
44 * number of bytes given here (up to -- theoretically -- the full pool
45 * space).
46 */
47#define MHD_BUF_INC_SIZE 1024
48 40
49/** 41/**
50 * Message to transmit when http 1.1 request is received 42 * Message to transmit when http 1.1 request is received
@@ -1861,7 +1853,7 @@ MHD_connection_handle_read (struct MHD_Connection *connection)
1861 return MHD_YES; 1853 return MHD_YES;
1862 /* make sure "read" has a reasonable number of bytes 1854 /* make sure "read" has a reasonable number of bytes
1863 in buffer to use per system call (if possible) */ 1855 in buffer to use per system call (if possible) */
1864 if (connection->read_buffer_offset + MHD_BUF_INC_SIZE > 1856 if (connection->read_buffer_offset + connection->daemon->pool_increment >
1865 connection->read_buffer_size) 1857 connection->read_buffer_size)
1866 try_grow_read_buffer (connection); 1858 try_grow_read_buffer (connection);
1867 if (MHD_NO == do_read (connection)) 1859 if (MHD_NO == do_read (connection))