Commit Graph
314 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) 8aa7d23219 Partial revert of 1b610e5b13.
Implemented new functions for key and value with binary zero.
Significantly speedup search for key by using key size.
2019-05-01 22:12:24 +03:00
Christian Grothoff 1917b86699 add flags for TLS option control 2019-04-15 17:38:16 +02:00
Christian Grothoff 1b610e5b13 allow binary zero in unescaped GET arguments (see mailinglist) 2019-03-20 10:46:21 +01:00
Christian Grothoff 2897bd23e5 add test for RFC 7616 and document new API 2018-12-08 22:54:33 +01:00
Christian Grothoff 6bb3796f50 fix FTBFS 2018-12-07 19:11:59 +01:00
Christian Grothoff 0eefd20ba3 add build option to compile MHD without threads 2018-12-07 12:40:40 +01:00
silvioprog 22c08b5fd7 Renamed all occurrences from _model(s)_ to _mode(s)_. 2018-12-06 13:26:39 -03:00
Christian Grothoff 10bdf39505 add MHD_create_response_from_buffer_with_free_callback 2018-11-08 14:53:19 +01:00
Christian Grothoff 9199e5aa3a From: Gauthier Haderer <ghaderer@wyplay.com>
Date: Mon, 15 Oct 2018 14:11:39 +0200
Subject: [PATCH] Add response flag to force version to 1.0 and maintain
 connection management.

The existing MHD_RF_HTTP_VERSION_1_0_ONLY flag already changes MHD's
behavior to apply HTTP 1.0 rules for connection management. When
enabled, MHD sends a response using the same version as used in the
request (is this normal?).

What I want is MHD responding as a HTTP 1.0 server with support for
connection management headers would do. This is what the
MHD_RF_HTTP_VERSION_1_0_RESPONSE response flag is for.

You can even combine it with MHD_RF_HTTP_VERSION_1_0_ONLY to change the
response's HTTP version while maintaining strict compliance with HTTP
1.0 regarding connection management.

This solution is not perfect as this flag is set on the response which
is created after header processing. So MHD will behave as a HTTP 1.1
server until the response is queued. It means that an invalid HTTP 1.1
request will fail even if the response is sent with HTTP 1.0 and the
request would be valid if interpreted with this version. For example,
this request will fail in strict mode:

GET /dummy HTTP/1.1

as the Host header is missing and is mandatory in HTTP 1.1, but it
should succeed when interpreted with HTTP 1.0.

