Commit Graph
4924 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) 331bc62916 mhd_send: renamed functions and parameters to reflect the key purpose.
The most important is to push the last piece of data.
The buffering is mostly a bonus.
2020-12-01 19:11:53 +03:00
Evgeny Grin (Karlson2k) 34593987ca mhd_send: fixed for C90 compilers 2020-11-30 00:52:04 +03:00
Evgeny Grin (Karlson2k) 958d8704e8 Removed gnutls_record_(un)cork() usage.
gnutls_record_cork()/gnutls_record_uncork() needs
special handling to periodically push part of the buffer.
2020-11-30 00:35:18 +03:00
Evgeny Grin (Karlson2k) 8435c616da mhd_send: fixed compatibility with platforms without TCP_CORK and TCP_NOPUSH
TCP_NODELAY must be turned of *before* send()
otherwise it doesn't push buffered data.
2020-11-29 23:04:24 +03:00
Evgeny Grin (Karlson2k) 578f5e425d mhd_send: prepare for removal of gnutls_record_cork() call 2020-11-29 22:54:25 +03:00
Evgeny Grin (Karlson2k) 727be7d294 mhd_send: use MSG_MORE only if it functions 2020-11-29 22:06:59 +03:00
Evgeny Grin (Karlson2k) 7ef7bab33d mhd_send: improved setting of sk_cork_on
sk_cork_on is still incorrect as MSG_MORE do not
manipulate CORK value.
2020-11-29 21:44:22 +03:00
Evgeny Grin (Karlson2k) cf964cbd0f new_connection_prepare_(): fixed: CORK is never on by default 2020-11-29 21:35:42 +03:00
Evgeny Grin (Karlson2k) c900f818ca mhd_sockets: renamed macros for clarity 2020-11-29 21:01:38 +03:00
Evgeny Grin (Karlson2k) f06d01317d mhd_send: always call post_cork_setsockopt() after send() 2020-11-29 19:41:22 +03:00
Evgeny Grin (Karlson2k) 7f6084e630 enum MHD_SendSocketOptions: renamed values for clarity.
The most important is to push the last peace of response data.
Without pushing data, MHD is limited to 5 requests/second
(on typical OS) with stay-alive clients.
2020-11-29 18:18:10 +03:00
Christian Grothoff ad8a3e3fde cosmetics 2020-11-08 18:21:20 +01:00
Evgeny Grin (Karlson2k) 2dc75b83bd ChangeLog updated. 2020-11-01 20:12:03 +03:00
Evgeny Grin (Karlson2k) 9a224cc6ed Speed-up closure of upgraded connection with daemon shutdown 2020-10-31 20:50:37 +03:00
Evgeny Grin (Karlson2k) cec7ee05dc Fixed deadlock introduced by c5b4a9deb5 2020-10-31 20:50:02 +03:00
Evgeny Grin (Karlson2k) c5b4a9deb5 Upgraded connection: fixed use-after-free for thread-per-connection 2020-10-30 19:09:59 +03:00
Evgeny Grin (Karlson2k) 0777af766c test_add_conn: Muted analyzer warning 2020-10-29 20:16:41 +03:00
Evgeny Grin (Karlson2k) 7c0a88870b postprocessor.c: added assert, muted analyzer warning 2020-10-29 19:54:44 +03:00
Evgeny Grin (Karlson2k) a3b6d06f32 Fix for ee18f2421a 2020-10-29 19:26:23 +03:00
Evgeny Grin (Karlson2k) ee18f2421a Fixed 2f4438ab7a 2020-10-29 18:59:25 +03:00
Evgeny Grin (Karlson2k) 2f4438ab7a websocket_threaded_example.c: minor improvement and warning fixes 2020-10-29 18:41:12 +03:00
Evgeny Grin (Karlson2k) 5876da15e6 internal.h: hack member placement in struct MHD_Daemon to
avoid Address Sanitizer warnings and avoid potential
problems on architectures that do not support unaligned
access.
Proper fix should include introduction of
__attribute__ ((alligned(x)))
2020-10-29 16:50:59 +03:00
Evgeny Grin (Karlson2k) f072ba2229 new_connection_prepare_(): fixed use-after-free in error handler 2020-10-29 15:53:27 +03:00
Evgeny Grin (Karlson2k) 4e416de4c5 daemon.c: added cleanup asserts 2020-10-29 15:37:19 +03:00
Evgeny Grin (Karlson2k) eb1a0307e5 test_add_conn: added check for amount of available resources,
fixed leaks, added more error checks and reporting
2020-10-27 21:22:33 +03:00
Evgeny Grin (Karlson2k) 155ac53ed4 mhd_send.c: do not use gnutls_record_cork() and
gnutls_record_uncork() if GnuTLS library doesn't have it
2020-10-27 21:05:48 +03:00
Evgeny Grin (Karlson2k) 9d9a9e4bce test_add_conn: minor fixes and improvements 2020-10-26 22:13:45 +03:00
Evgeny Grin (Karlson2k) d46bdbc34e daemon.c: clearer error report for sockets not fit FD_SETSIZE 2020-10-26 22:06:49 +03:00
Evgeny Grin (Karlson2k) 04bb482134 new_connection_process_(): additional assert 2020-10-26 21:56:24 +03:00
Christian Grothoff b39aacb24a typo 2020-10-26 11:04:29 +01:00
Evgeny Grin (Karlson2k) 8cb26daea6 Fixed conflict with system CPU_COUNT macro 2020-10-25 22:52:53 +03:00
Evgeny Grin (Karlson2k) 01fec59041 daemon.c: process new connections in more efficient way 2020-10-25 22:33:41 +03:00
Evgeny Grin (Karlson2k) 9d7b74e325 ChangeLog update 2020-10-25 19:48:20 +03:00
Evgeny Grin (Karlson2k) c36ac56f38 test_add_conn_cleanup: check whether client connection
sockets were closed by MHD as part of cleanup process
2020-10-25 19:10:38 +03:00
Evgeny Grin (Karlson2k) fa330be735 Added tests for cleanup of unprocessed externally added connections 2020-10-25 17:19:01 +03:00
Evgeny Grin (Karlson2k) 19b038f682 Fixed thread-safety for externally added connections
Fully re-implemented scheme of adding connections
from external thread (application)
2020-10-25 17:15:14 +03:00
Evgeny Grin (Karlson2k) 3460db01ec daemon.c: fixed leak of resources if daemon is failed to start 2020-10-23 14:34:54 +03:00
Evgeny Grin (Karlson2k) 5a3340810f daemon: fixed pool leak if connection isn't added because of error 2020-10-22 21:02:07 +03:00
Evgeny Grin (Karlson2k) a9be622007 Do not deinit GnuTLS if it wasn't inited.
Fix for 13fe456581
2020-10-22 17:26:21 +03:00
Evgeny Grin (Karlson2k) 13fe456581 new_connection_prepare_(): added check for valid TLS initialisation 2020-10-22 17:02:27 +03:00
Evgeny Grin (Karlson2k) 53fec1c213 daemon.c: fixed leaked on error GnuTLS resource 2020-10-22 17:02:26 +03:00
Christian Grothoff dd9aadce4c Merge branch 'master' of git+ssh://gnunet.org/libmicrohttpd 2020-10-22 11:48:57 +02:00
Christian Grothoff c43779a4be fix typos 2020-10-22 11:48:54 +02:00
Evgeny Grin (Karlson2k) 276535e5ec mhd_send: fixed order of includes 2020-10-21 19:31:01 +03:00
Evgeny Grin (Karlson2k) 4ebcd58de5 Makefile.am: reference dependencies in a better way 2020-10-21 14:52:25 +03:00
Evgeny Grin (Karlson2k) 890434efce testcurl: added two tests for for MHD_add_connection() 2020-10-21 11:50:03 +03:00
Evgeny Grin (Karlson2k) 365597ea10 configure: check for support of __func__ magic-macro 2020-10-21 11:49:24 +03:00
Evgeny Grin (Karlson2k) adcdafc558 Fixed non-functional daemon with NO_LISTEN and thread pool.
MHD failed to start any threads is used with MHD_USE_NO_LISTEN_SOCKET and
with thread pool.
2020-10-21 11:37:56 +03:00
Christian Grothoff 4b18c05142 bump version 2020-10-21 10:05:41 +02:00
Christian Grothoff eb82d9a7c3 -undo bad indentation patch, updated uncrustify now 2020-10-21 10:04:35 +02:00