aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/mhd_limits.h8
-rw-r--r--src/lib/response_from_fd.c2
-rw-r--r--src/microhttpd/mhd_limits.h8
-rw-r--r--src/microhttpd/response.c2
4 files changed, 18 insertions, 2 deletions
diff --git a/src/lib/mhd_limits.h b/src/lib/mhd_limits.h
index 1b0f5d7d..41d33a8f 100644
--- a/src/lib/mhd_limits.h
+++ b/src/lib/mhd_limits.h
@@ -143,4 +143,12 @@
143#endif /* _WIN32 */ 143#endif /* _WIN32 */
144#endif /* !TIMEVAL_TV_SEC_MAX */ 144#endif /* !TIMEVAL_TV_SEC_MAX */
145 145
146#ifndef MHD_FD_BLOCK_SIZE
147#ifdef _WIN32
148#define MHD_FD_BLOCK_SIZE 16384 /* 16k */
149#else /* _WIN32 */
150#define MHD_FD_BLOCK_SIZE 4096 /* 4k */
151#endif /* _WIN32 */
152#endif /* !MHD_FD_BLOCK_SIZE */
153
146#endif /* MHD_LIMITS_H */ 154#endif /* MHD_LIMITS_H */
diff --git a/src/lib/response_from_fd.c b/src/lib/response_from_fd.c
index cdeb7aa5..6eac3f7f 100644
--- a/src/lib/response_from_fd.c
+++ b/src/lib/response_from_fd.c
@@ -182,7 +182,7 @@ MHD_response_from_fd (enum MHD_HTTP_StatusCode sc,
182 182
183 response = MHD_response_from_callback (sc, 183 response = MHD_response_from_callback (sc,
184 size, 184 size,
185 4 * 1024, 185 MHD_FD_BLOCK_SIZE,
186 &file_reader, 186 &file_reader,
187 NULL, 187 NULL,
188 &free_callback); 188 &free_callback);
diff --git a/src/microhttpd/mhd_limits.h b/src/microhttpd/mhd_limits.h
index 1b0f5d7d..41d33a8f 100644
--- a/src/microhttpd/mhd_limits.h
+++ b/src/microhttpd/mhd_limits.h
@@ -143,4 +143,12 @@
143#endif /* _WIN32 */ 143#endif /* _WIN32 */
144#endif /* !TIMEVAL_TV_SEC_MAX */ 144#endif /* !TIMEVAL_TV_SEC_MAX */
145 145
146#ifndef MHD_FD_BLOCK_SIZE
147#ifdef _WIN32
148#define MHD_FD_BLOCK_SIZE 16384 /* 16k */
149#else /* _WIN32 */
150#define MHD_FD_BLOCK_SIZE 4096 /* 4k */
151#endif /* _WIN32 */
152#endif /* !MHD_FD_BLOCK_SIZE */
153
146#endif /* MHD_LIMITS_H */ 154#endif /* MHD_LIMITS_H */
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 21e23a8a..29edef4f 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -566,7 +566,7 @@ MHD_create_response_from_fd_at_offset64 (uint64_t size,
566 return NULL; 566 return NULL;
567 567
568 response = MHD_create_response_from_callback (size, 568 response = MHD_create_response_from_callback (size,
569 4 * 1024, 569 MHD_FD_BLOCK_SIZE,
570 &file_reader, 570 &file_reader,
571 NULL, 571 NULL,
572 &free_callback); 572 &free_callback);