diff options
author | Christian Grothoff <christian@grothoff.org> | 2008-01-31 06:21:49 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2008-01-31 06:21:49 +0000 |
commit | f3ce0400d1b2e56ec57eb70be828752916210751 (patch) | |
tree | 6a1a7448488324c9ebcfc4c82d2603e6e0349544 | |
parent | ccad20a05fcf4ae866551ea792ebdceb2ffd5664 (diff) |
finished support for nested multiparts
-rw-r--r-- | README | 8 | ||||
-rw-r--r-- | src/daemon/connection.c | 7 | ||||
-rw-r--r-- | src/include/microhttpd.h | 2 |
3 files changed, 7 insertions, 10 deletions
@@ -50,14 +50,6 @@ indicates that a testcase should be written before implementing the feature. -For POST: -========= -- add support to decode multipart/form-data with - nesting (used for files) -- #1221, TEST -- http://en.wikipedia.org/wiki/HTTP_pipelining: - "Only idempotent requests should be pipelined, such as GET and HEAD requests." - We should make sure that we force a close after POSTs, PUTs and DELETEs. - For SSL: ======== microhttpd.h: diff --git a/src/daemon/connection.c b/src/daemon/connection.c index fbcbffc2..c82278cb 100644 --- a/src/daemon/connection.c +++ b/src/daemon/connection.c @@ -1795,8 +1795,13 @@ MHD_connection_handle_idle (struct MHD_Connection *connection) if (((MHD_YES == connection->read_closed) && (0 == connection->read_buffer_offset)) || (connection->version == NULL) || - (0 != strcasecmp (MHD_HTTP_VERSION_1_1, connection->version))) + (connection->method == NULL) || + ( (0 != strcasecmp (MHD_HTTP_METHOD_HEAD, connection->method)) && + (0 != strcasecmp (MHD_HTTP_METHOD_GET, connection->method)) ) || + (0 != strcasecmp (MHD_HTTP_VERSION_1_1, connection->version))) { + /* http 1.0, version-less or non-HEAD/GET requests cannot be + pipelined */ connection->state = MHD_CONNECTION_CLOSED; MHD_pool_destroy (connection->pool); connection->pool = NULL; diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 76e64e96..0d280c55 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h @@ -84,7 +84,7 @@ extern "C" /** * Current version of the library. */ -#define MHD_VERSION 0x00000201 +#define MHD_VERSION 0x00020100 /** * MHD-internal return codes. |