components/libmicrohttpd/patches/002.patch
author Tomas Heran <tomas.heran@oracle.com>
Mon, 22 Dec 2014 13:28:36 +0100
changeset 3738 19e0324097d4
permissions -rw-r--r--
PSARC/2014/289 libmicrohttpd 20235905 GNU Libmicrohttpd - C library HTTP server should be added to Userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3738
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     1
Tomas Heran <[email protected]>
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     2
Make MHD_http_unescape available to library users.
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     3
Reported upstream as: https://gnunet.org/bugs/view.php?id=3585
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     4
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     5
diff -r dcb95cb7b865 -r efe4a6fcacd1 src/include/microhttpd.h
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     6
--- a/src/include/microhttpd.h	Thu Dec 18 21:16:20 2014 +0100
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     7
+++ b/src/include/microhttpd.h	Thu Dec 18 21:49:28 2014 +0100
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     8
@@ -2477,6 +2477,21 @@
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
     9
 _MHD_EXTERN int
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    10
 MHD_is_feature_supported(enum MHD_FEATURE feature);
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    11
 
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    12
+/**
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    13
+ * Process escape sequences ('+'=space, %HH) Updates val in place; the
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    14
+ * result should be UTF-8 encoded and cannot be larger than the input.
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    15
+ * The result must also still be 0-terminated.
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    16
+ *
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    17
+ * @param cls closure (use NULL)
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    18
+ * @param connection handle to connection, not used
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    19
+ * @param val value to unescape (modified in the process)
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    20
+ * @return length of the resulting val (strlen(val) maybe
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    21
+ *  shorter afterwards due to elimination of escape sequences)
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    22
+ */
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    23
+size_t
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    24
+MHD_http_unescape (void *cls,
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    25
+		   struct MHD_Connection *connection,
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    26
+		   char *val);
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    27
 
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    28
 #if 0                           /* keep Emacsens' auto-indent happy */
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    29
 {
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    30
diff -r dcb95cb7b865 -r efe4a6fcacd1 src/microhttpd/internal.h
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    31
--- a/src/microhttpd/internal.h	Thu Dec 18 21:16:20 2014 +0100
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    32
+++ b/src/microhttpd/internal.h	Thu Dec 18 21:49:28 2014 +0100
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    33
@@ -200,23 +200,6 @@
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    34
 #endif
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    35
 
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    36
 /**
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    37
- * Process escape sequences ('+'=space, %HH) Updates val in place; the
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    38
- * result should be UTF-8 encoded and cannot be larger than the input.
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    39
- * The result must also still be 0-terminated.
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    40
- *
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    41
- * @param cls closure (use NULL)
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    42
- * @param connection handle to connection, not used
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    43
- * @param val value to unescape (modified in the process)
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    44
- * @return length of the resulting val (strlen(val) maybe
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    45
- *  shorter afterwards due to elimination of escape sequences)
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    46
- */
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    47
-size_t
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    48
-MHD_http_unescape (void *cls,
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    49
-		   struct MHD_Connection *connection,
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    50
-		   char *val);
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    51
-
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    52
-
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    53
-/**
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    54
  * Header or cookie in HTTP request or response.
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    55
  */
19e0324097d4 PSARC/2014/289 libmicrohttpd
Tomas Heran <tomas.heran@oracle.com>
parents:
diff changeset
    56
 struct MHD_HTTP_Header