aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r--src/microhttpd/connection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 7a17c628..ceae1cf8 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -3957,11 +3957,14 @@ MHD_queue_response (struct MHD_Connection *connection,
3957 connection->responseCode = status_code; 3957 connection->responseCode = status_code;
3958#if defined(_MHD_HAVE_SENDFILE) 3958#if defined(_MHD_HAVE_SENDFILE)
3959 if ( (response->fd == -1) || 3959 if ( (response->fd == -1) ||
3960 (response->is_pipe) ||
3960 (0 != (connection->daemon->options & MHD_USE_TLS)) ) 3961 (0 != (connection->daemon->options & MHD_USE_TLS)) )
3961 connection->resp_sender = MHD_resp_sender_std; 3962 connection->resp_sender = MHD_resp_sender_std;
3962 else 3963 else
3963 connection->resp_sender = MHD_resp_sender_sendfile; 3964 connection->resp_sender = MHD_resp_sender_sendfile;
3964#endif /* _MHD_HAVE_SENDFILE */ 3965#endif /* _MHD_HAVE_SENDFILE */
3966 /* FIXME: if 'is_pipe' is set, TLS is off, and we have *splice*, we could use splice()
3967 to avoid two user-space copies... */
3965 3968
3966 if ( ( (NULL != connection->method) && 3969 if ( ( (NULL != connection->method) &&
3967 (MHD_str_equal_caseless_ (connection->method, 3970 (MHD_str_equal_caseless_ (connection->method,