Kaynağa Gözat

Fixed sending responses >16KiB in HTTPS mode with epoll

Evgeny Grin (Karlson2k) 8 yıl önce
ebeveyn
işleme
3474e1b7f9
2 değiştirilmiş dosya ile 10 ekleme ve 3 silme
  1. 7 0
      ChangeLog
  2. 3 3
      src/microhttpd/connection_https.c

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+Tue Sep 08 21:39:00 MSK 2017
+	Fixed build of examples when MHD build with non-pthread lib.
+	MHD_queue_response(): added check for using in correct thread.
+	Fixed sending responses larger 16 KiB in TLS mode with epoll.
+	Improved doxy for MHD_get_timeout() and related functions.
+	Minor internal refactoring. -EG
+
 Tue Jul 23 11:32:00 MSK 2017
 	Updated chunked_example.c to provide real illustration of usage of
 	chunked encoding. -EG

+ 3 - 3
src/microhttpd/connection_https.c

@@ -128,9 +128,9 @@ send_tls_adapter (struct MHD_Connection *connection,
       return MHD_ERR_NOTCONN_;
     }
 #ifdef EPOLL_SUPPORT
-  /* If NOT all available data was sent - socket is not write ready anymore. */
-  if (i > (size_t)res)
-    connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY;
+  /* Unlike non-TLS connections, do not reset "write-ready" if
+   * sent smaller amount than provided, as TLS connections may
+   * break data into smaller parts for sending. */
 #endif /* EPOLL_SUPPORT */
   return res;
 }