Commit Graph
4924 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) 24725d33d9 Used calloc() where possible with fallback to malloc()+memset(). 2016-11-07 21:03:07 +03:00
Evgeny Grin (Karlson2k) 45dabc9d25 Removed outdated note from description comment. 2016-11-07 17:39:27 +03:00
Evgeny Grin (Karlson2k) 959d55ec5e Renamed MHD flags. Now all flags are in forms MHD_USE_* or MHD_ALLOW_*. 2016-11-07 17:08:03 +03:00
Evgeny Grin (Karlson2k) 35b58f8e09 Compare threads IDs in portable and documented way. 2016-11-07 15:24:07 +03:00
Evgeny Grin (Karlson2k) 9ea8967171 Combine upgrade tests into single source file, port to platforms without fork() 2016-11-07 14:39:09 +03:00
Evgeny Grin (Karlson2k) 8b10b7801c Stick to C99 standard 'bool' for internals, fallback to 'int' when 'bool' is not available 2016-11-06 16:52:07 +03:00
Evgeny Grin (Karlson2k) 29a91f5ddb test_quiesce_stream.c: convert C++-style comments 2016-11-05 17:31:05 +03:00
Christian Grothoff 3ccd1b4586 return skipped if wget was not found 2016-11-04 21:58:09 +01:00
Christian Grothoff 94ff070774 adding test from Markus (adapted by me to C and MHD-style) 2016-11-04 21:57:17 +01:00
Christian Grothoff d7392e0882 all flags start with MHD_USE_, rename MHD_ALLOW_UPGRADE to MHD_USE_UPGRADE for consistency 2016-11-04 17:02:56 +01:00
Christian Grothoff ca582a0633 add example for MHD upgrade use 2016-11-04 17:01:25 +01:00
Christian Grothoff f8e3016ce0 document new invariants introduced by afe4f08eda 2016-11-04 16:36:17 +01:00
Christian Grothoff 43227e1b18 update manual in line with commit cbd9376691 2016-11-04 16:26:09 +01:00
Christian Grothoff 892de41802 change order to reduce #ifdef'ing 2016-11-04 14:40:15 +01:00
Christian Grothoff a0118ad4e1 reverting dd327c1d13 as it introduces a race on 'resuming' which was previously deliberately avoided 2016-11-04 14:36:04 +01:00
Christian Grothoff 86706fd27d use MHD_YES/MHD_NO instead of 0/not-0 2016-11-04 14:30:24 +01:00
Christian Grothoff 82ce5348c5 use MHD_YES/NO instead of 0/!0 2016-11-04 11:42:22 +01:00
Christian Grothoff e5c74b3a12 style fix: this 'const' is at best confusing, as we are about to free, plus initialize 'daemon' immediately for symmetry 2016-11-04 11:30:20 +01:00
Christian Grothoff 11f00055cf style fix: this 'const' is at best confusing, as we are about to free 2016-11-04 11:28:35 +01:00
Christian Grothoff ec46999ff5 style fix: in MHD-style, we always put the const before 'struct' 2016-11-04 11:26:30 +01:00
Christian Grothoff f285812390 fix commit 334468c467 which introduced wrong branch for openssl command-line tool in test 2016-11-04 11:21:25 +01:00
Evgeny Grin (Karlson2k) 90086f0531 Added MHD_FEATURE_TLS with as synonym for MHD_FEATURE_SSL. 2016-11-03 16:51:52 +03:00
Evgeny Grin (Karlson2k) 7055ebd931 Added MHD_FEATURE_UPGRADE for MHD_is_feature_supported() 2016-11-03 16:49:24 +03:00
Evgeny Grin (Karlson2k) 101fa6ceed Added 'configure' parameter '--disable-httpupgrade'.
Could be used to reduce complied binary size if HTTP "Upgrade" is not required.
2016-11-02 22:48:04 +03:00
Evgeny Grin (Karlson2k) 20bb6c5dc0 Fixed again build without HTTPS 2016-11-02 20:36:42 +03:00
Evgeny Grin (Karlson2k) 7de916c94b Improved shutdown daemon with any "upgraded" not closed non-TLS connection 2016-11-02 19:02:16 +03:00
Evgeny Grin (Karlson2k) 0f46a6b98b Fixed build without HTTPS support 2016-11-02 15:53:51 +03:00
Evgeny Grin (Karlson2k) 82ebcd2dbf MHD_start_daemon_va(): fixed 'ifdef' ordering 2016-11-02 15:53:51 +03:00
Evgeny Grin (Karlson2k) 7cad8fc50e Build-time configuration: undef HTTPS_SUPPORT if TLS is disabled. Improved code
readability, fixed build without HTTPS.
2016-11-02 15:49:24 +03:00
Evgeny Grin (Karlson2k) cbd9376691 'Upgrade' connections: simplify daemon options 2016-11-02 12:21:06 +03:00
Evgeny Grin (Karlson2k) 384cb2ab65 Deduplicated connection's closure code, improved TLS closure. 2016-11-01 20:51:01 +03:00
Evgeny Grin (Karlson2k) 47f1d52e79 Fixed processing "upgraded" TLS with epoll(). 2016-11-01 19:58:59 +03:00
Evgeny Grin (Karlson2k) 7a0929e352 test_upgrade: fixed report descriptions 2016-11-01 12:04:34 +03:00
Evgeny Grin (Karlson2k) 70f3f88b24 Print error if upgraded connection was not closed before daemon shutdown. 2016-10-30 19:05:17 +03:00
Evgeny Grin (Karlson2k) 63abb11b52 Reworked "upgraded" closure logic: resources deallocated and sockets are closed
asynchronously only in daemon's thread and only when all data was forwarded and
application signaled about upgraded closure.
2016-10-30 18:49:45 +03:00
Evgeny Grin (Karlson2k) f8cfc4f89f Removed unused variables 2016-10-30 18:49:39 +03:00
Evgeny Grin (Karlson2k) 5cc484923a MHD_stop_daemon(): fixed: close all upgraded connections from daemon's
thread, not from the caller thread.
Close all upgraded connections in worker threads (for thread pool).
2016-10-28 22:29:26 +03:00
Evgeny Grin (Karlson2k) cfd8cfeefa Fixed regression introduced by dd327c1d13 2016-10-28 22:22:46 +03:00
Evgeny Grin (Karlson2k) 7d02211899 Fixed data races in thread-per-connection mode. 2016-10-28 19:49:57 +03:00
Evgeny Grin (Karlson2k) dd327c1d13 Skip locking when not required 2016-10-27 22:45:08 +03:00
Evgeny Grin (Karlson2k) fd0ceb7058 MHD_stop_daemon(): structurize closing logic 2016-10-27 22:45:07 +03:00
Evgeny Grin (Karlson2k) 92c4de4146 MHD_epoll(): do not clear ITC before processing upgraded connections 2016-10-27 22:45:02 +03:00
Evgeny Grin (Karlson2k) c38412e3fd epoll mode: always watch to ITC level if ITC was requested. 2016-10-27 22:45:02 +03:00
Evgeny Grin (Karlson2k) f2cb0ef073 epoll mode: use level trigger for ITC.
Level trigger is better: MHD need to always react to high ITC level.
2016-10-27 22:45:01 +03:00
Evgeny Grin (Karlson2k) 9224b3e326 MHD_stop_daemon(): close all connections from daemon's thread, not from the caller thread. 2016-10-27 22:45:01 +03:00
Evgeny Grin (Karlson2k) 01e28f110a Added thread-safety functions marks 2016-10-27 22:45:01 +03:00
Evgeny Grin (Karlson2k) 80d4152e1f Used smaller locked mutex scope. 2016-10-27 22:45:01 +03:00
Evgeny Grin (Karlson2k) 5b01262799 Notify application about finished HTTP connection before starting upgrade.
Unified HTTPS and HTTP modes.
2016-10-27 22:45:00 +03:00
Evgeny Grin (Karlson2k) 55bc012c93 MHD_response_execute_upgrade_(): deduplicate code. 2016-10-27 22:45:00 +03:00
Evgeny Grin (Karlson2k) d528519166 Added support for suspending connection in thread-per-connection mode 2016-10-27 22:45:00 +03:00