Commit Graph
3603 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) 4ebe2aa5f9 thread-per-connection: improved timeout handling for 'poll()' mode, fixed short busy-waiting
* Avoid unneeded wake-ups
* More precise timeout with milliseconds accuracy
* Fixed potential short (less than one second) busy waiting when
  connection is about to expire.
2022-04-27 22:11:54 +03:00
Evgeny Grin (Karlson2k) f3d7ef1f5f thread-per-connection: do not cache connection timeout
The timeout value could be updated by application
2022-04-27 22:11:54 +03:00
Evgeny Grin (Karlson2k) 0424af2a04 Response from callback: do allow negative return amounts, except predefined values 2022-04-27 22:11:54 +03:00
Evgeny Grin (Karlson2k) b8e13a57a0 Fixed compiler warnings of implicit casting, which could change the value 2022-04-27 22:11:53 +03:00
Evgeny Grin (Karlson2k) 8f444c321f MHD_itc_clear_(): simplified eventfd version 2022-04-27 13:51:33 +03:00
Evgeny Grin (Karlson2k) 54e123587e set_test_panic: added new test 2022-04-25 22:52:27 +03:00
Evgeny Grin (Karlson2k) efdd6e0ffb MHD_set_panic_func: clarified doxy 2022-04-25 22:50:47 +03:00
Evgeny Grin (Karlson2k) 0179be6cdc test_postprocessor: fixed typo 2022-04-25 16:05:15 +03:00
Evgeny Grin (Karlson2k) 3318729c16 Removed unneeded anymore alignment workarounds. 2022-04-25 16:05:15 +03:00
Evgeny Grin (Karlson2k) 2d36741148 MHD_get_daemon_info(): fixed unaligned memory access 2022-04-25 16:05:15 +03:00
Evgeny Grin (Karlson2k) 9c7c06d8b8 sha1.c: muted alignment warnings 2022-04-25 16:05:14 +03:00
Evgeny Grin (Karlson2k) 851b406174 sha1.c: fixed coding style 2022-04-25 16:05:14 +03:00
Evgeny Grin (Karlson2k) 5da78f9d8d sha256.c: muted alignment warnings 2022-04-25 16:05:13 +03:00
Evgeny Grin (Karlson2k) 2a01697de4 sha256.c: fixed coding style 2022-04-25 16:05:13 +03:00
Evgeny Grin (Karlson2k) c4c111d4d4 md5.c: muted compiler alignment warnings 2022-04-25 16:05:13 +03:00
Evgeny Grin (Karlson2k) a08e765fc4 mhd_bithelpers: minor improvement of internal macros 2022-04-25 16:05:13 +03:00
Evgeny Grin (Karlson2k) 314917828a MHD_get_connection_info(): Fixed possible unaligned access
Also:
* Reduced number of 'MHD_Connection' members.
* Fixed wrong value of returned timeout on some platforms, if timeout
is too large.
2022-04-25 16:05:12 +03:00
Evgeny Grin (Karlson2k) a4036e6681 daemon.c: fixed possible unaligned access to 'struct sockaddr_in'
On some platforms 'struct sockaddr_in' requires increased alignment
compared to ''struct sockaddr'.
2022-04-23 19:10:50 +03:00
Evgeny Grin (Karlson2k) d1c74589fb src/examples: fixed printf format specifiers 2022-04-23 15:25:50 +03:00
Evgeny Grin (Karlson2k) e152c9c49b test_shutdown_select: fixed code style 2022-04-23 15:21:20 +03:00
Evgeny Grin (Karlson2k) 763db7922a microhttpd2.h: fixed code style 2022-04-23 15:21:20 +03:00
Evgeny Grin (Karlson2k) 8c87442ffc Fixed many macros
'defined()' should be used without space before bracket
2022-04-23 15:21:20 +03:00
Evgeny Grin (Karlson2k) ca23632064 basicauth: very minor optimisaion 2022-04-23 15:21:19 +03:00
Evgeny Grin (Karlson2k) 0fa1c67543 websocket_threaded_example: mark function as static 2022-04-23 15:21:19 +03:00
Evgeny Grin (Karlson2k) 351d8a65d6 Fixed old-style functions definitions 2022-04-23 15:21:19 +03:00
Evgeny Grin (Karlson2k) 33b4a2d997 autoinit_funcs.h: improved formatting 2022-04-23 15:21:19 +03:00
Evgeny Grin (Karlson2k) f80da0ba6f autoinit_funcs.h: added functions prototypes 2022-04-23 15:21:18 +03:00
Evgeny Grin (Karlson2k) a263d605ff daemon.c: added prototypes for non-static functions 2022-04-23 15:21:18 +03:00
Evgeny Grin (Karlson2k) 48d7bc547d MHD_start_daemon: simplified logic for AUTO flags
Avoid "duplicated branches" on some platforms
2022-04-23 15:21:18 +03:00
Evgeny Grin (Karlson2k) a3ce7049bd test_https_sni: limit to libcrul with certain TLS backends.
NSS can't be used with SSL_VERIFYPEER disabled, while SSL_VERIFYHOST is
enabled, other backends may have some problems as well.
2022-04-21 13:40:10 +03:00
Evgeny Grin (Karlson2k) fc649c7bf3 test_https_sni: use CA certificate
Still disabled in the test itself, but it should not hurt to give
the proper CA if it is available.
2022-04-21 13:40:09 +03:00
Evgeny Grin (Karlson2k) dde8624f97 Updated test TLS certificate in test and examples
The new certificate should be a bit more similar to production certs.
2022-04-21 13:40:09 +03:00
Evgeny Grin (Karlson2k) 38f60de83d test_https_sni: use certificates with SAN fields
While host in CommonName (CN) is still should be supported, it is
recommended to use SubjectAltName to identify the host.
This also workarounds the bug in libcurl 7.82.0 with certificates
processing.
2022-04-21 13:40:09 +03:00
Evgeny Grin (Karlson2k) 166b572354 Use HTTP/1.1 for all TLS tests
Nobody is using HTTP/1.0 with TLS
2022-04-21 13:40:09 +03:00
Evgeny Grin (Karlson2k) 85775e29a9 src/examples: Fixed drop of 'const' qualifiers and minor fixes.
* some minor fixes and improvements.
2022-04-19 20:27:37 +03:00
Evgeny Grin (Karlson2k) 81daa705ca microhttpd.h: minor doxy improvement 2022-04-19 20:27:36 +03:00
Evgeny Grin (Karlson2k) 43cca25d44 Added new API function MHD_create_response_from_buffer_copy() 2022-04-19 20:27:36 +03:00
Evgeny Grin (Karlson2k) ae4fcbad73 Minor simplification for ALPN protocols code 2022-04-19 18:55:27 +03:00
Evgeny Grin (Karlson2k) b6eb14d646 Added workaround for external APIs
Some APIs require non-const pointer even when data is supposed to be
unmodifiable. Added workaround to deal with such APIs without compiler
warnings.
2022-04-19 18:55:27 +03:00
Evgeny Grin (Karlson2k) 57cc8b7113 Fixed missing 'const' qualifiers 2022-04-19 18:55:27 +03:00
Evgeny Grin (Karlson2k) df5b770e21 Fixed drop of 'const' when building internal error response 2022-04-19 18:55:27 +03:00
Evgeny Grin (Karlson2k) d3ae3c432d Added new API function MHD_create_response_from_buffer_static() 2022-04-19 18:55:26 +03:00
Evgeny Grin (Karlson2k) f71019f00b MHD_get_version(): fixed signed value bit shift 2022-04-18 11:18:04 +03:00
Evgeny Grin (Karlson2k) b0a2a0add1 microhttpd.h: removed empty line 2022-04-18 11:18:03 +03:00
Evgeny Grin (Karlson2k) 71633eb917 Refactored create response functions.
Moved away from the deprecated function, shortened typical call chain.
2022-04-18 11:18:03 +03:00
Evgeny Grin (Karlson2k) 1c11680120 Added _MHD_EXTERN to the all public functions definitions
Previously it was inconsistent, some function definitions used
_MHD_EXTERN, while other definitions was used without _MHD_EXTERN.
2022-04-18 11:18:03 +03:00
Evgeny Grin (Karlson2k) 4ff1024763 refactoring: use 'const' for response buffers
The response buffers shouldn't be modifiable.
2022-04-18 11:18:02 +03:00
Evgeny Grin (Karlson2k) 1907cc2b1b MHD_Connection: added 'const' qualifiers to some unmodifiable members 2022-04-17 15:24:38 +03:00
Evgeny Grin (Karlson2k) 36cf2f2d2a connection: removed drop of 'const' qualifier 2022-04-17 15:24:38 +03:00
Evgeny Grin (Karlson2k) 2cef909cdd test_postprocessor_amp: fixed code style 2022-04-17 15:24:37 +03:00