diff options
Diffstat (limited to 'src/microhttpd/mhd_send.c')
-rw-r--r-- | src/microhttpd/mhd_send.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c index e50be96e..db621cb2 100644 --- a/src/microhttpd/mhd_send.c +++ b/src/microhttpd/mhd_send.c | |||
@@ -240,7 +240,8 @@ MHD_send_on_connection_ (struct MHD_Connection *connection, | |||
240 | ssize_t ret; | 240 | ssize_t ret; |
241 | 241 | ||
242 | /* error handling from send_param_adapter() */ | 242 | /* error handling from send_param_adapter() */ |
243 | if ((MHD_INVALID_SOCKET == s) || (MHD_CONNECTION_CLOSED == connection->state)) | 243 | if ( (MHD_INVALID_SOCKET == s) || |
244 | (MHD_CONNECTION_CLOSED == connection->state) ) | ||
244 | { | 245 | { |
245 | return MHD_ERR_NOTCONN_; | 246 | return MHD_ERR_NOTCONN_; |
246 | } | 247 | } |
@@ -382,10 +383,22 @@ MHD_send_on_connection2_ (struct MHD_Connection *connection, | |||
382 | { | 383 | { |
383 | #ifdef HTTPS_SUPPORT | 384 | #ifdef HTTPS_SUPPORT |
384 | if (0 != (connection->daemon->options & MHD_USE_TLS)) | 385 | if (0 != (connection->daemon->options & MHD_USE_TLS)) |
385 | return MHD_send_on_connection_ (connection, | 386 | { |
386 | header, | 387 | ssize_t ret; |
387 | header_size, | 388 | |
388 | MHD_SSO_HDR_CORK); | 389 | ret = MHD_send_on_connection_ (connection, |
390 | header, | ||
391 | header_size, | ||
392 | MHD_SSO_HDR_CORK); | ||
393 | if ( (ret == header_size) && | ||
394 | (0 == buffer_size) && | ||
395 | connection->sk_cork_on) | ||
396 | { | ||
397 | (void) gnutls_record_uncork (connection->tls_session, 0); | ||
398 | connection->sk_cork_on = false; | ||
399 | } | ||
400 | return ret; | ||
401 | } | ||
389 | #endif | 402 | #endif |
390 | #if defined(HAVE_SENDMSG) || defined(HAVE_WRITEV) | 403 | #if defined(HAVE_SENDMSG) || defined(HAVE_WRITEV) |
391 | MHD_socket s = connection->socket_fd; | 404 | MHD_socket s = connection->socket_fd; |