Commit Graph
5202 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) f5c2724a9f Fixed compatibility with more old compilers 2023-09-27 22:29:09 +03:00
Evgeny Grin (Karlson2k) 79470220c7 Fixed more compiler warnings 2023-09-27 21:36:31 +03:00
Evgeny Grin (Karlson2k) d588a45578 Correction for 93bc2751bf 2023-09-27 20:35:10 +03:00
Evgeny Grin (Karlson2k) 93bc2751bf Improved compatibility with old compilers 2023-09-27 20:02:00 +03:00
Evgeny Grin (Karlson2k) ed4c182944 Implemented correct processing of chunked request encoding with BWS in chunk size line 2023-09-27 19:38:56 +03:00
Evgeny Grin (Karlson2k) 21ffbbd378 Unified bare LF as CRLF handling for request chunked encoding 2023-09-27 19:27:14 +03:00
Evgeny Grin (Karlson2k) 837263e790 connection: added helper macro 2023-09-27 19:27:08 +03:00
Evgeny Grin (Karlson2k) 78e28ecca8 test_long_header: improved, fixed, added error reporting 2023-09-27 17:44:21 +03:00
Evgeny Grin (Karlson2k) b1f2ddbb03 test_put_header_fold: fixed copy-paste error 2023-09-27 15:21:44 +03:00
Evgeny Grin (Karlson2k) 7b2ab60e03 test_long_header: re-use the same port for all checks 2023-09-27 15:21:43 +03:00
Evgeny Grin (Karlson2k) a030a4aef7 zzuf tests: fixed compiler warnings 2023-09-27 09:28:50 +03:00
Evgeny Grin (Karlson2k) 15575e2998 tests: fixed compiler warnings 2023-09-27 09:16:21 +03:00
Evgeny Grin (Karlson2k) dff7ab0d63 test_toolarge: removed debug value introduced by 6ee7fa38d9 2023-09-26 16:48:25 +03:00
Evgeny Grin (Karlson2k) 6ee7fa38d9 Rewritten handling of exhaustion of memory pool when receiving
The new implemented is even more unified and used directly when there
is no space to add pointers to the new header or cookie.

