Commit Graph
4998 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) bf99fa820c perf_replies: minor improvement for W32 code 2023-09-06 17:22:51 +03:00
Evgeny Grin (Karlson2k) cd16ca4d35 Implemented detection of number of CPUs available for the process on W32 2023-09-06 17:22:03 +03:00
Evgeny Grin (Karlson2k) 2ba3d8da0b W32 projects: added .editorconfig 2023-09-04 16:50:05 +03:00
Christian Grothoff 602ad55136 Revert "fixing #7772 exactly as suggested by reporter"
This reverts commit fabafbaaaf as the issue
was already fixed previously in a different way.
2023-09-03 19:38:21 +02:00
Christian Grothoff c690b40eb0 proper fix for #7757 2023-09-03 12:05:17 +02:00
Evgeny Grin (Karlson2k) efc136b4ef W32 projects: added perf_replies project 2023-09-03 11:02:21 +03:00
Evgeny Grin (Karlson2k) be7560aee7 mhd_tool_str_to_uint.h: cosmetic fix 2023-09-03 11:02:20 +03:00
Evgeny Grin (Karlson2k) d72b9c11dc W32 projects: minor fixes 2023-09-03 11:02:08 +03:00
Christian Grothoff fabafbaaaf fixing #7772 exactly as suggested by reporter 2023-09-03 00:49:49 +02:00
Christian Grothoff 438c3ee2d6 fix #7928: correct tutorial direntry 2023-09-03 00:29:41 +02:00
Christian Grothoff eb21a977d2 fix #7757 2023-09-03 00:24:16 +02:00
Evgeny Grin (Karlson2k) 8586d91913 Improved detection of number of available CPU cores 2023-08-15 11:50:06 +03:00
Evgeny Grin (Karlson2k) e87d26c429 Implemented proper detection of number of available CPU cores 2023-07-29 23:38:13 +03:00
Evgeny Grin (Karlson2k) 8a6307e08c perf_replies: updated license text 2023-07-29 23:38:11 +03:00
Evgeny Grin (Karlson2k) 15f602c2eb mhd_tool_str_to_uint.h: fixed doxy 2023-07-29 23:37:03 +03:00
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