I don't think this is a big issue in practice. Besides, being able to
change the HTTP version on a response basis is really convenient when
using MHD in a test framework where we need to validate a client against
HTTP 1.1 AND HTTP 1.0.
2018-10-16 20:44:39 +02:00
Christian Grothoff 0db81a9248 fix #5411 2018-10-05 19:23:26 +02:00
Christian Grothoff 2c47a23dec integrate TLS PSK patch from Tal Moaz (plus documentation, plus style and bugfixes 2018-07-14 13:27:45 +02:00
Christian Grothoff 2ed04522e2 add support for digest auth with hashed password 2018-07-14 13:27:45 +02:00
Christian Grothoff 832739556b some minor code cleaning issues 2018-06-22 15:16:11 +02:00
Christian Grothoff 85913afa11 move to canonical gettext 2018-03-10 12:28:34 +01:00
Christian Grothoff 8b531fd28c fix misc build issues if various features (poll/epoll/upgrade-support) are disabled 2018-03-05 18:49:56 +01:00
Christian Grothoff 10fcdb1e81 update .gitignore file 2018-03-02 22:06:45 +01:00
Christian Grothoff f6c647f638 make checkers happier by reducing use of strcpy and strcat 2018-02-22 18:35:08 +01:00
Evgeny Grin (Karlson2k) ad1c53a274 Excluded microhttpd2.h from doxy 2017-12-11 16:31:26 +03:00
Evgeny Grin (Karlson2k) 1fdae64c21 doxygen docs: automatically update lib version 2017-12-11 16:31:26 +03:00
Evgeny Grin (Karlson2k) e5b1fe4fbe Updated doxygen configuration file 2017-12-11 16:31:25 +03:00
Evgeny Grin (Karlson2k) ace60e2353 docs: install documentation picture alongside documentation files 2017-12-04 15:46:18 +03:00
Evgeny Grin (Karlson2k) 9a3ecffba7 docs: make MHD picture name unique to allow installation in /usr/share/info 2017-12-04 13:04:58 +03:00
Evgeny Grin (Karlson2k) 78fc2fe706 docs: help man to find entry for 'libmicrohttpd' 2017-12-04 12:51:54 +03:00
Christian Grothoff 59b4a6a00a releasing libmicrohttpd 0.9.56 2017-11-24 20:33:43 +01:00
Christian Grothoff 330a40552c add MHD_free(), as suggested by Tim on the mailinglist 2017-10-09 22:41:11 +02:00
Christian Grothoff 1a23dd25c3 misc style improvements, fixing some tiny rare memory leaks in examples 2017-10-05 23:16:19 +02:00
Evgeny Grin (Karlson2k) a5b63e992b Muted compiler warnings in examples. 2017-09-29 22:07:49 +03:00
Evgeny Grin (Karlson2k) 8eb8e558f0 Dropped non-functional Symbian support. 2017-06-14 21:46:12 +03:00
Marcello Stanisci 9733f301ca typo 2017-06-14 10:43:01 +02:00
Evgeny Grin (Karlson2k) 8a88bc9335 microhttpd.h: deprecate unused MHD_RESPONSE_HEADER_KIND value 2017-05-06 22:02:30 +03:00
Christian Grothoff 76cf7d7f58 documentation, adding MHD_CONNECTION_INFO_REQUEST_HEADER_SIZE, releasing 0.9.54 2017-05-02 18:53:50 +02:00
Christian Grothoff b57456c2e6 relax space-in-field-name checks only if new MHD_USE_PERMISSIVE_CHECKS flag is set 2017-04-24 17:30:26 +02:00
Christian Grothoff 3c2727fcea add document encoding hint 2017-03-29 14:09:06 +02:00
Evgeny Grin (Karlson2k) 7e1123665e Fixed docs as suggested by Vitaliy T 2017-03-22 23:01:06 +03:00
Christian Grothoff 6b03d68f07 document MHD_CONNECTION_INFO_CONNECTION_TIMEOUT in manual 2017-03-21 14:15:52 +01:00
Christian Grothoff 222acd1c5a clarify when it is ok to call MHD_get_fdset in documentation, document MHD_get_fdset2() 2017-03-21 14:15:52 +01:00
Christian Grothoff 59268ccff1 Still there is an issue with re-open a file. Patch applied below to
avoid it.

Also iterate_post() always returns MHD_OK, because the app's logic
driven
from the value of con_info->answercode().
And in case if fwrite() fails we also update the answer code & page  and
MHD_post_process() overwrite them (fileioerror becomes postprocerror).
2017-03-14 02:41:50 +01:00
Christian Grothoff 740a46dd36 fix largepost example, must only queue replies either before upload happens or after upload is done, not while upload is ongoing 2017-03-11 12:07:38 +01:00
Karlson2k f9f8d0c54d Updated documentation. 2016-11-23 17:44:38 +03:00
Evgeny Grin (Karlson2k) bc83858f65 Updated documentation about MHD_OPTION_LISTENING_ADDRESS_REUSE 2016-11-14 22:35:26 +03:00
Evgeny Grin (Karlson2k) 4b795e9fc6 Added MHD_USE_AUTO and MHD_USE_AUTO_INTERNAL_THREAD to simplify using of MHD by multi-platform applications 2016-11-10 22:18:20 +03:00
Evgeny Grin (Karlson2k) e067df9397 One more flag renamed: MHD_USE_EPOLL_TURBO -> MHD_USE_TURBO.
Hopefully last one for now.
2016-11-10 17:42:28 +03:00
Evgeny Grin (Karlson2k) d5245634c2 Added MHD_USE_ERROR_LOG flag with same value as MHD_USE_DEBUG.
New name better explains flag actions.
2016-11-08 19:41:28 +03:00
Evgeny Grin (Karlson2k) c39f9bfb26 Specify that flag MHD_USE_INTERNAL_POLLING_THREAD is mandatory if MHD_USE_THREAD_PER_CONNECTION is used 2016-11-08 01:00:00 +03:00
Evgeny Grin (Karlson2k) bae7dc05a8 Fixed wrong flag name in documentation. 2016-11-08 01:00:00 +03:00
Evgeny Grin (Karlson2k) a48ca85fb7 Renamed daemon flags:
MHD_USE_SELECT_INTERNALLY -> MHD_USE_INTERNAL_POLLING_THREAD
MHD_USE_POLL_INTERNALLY -> MHD_USE_POLL_INTERNAL_THREAD
MHD_USE_EPOLL_INTERNALLY -> MHD_USE_EPOLL_INTERNAL_THREAD
2016-11-08 00:54:59 +03:00
Evgeny Grin (Karlson2k) 959d55ec5e Renamed MHD flags. Now all flags are in forms MHD_USE_* or MHD_ALLOW_*. 2016-11-07 17:08:03 +03:00
Christian Grothoff d7392e0882 all flags start with MHD_USE_, rename MHD_ALLOW_UPGRADE to MHD_USE_UPGRADE for consistency 2016-11-04 17:02:56 +01:00
Christian Grothoff 43227e1b18 update manual in line with commit cbd9376691 2016-11-04 16:26:09 +01:00
Christian Grothoff 9b7bc3d8bd fix clang warnings 2016-10-17 15:49:22 +02:00