PSARC/2014/289 libmicrohttpd
20235905 GNU Libmicrohttpd - C library HTTP server should be added to Userland
Tomas Heran <[email protected]>
Make MHD_http_unescape available to library users.
Reported upstream as: https://gnunet.org/bugs/view.php?id=3585
diff -r dcb95cb7b865 -r efe4a6fcacd1 src/include/microhttpd.h
--- a/src/include/microhttpd.h Thu Dec 18 21:16:20 2014 +0100
+++ b/src/include/microhttpd.h Thu Dec 18 21:49:28 2014 +0100
@@ -2477,6 +2477,21 @@
_MHD_EXTERN int
MHD_is_feature_supported(enum MHD_FEATURE feature);
+/**
+ * Process escape sequences ('+'=space, %HH) Updates val in place; the
+ * result should be UTF-8 encoded and cannot be larger than the input.
+ * The result must also still be 0-terminated.
+ *
+ * @param cls closure (use NULL)
+ * @param connection handle to connection, not used
+ * @param val value to unescape (modified in the process)
+ * @return length of the resulting val (strlen(val) maybe
+ * shorter afterwards due to elimination of escape sequences)
+ */
+size_t
+MHD_http_unescape (void *cls,
+ struct MHD_Connection *connection,
+ char *val);
#if 0 /* keep Emacsens' auto-indent happy */
{
diff -r dcb95cb7b865 -r efe4a6fcacd1 src/microhttpd/internal.h
--- a/src/microhttpd/internal.h Thu Dec 18 21:16:20 2014 +0100
+++ b/src/microhttpd/internal.h Thu Dec 18 21:49:28 2014 +0100
@@ -200,23 +200,6 @@
#endif
/**
- * Process escape sequences ('+'=space, %HH) Updates val in place; the
- * result should be UTF-8 encoded and cannot be larger than the input.
- * The result must also still be 0-terminated.
- *
- * @param cls closure (use NULL)
- * @param connection handle to connection, not used
- * @param val value to unescape (modified in the process)
- * @return length of the resulting val (strlen(val) maybe
- * shorter afterwards due to elimination of escape sequences)
- */
-size_t
-MHD_http_unescape (void *cls,
- struct MHD_Connection *connection,
- char *val);
-
-
-/**
* Header or cookie in HTTP request or response.
*/
struct MHD_HTTP_Header