aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/response.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/response.c')
-rw-r--r--src/microhttpd/response.c44
1 files changed, 41 insertions, 3 deletions
diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c
index 3e9fb053..65ea7b09 100644
--- a/src/microhttpd/response.c
+++ b/src/microhttpd/response.c
@@ -604,9 +604,9 @@ MHD_create_response_from_fd_at_offset64 (uint64_t size,
604 604
605 response = MHD_create_response_from_callback (size, 605 response = MHD_create_response_from_callback (size,
606 MHD_FILE_READ_BLOCK_SIZE, 606 MHD_FILE_READ_BLOCK_SIZE,
607 &file_reader, 607 &file_reader,
608 NULL, 608 NULL,
609 &free_callback); 609 &free_callback);
610 if (NULL == response) 610 if (NULL == response)
611 return NULL; 611 return NULL;
612 response->fd = fd; 612 response->fd = fd;
@@ -825,6 +825,44 @@ MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh,
825 * be moved to cleanup list by MHD_resume_connection(). */ 825 * be moved to cleanup list by MHD_resume_connection(). */
826 MHD_resume_connection (connection); 826 MHD_resume_connection (connection);
827 return MHD_YES; 827 return MHD_YES;
828 case MHD_UPGRADE_ACTION_CORK_ON:
829 if (connection->sk_cork_on)
830 return MHD_YES;
831#ifdef HTTPS_SUPPORT
832 if (0 != (daemon->options & MHD_USE_TLS) )
833 {
834 gnutls_record_cork (connection->tls_session);
835 connection->sk_cork_on = true;
836 return MHD_YES;
837 }
838 else
839#else
840 {
841 if (0 ==
842 MHD_socket_cork_ (connection->socket_fd,
843 true))
844 connection->sk_cork_on = true;
845 }
846#endif
847 case MHD_UPGRADE_ACTION_CORK_OFF:
848 if (! connection->sk_cork_on)
849 return MHD_YES;
850#ifdef HTTPS_SUPPORT
851 if (0 != (daemon->options & MHD_USE_TLS) )
852 {
853 gnutls_record_uncork (connection->tls_session, 0);
854 connection->sk_cork_on = false;
855 return MHD_YES;
856 }
857 else
858#else
859 {
860 if (0 ==
861 MHD_socket_cork_ (connection->socket_fd,
862 false))
863 connection->sk_cork_on = false;
864 }
865#endif
828 default: 866 default:
829 /* we don't understand this one */ 867 /* we don't understand this one */
830 return MHD_NO; 868 return MHD_NO;