Commit Graph
5033 Commits
Author SHA1 Message Date
Christian Grothoff d011008332 -typos 2023-07-10 19:47:02 +02:00
Evgeny Grin (Karlson2k) d3519acbbe perf_replies: moved one function to separate header 2023-07-10 13:40:10 +03:00
Evgeny Grin (Karlson2k) f586f2e7c1 perf_replies: added options for response sharing types 2023-07-10 08:32:15 +03:00
Evgeny Grin (Karlson2k) 36f1c42d5f perf_replies: added 'thread-per-connection' mode 2023-07-09 18:38:54 +03:00
Evgeny Grin (Karlson2k) e5103067f6 perf_replies: added short aliases for polling function modes 2023-07-09 17:58:53 +03:00
Evgeny Grin (Karlson2k) 72d1acb323 perf_replies: added various response sizes, minor fixes 2023-07-04 23:01:48 +03:00
Evgeny Grin (Karlson2k) 54b2a78b36 perf_replies: added more features 2023-07-04 15:32:38 +03:00
Evgeny Grin (Karlson2k) a5cf04b5d0 Added new tool perf_replies
Added new directory "tools" and one new tool in this directory.
2023-07-03 18:31:47 +03:00
Evgeny Grin (Karlson2k) 08fe527f03 connection: fixed sending error responses
Could be problematic with come compilers after
eaf1fa0889
2023-07-03 11:38:48 +03:00
Evgeny Grin (Karlson2k) 021923493b Make sure that some space for request body is always available 2023-06-29 17:07:04 +03:00
Evgeny Grin (Karlson2k) f02888d4de Focused all read-buffer grows in a single point, related improvements.
Improved handling of low memory in connection pool.
Improved handling of read buffer growing.
Removed impossible conditions combinations handling.
2023-06-20 23:22:58 +03:00
Evgeny Grin (Karlson2k) 8b17c9155f try_grow_read_buffer(): better handling of edge cases
Used application specified grow size instead of MHD default size.
When free space is becoming low first try to increase free space
to exact increment value before switching to "low memory" mode.
2023-06-20 23:22:58 +03:00
Evgeny Grin (Karlson2k) 8fd9b6bdbb Fixed some comments 2023-06-20 23:22:58 +03:00
Evgeny Grin (Karlson2k) e620738a22 W32 VS Projects: fixed code parsing 2023-06-20 23:22:58 +03:00
Evgeny Grin (Karlson2k) 0f20fe46ee Fixed possible timeout value trim on 32-bits platforms 2023-06-20 23:22:58 +03:00
Evgeny Grin (Karlson2k) 67061d5ce2 process new connection: fixed missing mutex unlock in error handling path 2023-06-20 23:22:57 +03:00
Evgeny Grin (Karlson2k) a80d80604a Adjusted buffer increase default step size 2023-06-20 23:22:57 +03:00
Evgeny Grin (Karlson2k) f7bae2ce3e Minor refactoring for partially processed request body 2023-06-20 23:22:57 +03:00
Evgeny Grin (Karlson2k) 30bf05560d process_request_body(): minor readability improvementы 2023-06-20 23:22:56 +03:00
Evgeny Grin (Karlson2k) c1b6751c11 Added checks for correct values specified for connection memory limits 2023-06-20 23:22:56 +03:00
Evgeny Grin (Karlson2k) 5a9f64bc6a connection: fixed pipelined requests processing 2023-06-20 23:22:56 +03:00
Evgeny Grin (Karlson2k) 2e996ee5c2 Added proper connection's buffers pre-initialisaion 2023-06-20 23:22:56 +03:00
Evgeny Grin (Karlson2k) 127a964c7b connection.c: corrected error responses 2023-06-20 23:22:55 +03:00
Evgeny Grin (Karlson2k) edde133d39 Added tests with single and double folded header 2023-06-20 23:22:55 +03:00
Evgeny Grin (Karlson2k) 48ae1a36da Added test with large folded header 2023-06-20 23:22:55 +03:00
Evgeny Grin (Karlson2k) 04ad057ab9 Added test with folded header placed last 2023-06-20 23:22:55 +03:00
Evgeny Grin (Karlson2k) 6878cd9144 Added new tests with header fold 2023-06-20 23:22:54 +03:00
Evgeny Grin (Karlson2k) c0f7cbb280 Added back testing with socat as a fallback option 2023-06-20 23:22:54 +03:00
Evgeny Grin (Karlson2k) 40b675518b testzzuf: re-worked zzuf testing
* merged test_get, test_get_chunked, test_put
* fixed use of header instead of footer in chunked data callback
* added checks for results of all used MHD functions
* added reading of all data in the input buffer provided by MHD for
  callback
* re-used libcurl handles to re-use connections in all modes
* added testing of 'poll' and 'epoll' for all tests
* removed the need for socat
* removed forking with potential forked process zombies
* fixed processing only of the first request (as soon  as socat
  connection become broken, all following requests went to nowhere)
* implemented correct response for unsupported methods
* used proper timeout for 'external select()' (taken into account
  libcurl timeout too)
