summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-09-09 04:11:30 +0000
committerChristian Grothoff <christian@grothoff.org>2007-09-09 04:11:30 +0000
commit3750461e0ac7a17173c20e36f5469008341dbf86 (patch)
tree1afb4a0f6699cbb63974025f584c18a4ec4395bc
parent5176c75854736ad6514a76778cb81ba93bdfff71 (diff)
better
-rw-r--r--src/daemon/daemontest_post.c6
-rw-r--r--src/include/microhttpd.h21
2 files changed, 19 insertions, 8 deletions
diff --git a/src/daemon/daemontest_post.c b/src/daemon/daemontest_post.c
index 00bec910..87eca380 100644
--- a/src/daemon/daemontest_post.c
+++ b/src/daemon/daemontest_post.c
@@ -71,7 +71,11 @@ copyBuffer (void *ptr, size_t size, size_t nmemb, void *ctx)
static int
post_iterator (void *cls,
enum MHD_ValueKind kind,
- const char *key, const char *value, size_t off, size_t size)
+ const char *key,
+ const char *filename,
+ const char *content_type,
+ const char *transfer_encoding,
+ const char *value, size_t off, size_t size)
{
int *eok = cls;
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index a7f846ca..9a298abc 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 0x00000005
+#define MHD_VERSION 0x00000004
/**
* MHD-internal return codes.
@@ -562,15 +562,19 @@ typedef void (*MHD_ContentReaderFreeCallback) (void *cls);
/**
* Iterator over key-value pairs where the value
* maybe made available in increments and/or may
- * not be zero-terminated.
+ * not be zero-terminated. Used for processing
+ * POST data.
*
* @param cls user-specified closure
* @param kind type of the value
- * @param 0-terminated key for the value
- * @param value pointer to size bytes of data at the
+ * @param key 0-terminated key for the value
+ * @param filename name of the uploaded file, NULL if not known
+ * @param content_type mime-type of the data, NULL if not known
+ * @param transfer_encoding encoding of the data, NULL if not known
+ * @param data pointer to size bytes of data at the
* specified offset
- * @param off offset of value in the overall data
- * @param size number of bytes in value available
+ * @param off offset of data in the overall value
+ * @param size number of bytes in data available
* @return MHD_YES to continue iterating,
* MHD_NO to abort the iteration
*/
@@ -578,7 +582,10 @@ typedef int
(*MHD_IncrementalKeyValueIterator) (void *cls,
enum MHD_ValueKind kind,
const char *key,
- const char *value,
+ const char *filename,
+ const char *content_type,
+ const char *transfer_encoding,
+ const char *data,
size_t off, size_t size);
/**