Commit Graph
3660 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) a60173864e MHD_queue_response(): refuse 1xx codes in HTTP/1.0 mode
See https://datatracker.ietf.org/doc/html/rfc7231#section-6.2
2021-06-13 20:45:46 +03:00
Evgeny Grin (Karlson2k) bbbcf4838a MHD_add_response_header: added detailed comment about automatic headers
Automatic header handling was not documented, while this mechanism is
important for MHD functionality and the absence of this description
resulted in wrong assumptions made by users.
2021-06-13 20:45:46 +03:00
Evgeny Grin (Karlson2k) 3bd79348f0 MHD_create_response_*() functions: improved doxy
* Clearer description of how buffer/FD/ other is used
* Sync .c/.h doxy
* Clarification for HEAD requests answering
2021-06-13 13:42:12 +03:00
Evgeny Grin (Karlson2k) fae8fc5be9 uncrustify.cfg minor fix 2021-06-13 13:42:12 +03:00
Evgeny Grin (Karlson2k) 0a4537e86c connection.c: fixed wrong caseless HTTP method comparison
Method strings much much be matched as case-sensitive
2021-06-12 21:04:21 +03:00
Evgeny Grin (Karlson2k) 8391cfa210 connection.c: added detection of standard HTTP methods
Detection was added only for basic methods as defined in RFC7231
2021-06-12 20:40:01 +03:00
Evgeny Grin (Karlson2k) d4a6985d12 uncrustify.cfg: updated 2021-06-12 20:30:58 +03:00
Evgeny Grin (Karlson2k) c7a0cf287b Corrected naming enum MHD_HTTP_version -> enum MHD_HTTP_Version 2021-06-12 18:30:28 +03:00
Evgeny Grin (Karlson2k) 386b21da1b test_tls_options: multiple fixes
* SSLv3 is not supported anymore by TLS libs and CURL
* libcurl accepts requested and later versions of TLS,
  MHD and CURL TLS versions in second test must be reversed