The new implementation has more detailed descriptions in the error reply
bodies.
Situations with too long non-standard request HTTP method are handled
correctly.
The response HTTP error code better matches the reason. For example,
if overwhelming majority of buffer is used by request URI string and
request header cannot fit the rest of the buffer, the reply code
is 414 "URI Too Long" instead of 431 "Request Header Fields Too Large",
which was used previously.
2023-09-26 16:43:33 +03:00
Evgeny Grin (Karlson2k) 449717db69 Added calculation of request headers total size 2023-09-26 16:01:27 +03:00
Evgeny Grin (Karlson2k) cad66b87b8 Detect error earlier if request HTTP version is bad 2023-09-26 16:01:27 +03:00
Evgeny Grin (Karlson2k) 921b183abf Refactoring: store "request target" original length 2023-09-26 16:01:26 +03:00
Evgeny Grin (Karlson2k) 7a638aed1b microhttpd.h: fixed deprecation messages 2023-09-26 16:01:21 +03:00
Evgeny Grin (Karlson2k) 0f75e71e48 Added check for magic number in the request content-lenght 2023-09-26 15:43:29 +03:00
Christian Grothoff 9c032ccca7 Revert "-add support for ICECAST-style uploads"
This reverts commit 19e1ed8355.
2023-09-26 11:58:44 +02:00
Christian Grothoff 4a031e5482 -fix theoretical use-after-free in test on error path 2023-09-25 21:52:48 +02:00
Christian Grothoff 64d90a1a85 -tighten test further 2023-09-25 21:49:57 +02:00
Christian Grothoff 5083df300e fix check order 2023-09-25 21:41:10 +02:00
Christian Grothoff 0ae494028b check rvalues from MHD_post_process in examples 2023-09-25 21:38:23 +02:00
Christian Grothoff 138ee33a41 check rvalues from MHD_add_response_header in examples 2023-09-25 21:31:59 +02:00
Christian Grothoff 9327a8cc46 check rvalues from MHD_add_response_header in examples 2023-09-25 21:30:03 +02:00
Christian Grothoff 2212a37256 check rvalues from pthread_mutex_ operations in examples 2023-09-25 21:26:31 +02:00
Christian Grothoff e42c783bb8 -very theoretically, 0 would be OK, too 2023-09-25 21:13:17 +02:00
Christian Grothoff 19e1ed8355 -add support for ICECAST-style uploads 2023-09-25 20:32:53 +02:00
Evgeny Grin (Karlson2k) 8962cba42d Improved doxy for #MHD_CONNECTION_INFO_REQUEST_HEADER_SIZE info 2023-09-19 15:32:49 +03:00
Evgeny Grin (Karlson2k) 7ae4bcccec Fixed MHD_CONNECTION_INFO_DAEMON: return master daemon
Previously a worker daemon could be returned for thread pool
configuration. The worker daemon should not be used directly by
application, it is for internal use only.
2023-09-19 15:32:48 +03:00
Evgeny Grin (Karlson2k) 31dd1b054f get_request_line_inner(): added RFC references 2023-09-19 15:32:37 +03:00
Evgeny Grin (Karlson2k) 977814e18a Refactored threads support
Some platforms do not have any "invalid" value of thread handle/ID.
Added tracking of the thread initialisation on such platforms to
avoid accidental match with uninitialised value.
2023-09-17 19:57:56 +03:00
Evgeny Grin (Karlson2k) 580814314f test_shutdown_select: muted compiler warninig 2023-09-17 11:07:41 +03:00
Evgeny Grin (Karlson2k) 76bb5944a5 test_put_header_fold: fixed code style 2023-09-17 11:07:41 +03:00
Evgeny Grin (Karlson2k) c209ce76f7 Fixed missing <errno.h> includes
While 'errno' can be defined in various headers, by standard it must
be defined in <errno.h> header.
2023-09-17 11:07:40 +03:00
Evgeny Grin (Karlson2k) e52c9e2468 examples/sessions.c: fixed compiler warnings 2023-09-15 09:30:43 +03:00
Evgeny Grin (Karlson2k) 17b59778ea examples/sessions.c: fixed wrong check for error 2023-09-15 09:29:20 +03:00
Evgeny Grin (Karlson2k) c101b159ea Fixed debug build without TLS support 2023-09-13 17:11:51 +03:00
Evgeny Grin (Karlson2k) bb80be696b daemon: unified check for debug macros 2023-09-13 17:11:28 +03:00
Evgeny Grin (Karlson2k) 49942a4a3f W32 VS: really muted run-time warnings about data truncation 2023-09-13 17:10:44 +03:00
Evgeny Grin (Karlson2k) a4b7990e5b W32 VS project: corrected compiler settings
VS detects value truncation at run-time even if explicit cast is used.
This breaks legitimate code execution.

Unfortunately there is no way to disable it only for explicit casts
so disabling this feature completely.

Also disabled some warnings which are not real warnings, but
informational messages.
2023-09-12 15:31:03 +03:00
Evgeny Grin (Karlson2k) 7272f8b0bd Muted and fixed some compiler warnings 2023-09-12 15:27:10 +03:00
Evgeny Grin (Karlson2k) fdc7a08c4f mhd_str: removed some over-casting 2023-09-12 11:54:10 +03:00
Evgeny Grin (Karlson2k) 97707d77b7 mhd_str: fixed possible compiler and run-time sanitizers warnings 2023-09-11 19:50:20 +03:00
Evgeny Grin (Karlson2k) 35cfb56e7d mhd_threads: added new macro MHD_join_thread_tid_() 2023-09-08 12:04:09 +03:00
Evgeny Grin (Karlson2k) a9bc3198c8 Renamed 'pid' -> 'tid' when used for threads 2023-09-08 12:03:33 +03:00
Evgeny Grin (Karlson2k) e55b0418ec mhd_threads: renamed one macro for clarity 2023-09-08 11:10:51 +03:00
Evgeny Grin (Karlson2k) 3b0a9d19d1 mhd_threads: fixed check for error when starting a new thread on W32 2023-09-07 21:09:04 +03:00
Evgeny Grin (Karlson2k) e71a6a5dff mhd_threads: muted compiler warning on W32 2023-09-07 21:08:19 +03:00