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