* Test works with any TLS backend with a few exceptions
2021-06-10 21:20:44 +03:00
Evgeny Grin (Karlson2k) 6dbe969d4d tests: removed curl_uses_nss_ssl(), used new backend identification functions 2021-06-10 21:09:25 +03:00
Evgeny Grin (Karlson2k) 6c84bcf3fe HTTPS tests: added new backend identification functions 2021-06-10 20:45:29 +03:00
Evgeny Grin (Karlson2k) 77a30308be HTTPS tests: ensure that CURL options were applied 2021-06-10 19:41:28 +03:00
Evgeny Grin (Karlson2k) 9166f4760d connection.c: log message typo fixed 2021-06-08 10:00:01 +03:00
Evgeny Grin (Karlson2k) e8e4d70c4a Response: disallow two "Transfer-Encoding" headers 2021-06-08 09:54:40 +03:00
Evgeny Grin (Karlson2k) b0400609fa keepalive_possible: do not use "Keep-Alive" with read-closed connections 2021-06-08 09:54:39 +03:00
Evgeny Grin (Karlson2k) 45c7e2bc39 MHD_queue_response: check whether provided status code is a three digits code 2021-06-08 09:54:39 +03:00
Evgeny Grin (Karlson2k) 2106f6f2bb connection.c: added TODO comment 2021-06-08 09:54:39 +03:00
Evgeny Grin (Karlson2k) 7d53b1eb9e try_ready_chunked_body: handle large chunks properly
Do not try to call user call-back with buffer larger
than MHD is able to process.
2021-06-08 09:54:38 +03:00
Evgeny Grin (Karlson2k) 149eaabc67 Added TODO comments and corrected log message 2021-06-05 22:16:15 +03:00
Evgeny Grin (Karlson2k) 6123b2ab2b Fixed header size calculation.
Previous calculation was incorrect, header size was always
negative (overflow) number.
New calculation takes into account full header size, including
the last empty line with linefeeds.
2021-06-05 21:18:55 +03:00
Evgeny Grin (Karlson2k) 732bc0a0c3 connection: fixed wrong read buffer reallocation 2021-06-04 15:52:38 +03:00
Evgeny Grin (Karlson2k) 2ccc281a69 connection: handle large read-ahead situation 2021-06-04 15:22:22 +03:00
Evgeny Grin (Karlson2k) 9ca0b36ab0 connection: do not spend time on building footers for zero-sized responses
Footers are not used for non-chunked responses.
2021-06-04 12:59:45 +03:00
Evgeny Grin (Karlson2k) cdc1db3d2f test_get_chunked: implemented TODOs
Added check for presence of the footer,
Added check for usage of chunked encoding (if 'chunked'
header is present libcurl receives only in chunked mode)
2021-06-03 22:00:06 +03:00
Evgeny Grin (Karlson2k) 533d5cecd4 chunked_example: fixed resource leak 2021-06-03 21:30:11 +03:00
Evgeny Grin (Karlson2k) f33328efab Code and comments minor fixes 2021-05-30 22:24:08 +03:00
Evgeny Grin (Karlson2k) 23943a2da6 Calculate size of error responses at compile time 2021-05-26 21:21:16 +03:00
Evgeny Grin (Karlson2k) 0c28412a3a Refactored handling of incompatible HTTP versions
Removed some workarounds
2021-05-26 21:21:15 +03:00
Evgeny Grin (Karlson2k) 547db43087 HTTP version string processing fixes
Fixed wrongly used case-insensitive match for HTTP version string,
HTTP version should be checked as case-sensitive.
Hypothetical HTTP/1.2 - HTTP/1.9 must be used as HTTP/1.1 (required
by HTTP/1.1 specification)
2021-05-26 21:21:15 +03:00
Evgeny Grin (Karlson2k) 5e029304d4 test_long_header: minor improvement 2021-05-22 18:22:09 +03:00
Evgeny Grin (Karlson2k) de6922ca82 Added detection of HTTP version during early parsing
Requests with unsupported HTTP versions are rejected as specified
by RFC 7230.
2021-05-21 18:59:49 +03:00
Evgeny Grin (Karlson2k) 65413082c9 md5 small optimization 2021-05-18 22:21:48 +03:00
Evgeny Grin (Karlson2k) f959b84352 Fixed unaligned data processing in SHA-256 and MD5 2021-05-18 22:17:29 +03:00
Evgeny Grin (Karlson2k) 7b3e010b61 sha-1 minor improvements 2021-05-18 20:05:06 +03:00
Evgeny Grin (Karlson2k) f59775676f Fixed SHA-1 calculation with unaligned data 2021-05-18 19:57:58 +03:00
Evgeny Grin (Karlson2k) 89387e53fe Implemented basement to work with unaligned data 2021-05-18 19:37:10 +03:00
Evgeny Grin (Karlson2k) 7676e698a9 Updated test_sha* and test_md5 with unaligned data 2021-05-16 21:34:31 +03:00
Evgeny Grin (Karlson2k) 9b9b413a1e Updated .gitignore 2021-05-16 21:26:31 +03:00
Evgeny Grin (Karlson2k) cea71d6e52 test_sha1: minor fixes 2021-05-16 21:23:07 +03:00
Evgeny Grin (Karlson2k) 714c5735e4 Implemented SHA-1 calculation 2021-05-16 18:21:27 +03:00
Evgeny Grin (Karlson2k) b25cc0f301 sha256: formatting, cosmetics, typos in comments 2021-05-16 18:21:27 +03:00
Evgeny Grin (Karlson2k) ab7c8f4efc sha256: minor optimization 2021-05-16 18:15:39 +03:00
Evgeny Grin (Karlson2k) 255c45dd3b sha256: re-arranged struct members to have better alignment 2021-05-16 18:15:39 +03:00
Evgeny Grin (Karlson2k) 356187139c sha256: renamed one function for clarity and uniformity 2021-05-16 18:15:39 +03:00
Evgeny Grin (Karlson2k) 1265e687ff mhd_bithelpers: replaced macro with static function
Bit-rotating macro was replaced with static inline function to avoid two time evaluation
and calculation of the parameters.
2021-05-16 17:53:45 +03:00
Evgeny Grin (Karlson2k) 8a9a64a703 Added new response create function.
Added MHD_create_response_from_buffer_with_free_callback_cls function
2021-05-12 20:52:13 +03:00
Evgeny Grin (Karlson2k) 9ac7492bb5 Further clarified requirement to use MHD_get_timeout()
Emphasise that it is necessary to use MHD_get_timeout() with any
external sockets polling function.
2021-05-12 20:11:32 +03:00
Evgeny Grin (Karlson2k) fc0385be98 test_get_chunked_close: new test
Test chunked encoding with non-Keep-Alive connections
2021-05-06 11:26:34 +03:00
Evgeny Grin (Karlson2k) 81bbdc7048 chunked_example: enforce to use chunked encoding
Previously MHD switches to identity encoding if connection
is not Keep-Alive
2021-05-06 11:26:34 +03:00
Christian Grothoff 3569c42c4c -more work for JE Marchesi 2021-05-02 12:34:05 +02:00