* added check for extra reply data
* added debug print of libcurl sent and received data
* merged all tests into single source file
* fixed a lot of compiler warnings
* added check for incorrect replies produced by MHD
2023-06-20 23:22:54 +03:00
Evgeny Grin (Karlson2k) 87d40361d3 testzzuf: added special debug functions 2023-06-20 23:22:54 +03:00
Evgeny Grin (Karlson2k) 4b8fb0700b daemon: added debug member to avoid accept4() usage 2023-06-20 23:22:53 +03:00
Evgeny Grin (Karlson2k) dce208464a tests: minor improvemnts 2023-06-20 23:22:53 +03:00
Evgeny Grin (Karlson2k) 4e8e5e653d Removed request line and headers processing old functions and variables 2023-06-20 23:22:53 +03:00
Evgeny Grin (Karlson2k) eaf1fa0889 Re-implemented parsing of the request headers and footers from scratch.
* The new algorithm parse the headers in one pass (including folded
headers) thus multiple passes over the same memory area are avoided
(efficiency for large headers should be improved).
* Strict implementation of RFC 9110 and 9112 requirements, including
replacing or reporting error for unacceptable characters.
* Implemented various levels of strictness for requests interpretations:
three levels within RFC requirements (more strict and more secure; less
strict and more compatible with various clients; balanced (default)),
one more relaxed level with violation of RFC's SHOULD/SHOULD NOT,
one even more relaxed level with violation of MUST/MUST NOT,
one stricter level then required by RFC, but absolutely compatible with
clients following RFC's MUST/MUST NOT, and one more even stricter level
compatible with clients following both MUST/MUST NOT and
SHOULD/SHOULD NOT.
* Added detection and handling of more erroneous situations, like space
at the start of the first line (as recommended by RFC).
* Added more detailed responses for invalid requests with descriptions
of the found problems (as recommended by RFC).
* If many chars have been replaced, only summary is reported instead
of flooding logs with messages when request is badly constructed.
* Whitespaces in headers values are trimmed at start and at the end. No
need to handle extra spaces in the app or when using headers in other
MHD parts, like cookie parsing.
* In overall: increased flexibility, the security must be improved,
much better compliance with the standards.
2023-06-20 22:59:07 +03:00
Evgeny Grin (Karlson2k) 69da856991 Request body processing: removed impossible code paths
Some code paths are impossible. Removed and replaced with asserts.
Also redundant checks are removed.
2023-06-20 22:59:07 +03:00
Evgeny Grin (Karlson2k) 9141692ad5 Renamed connection state for clarity 2023-06-20 22:59:07 +03:00
Evgeny Grin (Karlson2k) b483c0f6d3 microhttpd.h: fixed typos in comments 2023-06-20 22:59:06 +03:00
Evgeny Grin (Karlson2k) bd605be202 Re-implemented parsing of the request line from scratch.
* New algorithm parse the request line in one pass thus multiple passes
over the same memory area are avoided (efficiency for large URI should
be improved)
* Strict implementation of RFC 9110 and 9112 requirements, unacceptable
characters are replaced or threaded as errors.
* Implemented various levels of strictness for requests interpretations:
three levels within RFC requirements (more strict and more secure; less
strict and more compatible with various clients; balanced (default)),
one more relaxed level with violation of RFC's SHOULD/SHOULD NOT,
one even more relaxed level with violation of MUST/MUST NOT,
one stricter level then required by RFC, but absolutely compatible with
clients following RFC's MUST/MUST NOT, and one more even stricter level
compatible with clients following both MUST/MUST NOT and
SHOULD/SHOULD NOT.
* Added more detailed responses for invalid requests with descriptions
of the found problems (as recommended by RFC).
* Limited number of empty lines skipped before the request (as
recommended by RFC).
* Implemented automatic redirection responses for requests targets
with forbidden characters (as recommended by RFC).
* In overall: increased flexibility, the security must be improved,
much better compliance with the standards.
2023-06-20 22:59:06 +03:00
Evgeny Grin (Karlson2k) eaa3be77c3 Refactoring: check whether memory block is resizable
Instead of using some heuristics to determine which block is resizable,
use new special function to check
2023-06-20 21:06:41 +03:00
Evgeny Grin (Karlson2k) 8dc93b0834 base64 decoding: added more compact code version
Also added more base64 test sequencies
2023-06-09 13:11:12 +03:00
Evgeny Grin (Karlson2k) 4993c15202 Added test for MHD_get_version{,_bin} function and related macros 2023-06-08 16:13:15 +03:00
Evgeny Grin (Karlson2k) c2d5c80c71 Bump version in 'configure' as well 2023-06-07 22:02:13 +03:00
Evgeny Grin (Karlson2k) ddfa808bb4 Bump version numbers as v0.9.77 was released on parallel branch 2023-06-06 22:56:36 +03:00
Evgeny Grin (Karlson2k) d17b6cb79d MHD_base64_to_bin_n(): improved readbility
No functional change
2023-06-05 20:20:30 +03:00
Evgeny Grin (Karlson2k) 3a3208c002 mhd_str: hex to value optimisation 2023-06-05 20:20:24 +03:00
Christian Grothoff dc1973a702 -typos 2023-06-03 12:58:55 +02:00
Evgeny Grin (Karlson2k) 4ddb80153c W32 VS Project: fixed warning with external build systems 2023-06-01 13:28:26 +03:00
Evgeny Grin (Karlson2k) 4d5f24f7df autoinit_funcs.h: fixed warning on MSVC 2023-06-01 13:28:26 +03:00
Evgeny Grin (Karlson2k) 36af2166bc W32 VS Project: minor internal fixes, fixed files for "dist" 2023-06-01 13:28:25 +03:00
Evgeny Grin (Karlson2k) dca5d029c9 W32 VS project: reverted to standard arches names 2023-06-01 13:28:25 +03:00