commit f3ce0400d1b2e56ec57eb70be828752916210751
parent ccad20a05fcf4ae866551ea792ebdceb2ffd5664
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 31 Jan 2008 06:21:49 +0000
finished support for nested multiparts
Diffstat:
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/README b/README
@@ -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
@@ -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
@@ -84,7 +84,7 @@ extern "C"
/**
* Current version of the library.
*/
-#define MHD_VERSION 0x00000201
+#define MHD_VERSION 0x00020100
/**
* MHD-internal return codes.