diff options
Diffstat (limited to 'src/include/microhttpd2.h')
-rw-r--r-- | src/include/microhttpd2.h | 488 |
1 files changed, 257 insertions, 231 deletions
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h index 710115d1..9716573c 100644 --- a/src/include/microhttpd2.h +++ b/src/include/microhttpd2.h | |||
@@ -99,9 +99,9 @@ extern "C" | |||
99 | #include <stdarg.h> | 99 | #include <stdarg.h> |
100 | #include <stdint.h> | 100 | #include <stdint.h> |
101 | #include <sys/types.h> | 101 | #include <sys/types.h> |
102 | #if defined(_WIN32) && !defined(__CYGWIN__) | 102 | #if defined(_WIN32) && ! defined(__CYGWIN__) |
103 | #include <ws2tcpip.h> | 103 | #include <ws2tcpip.h> |
104 | #if defined(_MSC_FULL_VER) && !defined (_SSIZE_T_DEFINED) | 104 | #if defined(_MSC_FULL_VER) && ! defined (_SSIZE_T_DEFINED) |
105 | #define _SSIZE_T_DEFINED | 105 | #define _SSIZE_T_DEFINED |
106 | typedef intptr_t ssize_t; | 106 | typedef intptr_t ssize_t; |
107 | #endif /* !_SSIZE_T_DEFINED */ | 107 | #endif /* !_SSIZE_T_DEFINED */ |
@@ -112,7 +112,7 @@ typedef intptr_t ssize_t; | |||
112 | #endif | 112 | #endif |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | #if defined(__CYGWIN__) && !defined(_SYS_TYPES_FD_SET) | 115 | #if defined(__CYGWIN__) && ! defined(_SYS_TYPES_FD_SET) |
116 | /* Do not define __USE_W32_SOCKETS under Cygwin! */ | 116 | /* Do not define __USE_W32_SOCKETS under Cygwin! */ |
117 | #error Cygwin with winsock fd_set is not supported | 117 | #error Cygwin with winsock fd_set is not supported |
118 | #endif | 118 | #endif |
@@ -179,7 +179,7 @@ enum MHD_Bool | |||
179 | /** | 179 | /** |
180 | * MHD_socket is type for socket FDs | 180 | * MHD_socket is type for socket FDs |
181 | */ | 181 | */ |
182 | #if !defined(_WIN32) || defined(_SYS_TYPES_FD_SET) | 182 | #if ! defined(_WIN32) || defined(_SYS_TYPES_FD_SET) |
183 | #define MHD_POSIX_SOCKETS 1 | 183 | #define MHD_POSIX_SOCKETS 1 |
184 | typedef int MHD_socket; | 184 | typedef int MHD_socket; |
185 | #define MHD_INVALID_SOCKET (-1) | 185 | #define MHD_INVALID_SOCKET (-1) |
@@ -204,30 +204,35 @@ typedef SOCKET MHD_socket; | |||
204 | #endif /* MHD_NO_DEPRECATION */ | 204 | #endif /* MHD_NO_DEPRECATION */ |
205 | 205 | ||
206 | #ifndef _MHD_DEPR_MACRO | 206 | #ifndef _MHD_DEPR_MACRO |
207 | #if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1500 | 207 | #if defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1500 |
208 | /* VS 2008 or later */ | 208 | /* VS 2008 or later */ |
209 | /* Stringify macros */ | 209 | /* Stringify macros */ |
210 | #define _MHD_INSTRMACRO(a) #a | 210 | #define _MHD_INSTRMACRO(a) #a |
211 | #define _MHD_STRMACRO(a) _MHD_INSTRMACRO(a) | 211 | #define _MHD_STRMACRO(a) _MHD_INSTRMACRO (a) |
212 | /* deprecation message */ | 212 | /* deprecation message */ |
213 | #define _MHD_DEPR_MACRO(msg) __pragma(message(__FILE__ "(" _MHD_STRMACRO(__LINE__)"): warning: " msg)) | 213 | #define _MHD_DEPR_MACRO(msg) __pragma (message (__FILE__ "(" _MHD_STRMACRO ( \ |
214 | #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg) | 214 | __LINE__) "): warning: " msg)) |
215 | #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg) | ||
215 | #elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__) | 216 | #elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__) |
216 | /* clang or GCC since 3.0 */ | 217 | /* clang or GCC since 3.0 */ |
217 | #define _MHD_GCC_PRAG(x) _Pragma (#x) | 218 | #define _MHD_GCC_PRAG(x) _Pragma (#x) |
218 | #if (defined(__clang__) && (__clang_major__+0 >= 5 || \ | 219 | #if (defined(__clang__) && (__clang_major__ + 0 >= 5 || \ |
219 | (!defined(__apple_build_version__) && (__clang_major__+0 > 3 || (__clang_major__+0 == 3 && __clang_minor__ >= 3))))) || \ | 220 | (! defined(__apple_build_version__) && \ |
220 | __GNUC__+0 > 4 || (__GNUC__+0 == 4 && __GNUC_MINOR__+0 >= 8) | 221 | (__clang_major__ + 0 > 3 || (__clang_major__ + 0 == 3 && __clang_minor__ >= \ |
222 | 3))))) || \ | ||
223 | __GNUC__ + 0 > 4 || (__GNUC__ + 0 == 4 && __GNUC_MINOR__ + 0 >= 8) | ||
221 | /* clang >= 3.3 (or XCode's clang >= 5.0) or | 224 | /* clang >= 3.3 (or XCode's clang >= 5.0) or |
222 | GCC >= 4.8 */ | 225 | GCC >= 4.8 */ |
223 | #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(GCC warning msg) | 226 | #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG (GCC warning msg) |
224 | #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg) | 227 | #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg) |
225 | #else /* older clang or GCC */ | 228 | #else /* older clang or GCC */ |
226 | /* clang < 3.3, XCode's clang < 5.0, 3.0 <= GCC < 4.8 */ | 229 | /* clang < 3.3, XCode's clang < 5.0, 3.0 <= GCC < 4.8 */ |
227 | #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(message msg) | 230 | #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG (message msg) |
228 | #if (defined(__clang__) && (__clang_major__+0 > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 9))) /* FIXME: clang >= 2.9, earlier versions not tested */ | 231 | #if (defined(__clang__) && (__clang_major__ + 0 > 2 || (__clang_major__ + 0 == \ |
232 | 2 && __clang_minor__ >= \ | ||
233 | 9))) /* FIXME: clang >= 2.9, earlier versions not tested */ | ||
229 | /* clang handles inline pragmas better than GCC */ | 234 | /* clang handles inline pragmas better than GCC */ |
230 | #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg) | 235 | #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg) |
231 | #endif /* clang >= 2.9 */ | 236 | #endif /* clang >= 2.9 */ |
232 | #endif /* older clang or GCC */ | 237 | #endif /* older clang or GCC */ |
233 | /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */ | 238 | /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */ |
@@ -244,17 +249,19 @@ typedef SOCKET MHD_socket; | |||
244 | #endif /* !_MHD_DEPR_IN_MACRO */ | 249 | #endif /* !_MHD_DEPR_IN_MACRO */ |
245 | 250 | ||
246 | #ifndef _MHD_DEPR_FUNC | 251 | #ifndef _MHD_DEPR_FUNC |
247 | #if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1400 | 252 | #if defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1400 |
248 | /* VS 2005 or later */ | 253 | /* VS 2005 or later */ |
249 | #define _MHD_DEPR_FUNC(msg) __declspec(deprecated(msg)) | 254 | #define _MHD_DEPR_FUNC(msg) __declspec(deprecated (msg)) |
250 | #elif defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1310 | 255 | #elif defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1310 |
251 | /* VS .NET 2003 deprecation do not support custom messages */ | 256 | /* VS .NET 2003 deprecation do not support custom messages */ |
252 | #define _MHD_DEPR_FUNC(msg) __declspec(deprecated) | 257 | #define _MHD_DEPR_FUNC(msg) __declspec(deprecated) |
253 | #elif (__GNUC__+0 >= 5) || (defined (__clang__) && \ | 258 | #elif (__GNUC__ + 0 >= 5) || (defined (__clang__) && \ |
254 | (__clang_major__+0 > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 9))) /* FIXME: earlier versions not tested */ | 259 | (__clang_major__ + 0 > 2 || (__clang_major__ + 0 == 2 && __clang_minor__ >= \ |
260 | 9))) /* FIXME: earlier versions not tested */ | ||
255 | /* GCC >= 5.0 or clang >= 2.9 */ | 261 | /* GCC >= 5.0 or clang >= 2.9 */ |
256 | #define _MHD_DEPR_FUNC(msg) __attribute__((deprecated(msg))) | 262 | #define _MHD_DEPR_FUNC(msg) __attribute__((deprecated (msg))) |
257 | #elif defined (__clang__) || __GNUC__+0 > 3 || (__GNUC__+0 == 3 && __GNUC_MINOR__+0 >= 1) | 263 | #elif defined (__clang__) || __GNUC__ + 0 > 3 || (__GNUC__ + 0 == 3 && \ |
264 | __GNUC_MINOR__ + 0 >= 1) | ||
258 | /* 3.1 <= GCC < 5.0 or clang < 2.9 */ | 265 | /* 3.1 <= GCC < 5.0 or clang < 2.9 */ |
259 | /* old GCC-style deprecation do not support custom messages */ | 266 | /* old GCC-style deprecation do not support custom messages */ |
260 | #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__)) | 267 | #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__)) |
@@ -277,7 +284,7 @@ typedef SOCKET MHD_socket; | |||
277 | #if defined(__CYGWIN__) || defined(_WIN32) || defined(MHD_W32LIB) | 284 | #if defined(__CYGWIN__) || defined(_WIN32) || defined(MHD_W32LIB) |
278 | #define MHD_NONNULL(...) /* empty */ | 285 | #define MHD_NONNULL(...) /* empty */ |
279 | #else | 286 | #else |
280 | #define MHD_NONNULL(...) __THROW __nonnull((__VA_ARGS__)) | 287 | #define MHD_NONNULL(...) __THROW __nonnull ((__VA_ARGS__)) |
281 | #endif | 288 | #endif |
282 | 289 | ||
283 | /** | 290 | /** |
@@ -1110,8 +1117,8 @@ enum MHD_Method | |||
1110 | */ | 1117 | */ |
1111 | MHD_METHOD_VERSION_CONTROL = 38 | 1118 | MHD_METHOD_VERSION_CONTROL = 38 |
1112 | 1119 | ||
1113 | /* For more, check: | 1120 | /* For more, check: |
1114 | https://www.iana.org/assignments/http-methods/http-methods.xhtml */ | 1121 | https://www.iana.org/assignments/http-methods/http-methods.xhtml */ |
1115 | 1122 | ||
1116 | }; | 1123 | }; |
1117 | 1124 | ||
@@ -1123,7 +1130,8 @@ enum MHD_Method | |||
1123 | * See also: http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4 | 1130 | * See also: http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4 |
1124 | * @{ | 1131 | * @{ |
1125 | */ | 1132 | */ |
1126 | #define MHD_HTTP_POST_ENCODING_FORM_URLENCODED "application/x-www-form-urlencoded" | 1133 | #define MHD_HTTP_POST_ENCODING_FORM_URLENCODED \ |
1134 | "application/x-www-form-urlencoded" | ||
1127 | #define MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data" | 1135 | #define MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data" |
1128 | 1136 | ||
1129 | /** @} */ /* end of group postenc */ | 1137 | /** @} */ /* end of group postenc */ |
@@ -1386,7 +1394,8 @@ enum MHD_Method | |||
1386 | /* Standard. RFC7469 */ | 1394 | /* Standard. RFC7469 */ |
1387 | #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS "Public-Key-Pins" | 1395 | #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS "Public-Key-Pins" |
1388 | /* Standard. RFC7469 */ | 1396 | /* Standard. RFC7469 */ |
1389 | #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS_REPORT_ONLY "Public-Key-Pins-Report-Only" | 1397 | #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS_REPORT_ONLY \ |
1398 | "Public-Key-Pins-Report-Only" | ||
1390 | /* No category. RFC4437 */ | 1399 | /* No category. RFC4437 */ |
1391 | #define MHD_HTTP_HEADER_REDIRECT_REF "Redirect-Ref" | 1400 | #define MHD_HTTP_HEADER_REDIRECT_REF "Redirect-Ref" |
1392 | /* No category. RFC4229 */ | 1401 | /* No category. RFC4229 */ |
@@ -1445,7 +1454,8 @@ enum MHD_Method | |||
1445 | #define MHD_HTTP_HEADER_X_FRAME_OPTIONS "X-Frame-Options" | 1454 | #define MHD_HTTP_HEADER_X_FRAME_OPTIONS "X-Frame-Options" |
1446 | 1455 | ||
1447 | /* Some provisional headers. */ | 1456 | /* Some provisional headers. */ |
1448 | #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN "Access-Control-Allow-Origin" | 1457 | #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN \ |
1458 | "Access-Control-Allow-Origin" | ||
1449 | /** @} */ /* end of group headers */ | 1459 | /** @} */ /* end of group headers */ |
1450 | 1460 | ||
1451 | 1461 | ||
@@ -1468,9 +1478,9 @@ enum MHD_Method | |||
1468 | */ | 1478 | */ |
1469 | typedef const struct MHD_Action * | 1479 | typedef const struct MHD_Action * |
1470 | (*MHD_RequestCallback) (void *cls, | 1480 | (*MHD_RequestCallback) (void *cls, |
1471 | struct MHD_Request *request, | 1481 | struct MHD_Request *request, |
1472 | const char *url, | 1482 | const char *url, |
1473 | enum MHD_Method method); | 1483 | enum MHD_Method method); |
1474 | 1484 | ||
1475 | 1485 | ||
1476 | /** | 1486 | /** |
@@ -1484,8 +1494,8 @@ typedef const struct MHD_Action * | |||
1484 | */ | 1494 | */ |
1485 | _MHD_EXTERN struct MHD_Daemon * | 1495 | _MHD_EXTERN struct MHD_Daemon * |
1486 | MHD_daemon_create (MHD_RequestCallback cb, | 1496 | MHD_daemon_create (MHD_RequestCallback cb, |
1487 | void *cb_cls) | 1497 | void *cb_cls) |
1488 | MHD_NONNULL(1); | 1498 | MHD_NONNULL (1); |
1489 | 1499 | ||
1490 | 1500 | ||
1491 | /** | 1501 | /** |
@@ -1498,7 +1508,7 @@ MHD_daemon_create (MHD_RequestCallback cb, | |||
1498 | */ | 1508 | */ |
1499 | _MHD_EXTERN enum MHD_StatusCode | 1509 | _MHD_EXTERN enum MHD_StatusCode |
1500 | MHD_daemon_start (struct MHD_Daemon *daemon) | 1510 | MHD_daemon_start (struct MHD_Daemon *daemon) |
1501 | MHD_NONNULL(1); | 1511 | MHD_NONNULL (1); |
1502 | 1512 | ||
1503 | 1513 | ||
1504 | /** | 1514 | /** |
@@ -1523,7 +1533,7 @@ MHD_daemon_start (struct MHD_Daemon *daemon) | |||
1523 | */ | 1533 | */ |
1524 | _MHD_EXTERN MHD_socket | 1534 | _MHD_EXTERN MHD_socket |
1525 | MHD_daemon_quiesce (struct MHD_Daemon *daemon) | 1535 | MHD_daemon_quiesce (struct MHD_Daemon *daemon) |
1526 | MHD_NONNULL(1); | 1536 | MHD_NONNULL (1); |
1527 | 1537 | ||
1528 | 1538 | ||
1529 | /** | 1539 | /** |
@@ -1534,7 +1544,7 @@ MHD_daemon_quiesce (struct MHD_Daemon *daemon) | |||
1534 | */ | 1544 | */ |
1535 | _MHD_EXTERN void | 1545 | _MHD_EXTERN void |
1536 | MHD_daemon_destroy (struct MHD_Daemon *daemon) | 1546 | MHD_daemon_destroy (struct MHD_Daemon *daemon) |
1537 | MHD_NONNULL(1); | 1547 | MHD_NONNULL (1); |
1538 | 1548 | ||
1539 | 1549 | ||
1540 | /** | 1550 | /** |
@@ -1564,10 +1574,10 @@ MHD_daemon_destroy (struct MHD_Daemon *daemon) | |||
1564 | */ | 1574 | */ |
1565 | _MHD_EXTERN enum MHD_StatusCode | 1575 | _MHD_EXTERN enum MHD_StatusCode |
1566 | MHD_daemon_add_connection (struct MHD_Daemon *daemon, | 1576 | MHD_daemon_add_connection (struct MHD_Daemon *daemon, |
1567 | MHD_socket client_socket, | 1577 | MHD_socket client_socket, |
1568 | const struct sockaddr *addr, | 1578 | const struct sockaddr *addr, |
1569 | socklen_t addrlen) | 1579 | socklen_t addrlen) |
1570 | MHD_NONNULL(1); | 1580 | MHD_NONNULL (1); |
1571 | 1581 | ||
1572 | 1582 | ||
1573 | /** | 1583 | /** |
@@ -1596,11 +1606,11 @@ MHD_daemon_add_connection (struct MHD_Daemon *daemon, | |||
1596 | */ | 1606 | */ |
1597 | _MHD_EXTERN enum MHD_StatusCode | 1607 | _MHD_EXTERN enum MHD_StatusCode |
1598 | MHD_daemon_get_fdset (struct MHD_Daemon *daemon, | 1608 | MHD_daemon_get_fdset (struct MHD_Daemon *daemon, |
1599 | fd_set *read_fd_set, | 1609 | fd_set *read_fd_set, |
1600 | fd_set *write_fd_set, | 1610 | fd_set *write_fd_set, |
1601 | fd_set *except_fd_set, | 1611 | fd_set *except_fd_set, |
1602 | MHD_socket *max_fd) | 1612 | MHD_socket *max_fd) |
1603 | MHD_NONNULL(1,2,3,4); | 1613 | MHD_NONNULL (1,2,3,4); |
1604 | 1614 | ||
1605 | 1615 | ||
1606 | /** | 1616 | /** |
@@ -1632,12 +1642,12 @@ MHD_daemon_get_fdset (struct MHD_Daemon *daemon, | |||
1632 | */ | 1642 | */ |
1633 | _MHD_EXTERN enum MHD_StatusCode | 1643 | _MHD_EXTERN enum MHD_StatusCode |
1634 | MHD_daemon_get_fdset2 (struct MHD_Daemon *daemon, | 1644 | MHD_daemon_get_fdset2 (struct MHD_Daemon *daemon, |
1635 | fd_set *read_fd_set, | 1645 | fd_set *read_fd_set, |
1636 | fd_set *write_fd_set, | 1646 | fd_set *write_fd_set, |
1637 | fd_set *except_fd_set, | 1647 | fd_set *except_fd_set, |
1638 | MHD_socket *max_fd, | 1648 | MHD_socket *max_fd, |
1639 | unsigned int fd_setsize) | 1649 | unsigned int fd_setsize) |
1640 | MHD_NONNULL(1,2,3,4); | 1650 | MHD_NONNULL (1,2,3,4); |
1641 | 1651 | ||
1642 | 1652 | ||
1643 | /** | 1653 | /** |
@@ -1662,8 +1672,10 @@ MHD_daemon_get_fdset2 (struct MHD_Daemon *daemon, | |||
1662 | * fit fd_set. | 1672 | * fit fd_set. |
1663 | * @ingroup event | 1673 | * @ingroup event |
1664 | */ | 1674 | */ |
1665 | #define MHD_daemon_get_fdset(daemon,read_fd_set,write_fd_set,except_fd_set,max_fd) \ | 1675 | #define MHD_daemon_get_fdset(daemon,read_fd_set,write_fd_set,except_fd_set, \ |
1666 | MHD_get_fdset2((daemon),(read_fd_set),(write_fd_set),(except_fd_set),(max_fd),FD_SETSIZE) | 1676 | max_fd) \ |
1677 | MHD_get_fdset2 ((daemon),(read_fd_set),(write_fd_set),(except_fd_set), \ | ||
1678 | (max_fd),FD_SETSIZE) | ||
1667 | 1679 | ||
1668 | 1680 | ||
1669 | /** | 1681 | /** |
@@ -1687,8 +1699,8 @@ MHD_daemon_get_fdset2 (struct MHD_Daemon *daemon, | |||
1687 | */ | 1699 | */ |
1688 | _MHD_EXTERN enum MHD_StatusCode | 1700 | _MHD_EXTERN enum MHD_StatusCode |
1689 | MHD_daemon_get_timeout (struct MHD_Daemon *daemon, | 1701 | MHD_daemon_get_timeout (struct MHD_Daemon *daemon, |
1690 | MHD_UNSIGNED_LONG_LONG *timeout) | 1702 | MHD_UNSIGNED_LONG_LONG *timeout) |
1691 | MHD_NONNULL(1,2); | 1703 | MHD_NONNULL (1,2); |
1692 | 1704 | ||
1693 | 1705 | ||
1694 | /** | 1706 | /** |
@@ -1711,7 +1723,7 @@ MHD_daemon_get_timeout (struct MHD_Daemon *daemon, | |||
1711 | */ | 1723 | */ |
1712 | _MHD_EXTERN enum MHD_StatusCode | 1724 | _MHD_EXTERN enum MHD_StatusCode |
1713 | MHD_daemon_run (struct MHD_Daemon *daemon) | 1725 | MHD_daemon_run (struct MHD_Daemon *daemon) |
1714 | MHD_NONNULL(1); | 1726 | MHD_NONNULL (1); |
1715 | 1727 | ||
1716 | 1728 | ||
1717 | /** | 1729 | /** |
@@ -1738,10 +1750,10 @@ MHD_daemon_run (struct MHD_Daemon *daemon) | |||
1738 | */ | 1750 | */ |
1739 | _MHD_EXTERN enum MHD_StatusCode | 1751 | _MHD_EXTERN enum MHD_StatusCode |
1740 | MHD_daemon_run_from_select (struct MHD_Daemon *daemon, | 1752 | MHD_daemon_run_from_select (struct MHD_Daemon *daemon, |
1741 | const fd_set *read_fd_set, | 1753 | const fd_set *read_fd_set, |
1742 | const fd_set *write_fd_set, | 1754 | const fd_set *write_fd_set, |
1743 | const fd_set *except_fd_set) | 1755 | const fd_set *except_fd_set) |
1744 | MHD_NONNULL(1,2,3,4); | 1756 | MHD_NONNULL (1,2,3,4); |
1745 | 1757 | ||
1746 | 1758 | ||
1747 | /* ********************* daemon options ************** */ | 1759 | /* ********************* daemon options ************** */ |
@@ -1758,9 +1770,9 @@ MHD_daemon_run_from_select (struct MHD_Daemon *daemon, | |||
1758 | */ | 1770 | */ |
1759 | typedef void | 1771 | typedef void |
1760 | (*MHD_LoggingCallback)(void *cls, | 1772 | (*MHD_LoggingCallback)(void *cls, |
1761 | enum MHD_StatusCode sc, | 1773 | enum MHD_StatusCode sc, |
1762 | const char *fm, | 1774 | const char *fm, |
1763 | va_list ap); | 1775 | va_list ap); |
1764 | 1776 | ||
1765 | 1777 | ||
1766 | /** | 1778 | /** |
@@ -1774,9 +1786,9 @@ typedef void | |||
1774 | */ | 1786 | */ |
1775 | _MHD_EXTERN void | 1787 | _MHD_EXTERN void |
1776 | MHD_daemon_set_logger (struct MHD_Daemon *daemon, | 1788 | MHD_daemon_set_logger (struct MHD_Daemon *daemon, |
1777 | MHD_LoggingCallback logger, | 1789 | MHD_LoggingCallback logger, |
1778 | void *logger_cls) | 1790 | void *logger_cls) |
1779 | MHD_NONNULL(1); | 1791 | MHD_NONNULL (1); |
1780 | 1792 | ||
1781 | 1793 | ||
1782 | /** | 1794 | /** |
@@ -1784,7 +1796,8 @@ MHD_daemon_set_logger (struct MHD_Daemon *daemon, | |||
1784 | * | 1796 | * |
1785 | * @param daemon which instance to disable logging for | 1797 | * @param daemon which instance to disable logging for |
1786 | */ | 1798 | */ |
1787 | #define MHD_daemon_disable_logging(daemon) MHD_daemon_set_logger (daemon, NULL, NULL) | 1799 | #define MHD_daemon_disable_logging(daemon) MHD_daemon_set_logger (daemon, NULL, \ |
1800 | NULL) | ||
1788 | 1801 | ||
1789 | 1802 | ||
1790 | /** | 1803 | /** |
@@ -1794,7 +1807,7 @@ MHD_daemon_set_logger (struct MHD_Daemon *daemon, | |||
1794 | */ | 1807 | */ |
1795 | _MHD_EXTERN void | 1808 | _MHD_EXTERN void |
1796 | MHD_daemon_suppress_date_no_clock (struct MHD_Daemon *daemon) | 1809 | MHD_daemon_suppress_date_no_clock (struct MHD_Daemon *daemon) |
1797 | MHD_NONNULL(1); | 1810 | MHD_NONNULL (1); |
1798 | 1811 | ||
1799 | 1812 | ||
1800 | /** | 1813 | /** |
@@ -1816,7 +1829,7 @@ MHD_daemon_suppress_date_no_clock (struct MHD_Daemon *daemon) | |||
1816 | */ | 1829 | */ |
1817 | _MHD_EXTERN void | 1830 | _MHD_EXTERN void |
1818 | MHD_daemon_disable_itc (struct MHD_Daemon *daemon) | 1831 | MHD_daemon_disable_itc (struct MHD_Daemon *daemon) |
1819 | MHD_NONNULL(1); | 1832 | MHD_NONNULL (1); |
1820 | 1833 | ||
1821 | 1834 | ||
1822 | /** | 1835 | /** |
@@ -1829,7 +1842,7 @@ MHD_daemon_disable_itc (struct MHD_Daemon *daemon) | |||
1829 | */ | 1842 | */ |
1830 | _MHD_EXTERN void | 1843 | _MHD_EXTERN void |
1831 | MHD_daemon_enable_turbo (struct MHD_Daemon *daemon) | 1844 | MHD_daemon_enable_turbo (struct MHD_Daemon *daemon) |
1832 | MHD_NONNULL(1); | 1845 | MHD_NONNULL (1); |
1833 | 1846 | ||
1834 | 1847 | ||
1835 | /** | 1848 | /** |
@@ -1843,7 +1856,7 @@ MHD_daemon_enable_turbo (struct MHD_Daemon *daemon) | |||
1843 | */ | 1856 | */ |
1844 | _MHD_EXTERN void | 1857 | _MHD_EXTERN void |
1845 | MHD_daemon_disallow_suspend_resume (struct MHD_Daemon *daemon) | 1858 | MHD_daemon_disallow_suspend_resume (struct MHD_Daemon *daemon) |
1846 | MHD_NONNULL(1); | 1859 | MHD_NONNULL (1); |
1847 | 1860 | ||
1848 | 1861 | ||
1849 | /** | 1862 | /** |
@@ -1859,7 +1872,7 @@ MHD_daemon_disallow_suspend_resume (struct MHD_Daemon *daemon) | |||
1859 | */ | 1872 | */ |
1860 | _MHD_EXTERN void | 1873 | _MHD_EXTERN void |
1861 | MHD_daemon_disallow_upgrade (struct MHD_Daemon *daemon) | 1874 | MHD_daemon_disallow_upgrade (struct MHD_Daemon *daemon) |
1862 | MHD_NONNULL(1); | 1875 | MHD_NONNULL (1); |
1863 | 1876 | ||
1864 | 1877 | ||
1865 | /** | 1878 | /** |
@@ -1904,9 +1917,9 @@ enum MHD_FastOpenMethod | |||
1904 | */ | 1917 | */ |
1905 | _MHD_EXTERN enum MHD_Bool | 1918 | _MHD_EXTERN enum MHD_Bool |
1906 | MHD_daemon_tcp_fastopen (struct MHD_Daemon *daemon, | 1919 | MHD_daemon_tcp_fastopen (struct MHD_Daemon *daemon, |
1907 | enum MHD_FastOpenMethod fom, | 1920 | enum MHD_FastOpenMethod fom, |
1908 | unsigned int queue_length) | 1921 | unsigned int queue_length) |
1909 | MHD_NONNULL(1); | 1922 | MHD_NONNULL (1); |
1910 | 1923 | ||
1911 | 1924 | ||
1912 | /** | 1925 | /** |
@@ -1958,9 +1971,9 @@ enum MHD_AddressFamily | |||
1958 | */ | 1971 | */ |
1959 | _MHD_EXTERN void | 1972 | _MHD_EXTERN void |
1960 | MHD_daemon_bind_port (struct MHD_Daemon *daemon, | 1973 | MHD_daemon_bind_port (struct MHD_Daemon *daemon, |
1961 | enum MHD_AddressFamily af, | 1974 | enum MHD_AddressFamily af, |
1962 | uint16_t port) | 1975 | uint16_t port) |
1963 | MHD_NONNULL(1); | 1976 | MHD_NONNULL (1); |
1964 | 1977 | ||
1965 | 1978 | ||
1966 | /** | 1979 | /** |
@@ -1974,9 +1987,9 @@ MHD_daemon_bind_port (struct MHD_Daemon *daemon, | |||
1974 | */ | 1987 | */ |
1975 | _MHD_EXTERN void | 1988 | _MHD_EXTERN void |
1976 | MHD_daemon_bind_socket_address (struct MHD_Daemon *daemon, | 1989 | MHD_daemon_bind_socket_address (struct MHD_Daemon *daemon, |
1977 | const struct sockaddr *sa, | 1990 | const struct sockaddr *sa, |
1978 | size_t sa_len) | 1991 | size_t sa_len) |
1979 | MHD_NONNULL(1); | 1992 | MHD_NONNULL (1); |
1980 | 1993 | ||
1981 | 1994 | ||
1982 | /** | 1995 | /** |
@@ -1988,8 +2001,8 @@ MHD_daemon_bind_socket_address (struct MHD_Daemon *daemon, | |||
1988 | */ | 2001 | */ |
1989 | _MHD_EXTERN void | 2002 | _MHD_EXTERN void |
1990 | MHD_daemon_listen_backlog (struct MHD_Daemon *daemon, | 2003 | MHD_daemon_listen_backlog (struct MHD_Daemon *daemon, |
1991 | int listen_backlog) | 2004 | int listen_backlog) |
1992 | MHD_NONNULL(1); | 2005 | MHD_NONNULL (1); |
1993 | 2006 | ||
1994 | 2007 | ||
1995 | /** | 2008 | /** |
@@ -2004,7 +2017,7 @@ MHD_daemon_listen_backlog (struct MHD_Daemon *daemon, | |||
2004 | */ | 2017 | */ |
2005 | _MHD_EXTERN void | 2018 | _MHD_EXTERN void |
2006 | MHD_daemon_listen_allow_address_reuse (struct MHD_Daemon *daemon) | 2019 | MHD_daemon_listen_allow_address_reuse (struct MHD_Daemon *daemon) |
2007 | MHD_NONNULL(1); | 2020 | MHD_NONNULL (1); |
2008 | 2021 | ||
2009 | 2022 | ||
2010 | /** | 2023 | /** |
@@ -2023,8 +2036,8 @@ MHD_daemon_listen_allow_address_reuse (struct MHD_Daemon *daemon) | |||
2023 | */ | 2036 | */ |
2024 | _MHD_EXTERN void | 2037 | _MHD_EXTERN void |
2025 | MHD_daemon_listen_socket (struct MHD_Daemon *daemon, | 2038 | MHD_daemon_listen_socket (struct MHD_Daemon *daemon, |
2026 | MHD_socket listen_socket) | 2039 | MHD_socket listen_socket) |
2027 | MHD_NONNULL(1); | 2040 | MHD_NONNULL (1); |
2028 | 2041 | ||
2029 | 2042 | ||
2030 | /** | 2043 | /** |
@@ -2064,8 +2077,8 @@ enum MHD_EventLoopSyscall | |||
2064 | */ | 2077 | */ |
2065 | _MHD_EXTERN enum MHD_Bool | 2078 | _MHD_EXTERN enum MHD_Bool |
2066 | MHD_daemon_event_loop (struct MHD_Daemon *daemon, | 2079 | MHD_daemon_event_loop (struct MHD_Daemon *daemon, |
2067 | enum MHD_EventLoopSyscall els) | 2080 | enum MHD_EventLoopSyscall els) |
2068 | MHD_NONNULL(1); | 2081 | MHD_NONNULL (1); |
2069 | 2082 | ||
2070 | 2083 | ||
2071 | /** | 2084 | /** |
@@ -2109,8 +2122,8 @@ enum MHD_ProtocolStrictLevel | |||
2109 | */ | 2122 | */ |
2110 | _MHD_EXTERN void | 2123 | _MHD_EXTERN void |
2111 | MHD_daemon_protocol_strict_level (struct MHD_Daemon *daemon, | 2124 | MHD_daemon_protocol_strict_level (struct MHD_Daemon *daemon, |
2112 | enum MHD_ProtocolStrictLevel sl) | 2125 | enum MHD_ProtocolStrictLevel sl) |
2113 | MHD_NONNULL(1); | 2126 | MHD_NONNULL (1); |
2114 | 2127 | ||
2115 | 2128 | ||
2116 | /** | 2129 | /** |
@@ -2121,7 +2134,7 @@ MHD_daemon_protocol_strict_level (struct MHD_Daemon *daemon, | |||
2121 | */ | 2134 | */ |
2122 | _MHD_EXTERN void | 2135 | _MHD_EXTERN void |
2123 | MHD_daemon_enable_shoutcast (struct MHD_Daemon *daemon) | 2136 | MHD_daemon_enable_shoutcast (struct MHD_Daemon *daemon) |
2124 | MHD_NONNULL(1); | 2137 | MHD_NONNULL (1); |
2125 | 2138 | ||
2126 | 2139 | ||
2127 | /** | 2140 | /** |
@@ -2141,9 +2154,9 @@ MHD_daemon_enable_shoutcast (struct MHD_Daemon *daemon) | |||
2141 | */ | 2154 | */ |
2142 | _MHD_EXTERN enum MHD_StatusCode | 2155 | _MHD_EXTERN enum MHD_StatusCode |
2143 | MHD_daemon_set_tls_backend (struct MHD_Daemon *daemon, | 2156 | MHD_daemon_set_tls_backend (struct MHD_Daemon *daemon, |
2144 | const char *tls_backend, | 2157 | const char *tls_backend, |
2145 | const char *ciphers) | 2158 | const char *ciphers) |
2146 | MHD_NONNULL(1); | 2159 | MHD_NONNULL (1); |
2147 | 2160 | ||
2148 | 2161 | ||
2149 | /** | 2162 | /** |
@@ -2160,10 +2173,10 @@ MHD_daemon_set_tls_backend (struct MHD_Daemon *daemon, | |||
2160 | */ | 2173 | */ |
2161 | _MHD_EXTERN enum MHD_StatusCode | 2174 | _MHD_EXTERN enum MHD_StatusCode |
2162 | MHD_daemon_tls_key_and_cert_from_memory (struct MHD_Daemon *daemon, | 2175 | MHD_daemon_tls_key_and_cert_from_memory (struct MHD_Daemon *daemon, |
2163 | const char *mem_key, | 2176 | const char *mem_key, |
2164 | const char *mem_cert, | 2177 | const char *mem_cert, |
2165 | const char *pass) | 2178 | const char *pass) |
2166 | MHD_NONNULL(1,2,3); | 2179 | MHD_NONNULL (1,2,3); |
2167 | 2180 | ||
2168 | 2181 | ||
2169 | /** | 2182 | /** |
@@ -2176,8 +2189,8 @@ MHD_daemon_tls_key_and_cert_from_memory (struct MHD_Daemon *daemon, | |||
2176 | */ | 2189 | */ |
2177 | _MHD_EXTERN enum MHD_StatusCode | 2190 | _MHD_EXTERN enum MHD_StatusCode |
2178 | MHD_daemon_tls_mem_dhparams (struct MHD_Daemon *daemon, | 2191 | MHD_daemon_tls_mem_dhparams (struct MHD_Daemon *daemon, |
2179 | const char *dh) | 2192 | const char *dh) |
2180 | MHD_NONNULL(1); | 2193 | MHD_NONNULL (1); |
2181 | 2194 | ||
2182 | 2195 | ||
2183 | /** | 2196 | /** |
@@ -2190,14 +2203,14 @@ MHD_daemon_tls_mem_dhparams (struct MHD_Daemon *daemon, | |||
2190 | * @param[out] psk to be set to the pre-shared-key; should be allocated with malloc(), | 2203 | * @param[out] psk to be set to the pre-shared-key; should be allocated with malloc(), |
2191 | * will be freed by MHD | 2204 | * will be freed by MHD |
2192 | * @param[out] psk_size to be set to the number of bytes in @a psk | 2205 | * @param[out] psk_size to be set to the number of bytes in @a psk |
2193 | * @return 0 on success, -1 on errors | 2206 | * @return 0 on success, -1 on errors |
2194 | */ | 2207 | */ |
2195 | typedef int | 2208 | typedef int |
2196 | (*MHD_PskServerCredentialsCallback)(void *cls, | 2209 | (*MHD_PskServerCredentialsCallback)(void *cls, |
2197 | const struct MHD_Connection *connection, | 2210 | const struct MHD_Connection *connection, |
2198 | const char *username, | 2211 | const char *username, |
2199 | void **psk, | 2212 | void **psk, |
2200 | size_t *psk_size); | 2213 | size_t *psk_size); |
2201 | 2214 | ||
2202 | 2215 | ||
2203 | /** | 2216 | /** |
@@ -2210,9 +2223,9 @@ typedef int | |||
2210 | */ | 2223 | */ |
2211 | _MHD_EXTERN enum MHD_StatusCode | 2224 | _MHD_EXTERN enum MHD_StatusCode |
2212 | MHD_daemon_set_tls_psk_callback (struct MHD_Daemon *daemon, | 2225 | MHD_daemon_set_tls_psk_callback (struct MHD_Daemon *daemon, |
2213 | MHD_PskServerCredentialsCallback psk_cb, | 2226 | MHD_PskServerCredentialsCallback psk_cb, |
2214 | void *psk_cb_cls) | 2227 | void *psk_cb_cls) |
2215 | MHD_NONNULL(1); | 2228 | MHD_NONNULL (1); |
2216 | 2229 | ||
2217 | 2230 | ||
2218 | /** | 2231 | /** |
@@ -2225,8 +2238,8 @@ MHD_daemon_set_tls_psk_callback (struct MHD_Daemon *daemon, | |||
2225 | */ | 2238 | */ |
2226 | _MHD_EXTERN enum MHD_StatusCode | 2239 | _MHD_EXTERN enum MHD_StatusCode |
2227 | MHD_daemon_tls_mem_trust (struct MHD_Daemon *daemon, | 2240 | MHD_daemon_tls_mem_trust (struct MHD_Daemon *daemon, |
2228 | const char *mem_trust) | 2241 | const char *mem_trust) |
2229 | MHD_NONNULL(1); | 2242 | MHD_NONNULL (1); |
2230 | 2243 | ||
2231 | 2244 | ||
2232 | /** | 2245 | /** |
@@ -2238,8 +2251,8 @@ MHD_daemon_tls_mem_trust (struct MHD_Daemon *daemon, | |||
2238 | */ | 2251 | */ |
2239 | _MHD_EXTERN enum MHD_StatusCode | 2252 | _MHD_EXTERN enum MHD_StatusCode |
2240 | MHD_daemon_gnutls_credentials (struct MHD_Daemon *daemon, | 2253 | MHD_daemon_gnutls_credentials (struct MHD_Daemon *daemon, |
2241 | int gnutls_credentials) | 2254 | int gnutls_credentials) |
2242 | MHD_NONNULL(1); | 2255 | MHD_NONNULL (1); |
2243 | 2256 | ||
2244 | 2257 | ||
2245 | /** | 2258 | /** |
@@ -2261,8 +2274,8 @@ MHD_daemon_gnutls_credentials (struct MHD_Daemon *daemon, | |||
2261 | */ | 2274 | */ |
2262 | _MHD_EXTERN enum MHD_StatusCode | 2275 | _MHD_EXTERN enum MHD_StatusCode |
2263 | MHD_daemon_gnutls_key_and_cert_from_callback (struct MHD_Daemon *daemon, | 2276 | MHD_daemon_gnutls_key_and_cert_from_callback (struct MHD_Daemon *daemon, |
2264 | void *cb) | 2277 | void *cb) |
2265 | MHD_NONNULL(1); | 2278 | MHD_NONNULL (1); |
2266 | 2279 | ||
2267 | 2280 | ||
2268 | /** | 2281 | /** |
@@ -2308,7 +2321,7 @@ enum MHD_ThreadingMode | |||
2308 | * | 2321 | * |
2309 | * @return an `enum MHD_ThreadingMode` for a thread pool of size @a n | 2322 | * @return an `enum MHD_ThreadingMode` for a thread pool of size @a n |
2310 | */ | 2323 | */ |
2311 | #define MHD_TM_THREAD_POOL(n) ((enum MHD_ThreadingMode)(n)) | 2324 | #define MHD_TM_THREAD_POOL(n) ((enum MHD_ThreadingMode) (n)) |
2312 | 2325 | ||
2313 | 2326 | ||
2314 | /** | 2327 | /** |
@@ -2320,8 +2333,8 @@ enum MHD_ThreadingMode | |||
2320 | */ | 2333 | */ |
2321 | _MHD_EXTERN void | 2334 | _MHD_EXTERN void |
2322 | MHD_daemon_threading_mode (struct MHD_Daemon *daemon, | 2335 | MHD_daemon_threading_mode (struct MHD_Daemon *daemon, |
2323 | enum MHD_ThreadingMode tm) | 2336 | enum MHD_ThreadingMode tm) |
2324 | MHD_NONNULL(1); | 2337 | MHD_NONNULL (1); |
2325 | 2338 | ||
2326 | 2339 | ||
2327 | /** | 2340 | /** |
@@ -2334,9 +2347,9 @@ MHD_daemon_threading_mode (struct MHD_Daemon *daemon, | |||
2334 | * @return #MHD_YES if connection is allowed, #MHD_NO if not | 2347 | * @return #MHD_YES if connection is allowed, #MHD_NO if not |
2335 | */ | 2348 | */ |
2336 | typedef enum MHD_Bool | 2349 | typedef enum MHD_Bool |
2337 | (*MHD_AcceptPolicyCallback) (void *cls, | 2350 | (*MHD_AcceptPolicyCallback)(void *cls, |
2338 | const struct sockaddr *addr, | 2351 | const struct sockaddr *addr, |
2339 | size_t addrlen); | 2352 | size_t addrlen); |
2340 | 2353 | ||
2341 | 2354 | ||
2342 | /** | 2355 | /** |
@@ -2350,9 +2363,9 @@ typedef enum MHD_Bool | |||
2350 | */ | 2363 | */ |
2351 | _MHD_EXTERN void | 2364 | _MHD_EXTERN void |
2352 | MHD_daemon_accept_policy (struct MHD_Daemon *daemon, | 2365 | MHD_daemon_accept_policy (struct MHD_Daemon *daemon, |
2353 | MHD_AcceptPolicyCallback apc, | 2366 | MHD_AcceptPolicyCallback apc, |
2354 | void *apc_cls) | 2367 | void *apc_cls) |
2355 | MHD_NONNULL(1); | 2368 | MHD_NONNULL (1); |
2356 | 2369 | ||
2357 | 2370 | ||
2358 | /** | 2371 | /** |
@@ -2367,8 +2380,8 @@ MHD_daemon_accept_policy (struct MHD_Daemon *daemon, | |||
2367 | */ | 2380 | */ |
2368 | typedef void * | 2381 | typedef void * |
2369 | (*MHD_EarlyUriLogCallback)(void *cls, | 2382 | (*MHD_EarlyUriLogCallback)(void *cls, |
2370 | const char *uri, | 2383 | const char *uri, |
2371 | struct MHD_Request *request); | 2384 | struct MHD_Request *request); |
2372 | 2385 | ||
2373 | 2386 | ||
2374 | /** | 2387 | /** |
@@ -2382,9 +2395,9 @@ typedef void * | |||
2382 | */ | 2395 | */ |
2383 | _MHD_EXTERN void | 2396 | _MHD_EXTERN void |
2384 | MHD_daemon_set_early_uri_logger (struct MHD_Daemon *daemon, | 2397 | MHD_daemon_set_early_uri_logger (struct MHD_Daemon *daemon, |
2385 | MHD_EarlyUriLogCallback cb, | 2398 | MHD_EarlyUriLogCallback cb, |
2386 | void *cb_cls) | 2399 | void *cb_cls) |
2387 | MHD_NONNULL(1); | 2400 | MHD_NONNULL (1); |
2388 | 2401 | ||
2389 | 2402 | ||
2390 | /** | 2403 | /** |
@@ -2431,8 +2444,8 @@ enum MHD_ConnectionNotificationCode | |||
2431 | */ | 2444 | */ |
2432 | typedef void | 2445 | typedef void |
2433 | (*MHD_NotifyConnectionCallback) (void *cls, | 2446 | (*MHD_NotifyConnectionCallback) (void *cls, |
2434 | struct MHD_Connection *connection, | 2447 | struct MHD_Connection *connection, |
2435 | enum MHD_ConnectionNotificationCode toe); | 2448 | enum MHD_ConnectionNotificationCode toe); |
2436 | 2449 | ||
2437 | 2450 | ||
2438 | /** | 2451 | /** |
@@ -2445,9 +2458,9 @@ typedef void | |||
2445 | */ | 2458 | */ |
2446 | _MHD_EXTERN void | 2459 | _MHD_EXTERN void |
2447 | MHD_daemon_set_notify_connection (struct MHD_Daemon *daemon, | 2460 | MHD_daemon_set_notify_connection (struct MHD_Daemon *daemon, |
2448 | MHD_NotifyConnectionCallback ncc, | 2461 | MHD_NotifyConnectionCallback ncc, |
2449 | void *ncc_cls) | 2462 | void *ncc_cls) |
2450 | MHD_NONNULL(1); | 2463 | MHD_NONNULL (1); |
2451 | 2464 | ||
2452 | 2465 | ||
2453 | /** | 2466 | /** |
@@ -2463,9 +2476,9 @@ MHD_daemon_set_notify_connection (struct MHD_Daemon *daemon, | |||
2463 | */ | 2476 | */ |
2464 | _MHD_EXTERN void | 2477 | _MHD_EXTERN void |
2465 | MHD_daemon_connection_memory_limit (struct MHD_Daemon *daemon, | 2478 | MHD_daemon_connection_memory_limit (struct MHD_Daemon *daemon, |
2466 | size_t memory_limit_b, | 2479 | size_t memory_limit_b, |
2467 | size_t memory_increment_b) | 2480 | size_t memory_increment_b) |
2468 | MHD_NONNULL(1); | 2481 | MHD_NONNULL (1); |
2469 | 2482 | ||
2470 | 2483 | ||
2471 | /** | 2484 | /** |
@@ -2478,8 +2491,8 @@ MHD_daemon_connection_memory_limit (struct MHD_Daemon *daemon, | |||
2478 | */ | 2491 | */ |
2479 | _MHD_EXTERN void | 2492 | _MHD_EXTERN void |
2480 | MHD_daemon_thread_stack_size (struct MHD_Daemon *daemon, | 2493 | MHD_daemon_thread_stack_size (struct MHD_Daemon *daemon, |
2481 | size_t stack_limit_b) | 2494 | size_t stack_limit_b) |
2482 | MHD_NONNULL(1); | 2495 | MHD_NONNULL (1); |
2483 | 2496 | ||
2484 | 2497 | ||
2485 | /** | 2498 | /** |
@@ -2499,9 +2512,9 @@ MHD_daemon_thread_stack_size (struct MHD_Daemon *daemon, | |||
2499 | */ | 2512 | */ |
2500 | _MHD_EXTERN void | 2513 | _MHD_EXTERN void |
2501 | MHD_daemon_connection_limits (struct MHD_Daemon *daemon, | 2514 | MHD_daemon_connection_limits (struct MHD_Daemon *daemon, |
2502 | unsigned int global_connection_limit, | 2515 | unsigned int global_connection_limit, |
2503 | unsigned int ip_connection_limit) | 2516 | unsigned int ip_connection_limit) |
2504 | MHD_NONNULL(1); | 2517 | MHD_NONNULL (1); |
2505 | 2518 | ||
2506 | 2519 | ||
2507 | /** | 2520 | /** |
@@ -2514,8 +2527,8 @@ MHD_daemon_connection_limits (struct MHD_Daemon *daemon, | |||
2514 | */ | 2527 | */ |
2515 | _MHD_EXTERN void | 2528 | _MHD_EXTERN void |
2516 | MHD_daemon_connection_default_timeout (struct MHD_Daemon *daemon, | 2529 | MHD_daemon_connection_default_timeout (struct MHD_Daemon *daemon, |
2517 | unsigned int timeout_s) | 2530 | unsigned int timeout_s) |
2518 | MHD_NONNULL(1); | 2531 | MHD_NONNULL (1); |
2519 | 2532 | ||
2520 | 2533 | ||
2521 | /** | 2534 | /** |
@@ -2532,8 +2545,8 @@ MHD_daemon_connection_default_timeout (struct MHD_Daemon *daemon, | |||
2532 | */ | 2545 | */ |
2533 | typedef size_t | 2546 | typedef size_t |
2534 | (*MHD_UnescapeCallback) (void *cls, | 2547 | (*MHD_UnescapeCallback) (void *cls, |
2535 | struct MHD_Request *req, | 2548 | struct MHD_Request *req, |
2536 | char *s); | 2549 | char *s); |
2537 | 2550 | ||
2538 | 2551 | ||
2539 | /** | 2552 | /** |
@@ -2549,9 +2562,9 @@ typedef size_t | |||
2549 | */ | 2562 | */ |
2550 | _MHD_EXTERN void | 2563 | _MHD_EXTERN void |
2551 | MHD_daemon_unescape_cb (struct MHD_Daemon *daemon, | 2564 | MHD_daemon_unescape_cb (struct MHD_Daemon *daemon, |
2552 | MHD_UnescapeCallback unescape_cb, | 2565 | MHD_UnescapeCallback unescape_cb, |
2553 | void *unescape_cb_cls) | 2566 | void *unescape_cb_cls) |
2554 | MHD_NONNULL(1); | 2567 | MHD_NONNULL (1); |
2555 | 2568 | ||
2556 | 2569 | ||
2557 | /** | 2570 | /** |
@@ -2565,9 +2578,9 @@ MHD_daemon_unescape_cb (struct MHD_Daemon *daemon, | |||
2565 | */ | 2578 | */ |
2566 | _MHD_EXTERN void | 2579 | _MHD_EXTERN void |
2567 | MHD_daemon_digest_auth_random (struct MHD_Daemon *daemon, | 2580 | MHD_daemon_digest_auth_random (struct MHD_Daemon *daemon, |
2568 | size_t buf_size, | 2581 | size_t buf_size, |
2569 | const void *buf) | 2582 | const void *buf) |
2570 | MHD_NONNULL(1,3); | 2583 | MHD_NONNULL (1,3); |
2571 | 2584 | ||
2572 | 2585 | ||
2573 | /** | 2586 | /** |
@@ -2579,8 +2592,8 @@ MHD_daemon_digest_auth_random (struct MHD_Daemon *daemon, | |||
2579 | */ | 2592 | */ |
2580 | _MHD_EXTERN enum MHD_StatusCode | 2593 | _MHD_EXTERN enum MHD_StatusCode |
2581 | MHD_daemon_digest_auth_nc_length (struct MHD_Daemon *daemon, | 2594 | MHD_daemon_digest_auth_nc_length (struct MHD_Daemon *daemon, |
2582 | size_t nc_length) | 2595 | size_t nc_length) |
2583 | MHD_NONNULL(1); | 2596 | MHD_NONNULL (1); |
2584 | 2597 | ||
2585 | 2598 | ||
2586 | /* ********************* connection options ************** */ | 2599 | /* ********************* connection options ************** */ |
@@ -2596,8 +2609,8 @@ MHD_daemon_digest_auth_nc_length (struct MHD_Daemon *daemon, | |||
2596 | */ | 2609 | */ |
2597 | _MHD_EXTERN void | 2610 | _MHD_EXTERN void |
2598 | MHD_connection_set_timeout (struct MHD_Connection *connection, | 2611 | MHD_connection_set_timeout (struct MHD_Connection *connection, |
2599 | unsigned int timeout_s) | 2612 | unsigned int timeout_s) |
2600 | MHD_NONNULL(1); | 2613 | MHD_NONNULL (1); |
2601 | 2614 | ||
2602 | 2615 | ||
2603 | /* **************** Request handling functions ***************** */ | 2616 | /* **************** Request handling functions ***************** */ |
@@ -2678,10 +2691,10 @@ typedef int | |||
2678 | */ | 2691 | */ |
2679 | _MHD_EXTERN unsigned int | 2692 | _MHD_EXTERN unsigned int |
2680 | MHD_request_get_values (struct MHD_Request *request, | 2693 | MHD_request_get_values (struct MHD_Request *request, |
2681 | enum MHD_ValueKind kind, | 2694 | enum MHD_ValueKind kind, |
2682 | MHD_KeyValueIterator iterator, | 2695 | MHD_KeyValueIterator iterator, |
2683 | void *iterator_cls) | 2696 | void *iterator_cls) |
2684 | MHD_NONNULL(1); | 2697 | MHD_NONNULL (1); |
2685 | 2698 | ||
2686 | 2699 | ||
2687 | /** | 2700 | /** |
@@ -2711,10 +2724,10 @@ MHD_request_get_values (struct MHD_Request *request, | |||
2711 | */ | 2724 | */ |
2712 | _MHD_EXTERN enum MHD_Bool | 2725 | _MHD_EXTERN enum MHD_Bool |
2713 | MHD_request_set_value (struct MHD_Request *request, | 2726 | MHD_request_set_value (struct MHD_Request *request, |
2714 | enum MHD_ValueKind kind, | 2727 | enum MHD_ValueKind kind, |
2715 | const char *key, | 2728 | const char *key, |
2716 | const char *value) | 2729 | const char *value) |
2717 | MHD_NONNULL(1,3,4); | 2730 | MHD_NONNULL (1,3,4); |
2718 | 2731 | ||
2719 | 2732 | ||
2720 | /** | 2733 | /** |
@@ -2729,9 +2742,9 @@ MHD_request_set_value (struct MHD_Request *request, | |||
2729 | */ | 2742 | */ |
2730 | _MHD_EXTERN const char * | 2743 | _MHD_EXTERN const char * |
2731 | MHD_request_lookup_value (struct MHD_Request *request, | 2744 | MHD_request_lookup_value (struct MHD_Request *request, |
2732 | enum MHD_ValueKind kind, | 2745 | enum MHD_ValueKind kind, |
2733 | const char *key) | 2746 | const char *key) |
2734 | MHD_NONNULL(1); | 2747 | MHD_NONNULL (1); |
2735 | 2748 | ||
2736 | 2749 | ||
2737 | 2750 | ||
@@ -2741,7 +2754,8 @@ MHD_request_lookup_value (struct MHD_Request *request, | |||
2741 | * @{ | 2754 | * @{ |
2742 | */ | 2755 | */ |
2743 | /* See http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml */ | 2756 | /* See http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml */ |
2744 | enum MHD_HTTP_StatusCode { | 2757 | enum MHD_HTTP_StatusCode |
2758 | { | ||
2745 | MHD_HTTP_CONTINUE = 100, | 2759 | MHD_HTTP_CONTINUE = 100, |
2746 | MHD_HTTP_SWITCHING_PROTOCOLS = 101, | 2760 | MHD_HTTP_SWITCHING_PROTOCOLS = 101, |
2747 | MHD_HTTP_PROCESSING = 102, | 2761 | MHD_HTTP_PROCESSING = 102, |
@@ -2777,7 +2791,9 @@ enum MHD_HTTP_StatusCode { | |||
2777 | MHD_HTTP_NOT_ACCEPTABLE = 406, | 2791 | MHD_HTTP_NOT_ACCEPTABLE = 406, |
2778 | /** @deprecated */ | 2792 | /** @deprecated */ |
2779 | #define MHD_HTTP_METHOD_NOT_ACCEPTABLE \ | 2793 | #define MHD_HTTP_METHOD_NOT_ACCEPTABLE \ |
2780 | _MHD_DEPR_IN_MACRO("Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") MHD_HTTP_NOT_ACCEPTABLE | 2794 | _MHD_DEPR_IN_MACRO ( \ |
2795 | "Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") \ | ||
2796 | MHD_HTTP_NOT_ACCEPTABLE | ||
2781 | MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED = 407, | 2797 | MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED = 407, |
2782 | MHD_HTTP_REQUEST_TIMEOUT = 408, | 2798 | MHD_HTTP_REQUEST_TIMEOUT = 408, |
2783 | MHD_HTTP_CONFLICT = 409, | 2799 | MHD_HTTP_CONFLICT = 409, |
@@ -2787,16 +2803,22 @@ enum MHD_HTTP_StatusCode { | |||
2787 | MHD_HTTP_PAYLOAD_TOO_LARGE = 413, | 2803 | MHD_HTTP_PAYLOAD_TOO_LARGE = 413, |
2788 | /** @deprecated */ | 2804 | /** @deprecated */ |
2789 | #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \ | 2805 | #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \ |
2790 | _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_PAYLOAD_TOO_LARGE") MHD_HTTP_PAYLOAD_TOO_LARGE | 2806 | _MHD_DEPR_IN_MACRO ( \ |
2807 | "Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_PAYLOAD_TOO_LARGE") \ | ||
2808 | MHD_HTTP_PAYLOAD_TOO_LARGE | ||
2791 | MHD_HTTP_URI_TOO_LONG = 414, | 2809 | MHD_HTTP_URI_TOO_LONG = 414, |
2792 | /** @deprecated */ | 2810 | /** @deprecated */ |
2793 | #define MHD_HTTP_REQUEST_URI_TOO_LONG \ | 2811 | #define MHD_HTTP_REQUEST_URI_TOO_LONG \ |
2794 | _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUEST_URI_TOO_LONG is deprecated, use MHD_HTTP_URI_TOO_LONG") MHD_HTTP_URI_TOO_LONG | 2812 | _MHD_DEPR_IN_MACRO ( \ |
2813 | "Value MHD_HTTP_REQUEST_URI_TOO_LONG is deprecated, use MHD_HTTP_URI_TOO_LONG") \ | ||
2814 | MHD_HTTP_URI_TOO_LONG | ||
2795 | MHD_HTTP_UNSUPPORTED_MEDIA_TYPE = 415, | 2815 | MHD_HTTP_UNSUPPORTED_MEDIA_TYPE = 415, |
2796 | MHD_HTTP_RANGE_NOT_SATISFIABLE = 416, | 2816 | MHD_HTTP_RANGE_NOT_SATISFIABLE = 416, |
2797 | /** @deprecated */ | 2817 | /** @deprecated */ |
2798 | #define MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE \ | 2818 | #define MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE \ |
2799 | _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE is deprecated, use MHD_HTTP_RANGE_NOT_SATISFIABLE") MHD_HTTP_RANGE_NOT_SATISFIABLE | 2819 | _MHD_DEPR_IN_MACRO ( \ |
2820 | "Value MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE is deprecated, use MHD_HTTP_RANGE_NOT_SATISFIABLE") \ | ||
2821 | MHD_HTTP_RANGE_NOT_SATISFIABLE | ||
2800 | MHD_HTTP_EXPECTATION_FAILED = 417, | 2822 | MHD_HTTP_EXPECTATION_FAILED = 417, |
2801 | 2823 | ||
2802 | MHD_HTTP_MISDIRECTED_REQUEST = 421, | 2824 | MHD_HTTP_MISDIRECTED_REQUEST = 421, |
@@ -2903,7 +2925,7 @@ MHD_action_suspend (void); | |||
2903 | */ | 2925 | */ |
2904 | _MHD_EXTERN void | 2926 | _MHD_EXTERN void |
2905 | MHD_request_resume (struct MHD_Request *request) | 2927 | MHD_request_resume (struct MHD_Request *request) |
2906 | MHD_NONNULL(1); | 2928 | MHD_NONNULL (1); |
2907 | 2929 | ||
2908 | 2930 | ||
2909 | /* **************** Response manipulation functions ***************** */ | 2931 | /* **************** Response manipulation functions ***************** */ |
@@ -2936,8 +2958,8 @@ struct MHD_Response; | |||
2936 | */ | 2958 | */ |
2937 | _MHD_EXTERN const struct MHD_Action * | 2959 | _MHD_EXTERN const struct MHD_Action * |
2938 | MHD_action_from_response (struct MHD_Response *response, | 2960 | MHD_action_from_response (struct MHD_Response *response, |
2939 | enum MHD_Bool destroy_after_use) | 2961 | enum MHD_Bool destroy_after_use) |
2940 | MHD_NONNULL(1); | 2962 | MHD_NONNULL (1); |
2941 | 2963 | ||
2942 | 2964 | ||
2943 | /** | 2965 | /** |
@@ -2949,7 +2971,7 @@ MHD_action_from_response (struct MHD_Response *response, | |||
2949 | */ | 2971 | */ |
2950 | _MHD_EXTERN void | 2972 | _MHD_EXTERN void |
2951 | MHD_response_option_v10_only (struct MHD_Response *response) | 2973 | MHD_response_option_v10_only (struct MHD_Response *response) |
2952 | MHD_NONNULL(1); | 2974 | MHD_NONNULL (1); |
2953 | 2975 | ||
2954 | 2976 | ||
2955 | /** | 2977 | /** |
@@ -3023,8 +3045,8 @@ enum MHD_RequestTerminationCode | |||
3023 | */ | 3045 | */ |
3024 | typedef void | 3046 | typedef void |
3025 | (*MHD_RequestTerminationCallback) (void *cls, | 3047 | (*MHD_RequestTerminationCallback) (void *cls, |
3026 | enum MHD_RequestTerminationCode toe, | 3048 | enum MHD_RequestTerminationCode toe, |
3027 | void *request_context); | 3049 | void *request_context); |
3028 | 3050 | ||
3029 | 3051 | ||
3030 | /** | 3052 | /** |
@@ -3037,9 +3059,10 @@ typedef void | |||
3037 | */ | 3059 | */ |
3038 | _MHD_EXTERN void | 3060 | _MHD_EXTERN void |
3039 | MHD_response_option_termination_callback (struct MHD_Response *response, | 3061 | MHD_response_option_termination_callback (struct MHD_Response *response, |
3040 | MHD_RequestTerminationCallback termination_cb, | 3062 | MHD_RequestTerminationCallback |
3041 | void *termination_cb_cls) | 3063 | termination_cb, |
3042 | MHD_NONNULL(1); | 3064 | void *termination_cb_cls) |
3065 | MHD_NONNULL (1); | ||
3043 | 3066 | ||
3044 | 3067 | ||
3045 | /** | 3068 | /** |
@@ -3124,11 +3147,11 @@ typedef void | |||
3124 | */ | 3147 | */ |
3125 | _MHD_EXTERN struct MHD_Response * | 3148 | _MHD_EXTERN struct MHD_Response * |
3126 | MHD_response_from_callback (enum MHD_HTTP_StatusCode sc, | 3149 | MHD_response_from_callback (enum MHD_HTTP_StatusCode sc, |
3127 | uint64_t size, | 3150 | uint64_t size, |
3128 | size_t block_size, | 3151 | size_t block_size, |
3129 | MHD_ContentReaderCallback crc, | 3152 | MHD_ContentReaderCallback crc, |
3130 | void *crc_cls, | 3153 | void *crc_cls, |
3131 | MHD_ContentReaderFreeCallback crfc); | 3154 | MHD_ContentReaderFreeCallback crfc); |
3132 | 3155 | ||
3133 | 3156 | ||
3134 | /** | 3157 | /** |
@@ -3181,9 +3204,9 @@ enum MHD_ResponseMemoryMode | |||
3181 | */ | 3204 | */ |
3182 | _MHD_EXTERN struct MHD_Response * | 3205 | _MHD_EXTERN struct MHD_Response * |
3183 | MHD_response_from_buffer (enum MHD_HTTP_StatusCode sc, | 3206 | MHD_response_from_buffer (enum MHD_HTTP_StatusCode sc, |
3184 | size_t size, | 3207 | size_t size, |
3185 | void *buffer, | 3208 | void *buffer, |
3186 | enum MHD_ResponseMemoryMode mode); | 3209 | enum MHD_ResponseMemoryMode mode); |
3187 | 3210 | ||
3188 | 3211 | ||
3189 | /** | 3212 | /** |
@@ -3206,9 +3229,9 @@ MHD_response_from_buffer (enum MHD_HTTP_StatusCode sc, | |||
3206 | */ | 3229 | */ |
3207 | _MHD_EXTERN struct MHD_Response * | 3230 | _MHD_EXTERN struct MHD_Response * |
3208 | MHD_response_from_fd (enum MHD_HTTP_StatusCode sc, | 3231 | MHD_response_from_fd (enum MHD_HTTP_StatusCode sc, |
3209 | int fd, | 3232 | int fd, |
3210 | uint64_t offset, | 3233 | uint64_t offset, |
3211 | uint64_t size); | 3234 | uint64_t size); |
3212 | 3235 | ||
3213 | 3236 | ||
3214 | /** | 3237 | /** |
@@ -3255,9 +3278,9 @@ struct MHD_UpgradeResponseHandle; | |||
3255 | */ | 3278 | */ |
3256 | _MHD_EXTERN enum MHD_Bool | 3279 | _MHD_EXTERN enum MHD_Bool |
3257 | MHD_upgrade_operation (struct MHD_UpgradeResponseHandle *urh, | 3280 | MHD_upgrade_operation (struct MHD_UpgradeResponseHandle *urh, |
3258 | enum MHD_UpgradeOperation operation, | 3281 | enum MHD_UpgradeOperation operation, |
3259 | ...) | 3282 | ...) |
3260 | MHD_NONNULL(1); | 3283 | MHD_NONNULL (1); |
3261 | 3284 | ||
3262 | 3285 | ||
3263 | /** | 3286 | /** |
@@ -3349,8 +3372,8 @@ typedef void | |||
3349 | */ | 3372 | */ |
3350 | _MHD_EXTERN struct MHD_Response * | 3373 | _MHD_EXTERN struct MHD_Response * |
3351 | MHD_response_for_upgrade (MHD_UpgradeHandler upgrade_handler, | 3374 | MHD_response_for_upgrade (MHD_UpgradeHandler upgrade_handler, |
3352 | void *upgrade_handler_cls) | 3375 | void *upgrade_handler_cls) |
3353 | MHD_NONNULL(1); | 3376 | MHD_NONNULL (1); |
3354 | 3377 | ||
3355 | 3378 | ||
3356 | /** | 3379 | /** |
@@ -3364,7 +3387,7 @@ MHD_response_for_upgrade (MHD_UpgradeHandler upgrade_handler, | |||
3364 | */ | 3387 | */ |
3365 | _MHD_EXTERN void | 3388 | _MHD_EXTERN void |
3366 | MHD_response_queue_for_destroy (struct MHD_Response *response) | 3389 | MHD_response_queue_for_destroy (struct MHD_Response *response) |
3367 | MHD_NONNULL(1); | 3390 | MHD_NONNULL (1); |
3368 | 3391 | ||
3369 | 3392 | ||
3370 | /** | 3393 | /** |
@@ -3380,8 +3403,8 @@ MHD_response_queue_for_destroy (struct MHD_Response *response) | |||
3380 | _MHD_EXTERN enum MHD_Bool | 3403 | _MHD_EXTERN enum MHD_Bool |
3381 | MHD_response_add_header (struct MHD_Response *response, | 3404 | MHD_response_add_header (struct MHD_Response *response, |
3382 | const char *header, | 3405 | const char *header, |
3383 | const char *content) | 3406 | const char *content) |
3384 | MHD_NONNULL(1,2,3); | 3407 | MHD_NONNULL (1,2,3); |
3385 | 3408 | ||
3386 | 3409 | ||
3387 | /** | 3410 | /** |
@@ -3398,7 +3421,7 @@ _MHD_EXTERN enum MHD_Bool | |||
3398 | MHD_response_add_trailer (struct MHD_Response *response, | 3421 | MHD_response_add_trailer (struct MHD_Response *response, |
3399 | const char *footer, | 3422 | const char *footer, |
3400 | const char *content) | 3423 | const char *content) |
3401 | MHD_NONNULL(1,2,3); | 3424 | MHD_NONNULL (1,2,3); |
3402 | 3425 | ||
3403 | 3426 | ||
3404 | /** | 3427 | /** |
@@ -3413,8 +3436,8 @@ MHD_response_add_trailer (struct MHD_Response *response, | |||
3413 | _MHD_EXTERN enum MHD_Bool | 3436 | _MHD_EXTERN enum MHD_Bool |
3414 | MHD_response_del_header (struct MHD_Response *response, | 3437 | MHD_response_del_header (struct MHD_Response *response, |
3415 | const char *header, | 3438 | const char *header, |
3416 | const char *content) | 3439 | const char *content) |
3417 | MHD_NONNULL(1,2,3); | 3440 | MHD_NONNULL (1,2,3); |
3418 | 3441 | ||
3419 | 3442 | ||
3420 | /** | 3443 | /** |
@@ -3430,8 +3453,8 @@ MHD_response_del_header (struct MHD_Response *response, | |||
3430 | _MHD_EXTERN unsigned int | 3453 | _MHD_EXTERN unsigned int |
3431 | MHD_response_get_headers (struct MHD_Response *response, | 3454 | MHD_response_get_headers (struct MHD_Response *response, |
3432 | MHD_KeyValueIterator iterator, | 3455 | MHD_KeyValueIterator iterator, |
3433 | void *iterator_cls) | 3456 | void *iterator_cls) |
3434 | MHD_NONNULL(1); | 3457 | MHD_NONNULL (1); |
3435 | 3458 | ||
3436 | 3459 | ||
3437 | /** | 3460 | /** |
@@ -3444,8 +3467,8 @@ MHD_response_get_headers (struct MHD_Response *response, | |||
3444 | */ | 3467 | */ |
3445 | _MHD_EXTERN const char * | 3468 | _MHD_EXTERN const char * |
3446 | MHD_response_get_header (struct MHD_Response *response, | 3469 | MHD_response_get_header (struct MHD_Response *response, |
3447 | const char *key) | 3470 | const char *key) |
3448 | MHD_NONNULL(1,2); | 3471 | MHD_NONNULL (1,2); |
3449 | 3472 | ||
3450 | 3473 | ||
3451 | /* ************Upload and PostProcessor functions ********************** */ | 3474 | /* ************Upload and PostProcessor functions ********************** */ |
@@ -3480,8 +3503,8 @@ MHD_action_continue (void); | |||
3480 | */ | 3503 | */ |
3481 | typedef const struct MHD_Action * | 3504 | typedef const struct MHD_Action * |
3482 | (*MHD_UploadCallback) (void *cls, | 3505 | (*MHD_UploadCallback) (void *cls, |
3483 | const char *upload_data, | 3506 | const char *upload_data, |
3484 | size_t *upload_data_size); | 3507 | size_t *upload_data_size); |
3485 | 3508 | ||
3486 | 3509 | ||
3487 | /** | 3510 | /** |
@@ -3494,8 +3517,8 @@ typedef const struct MHD_Action * | |||
3494 | */ | 3517 | */ |
3495 | _MHD_EXTERN const struct MHD_Action * | 3518 | _MHD_EXTERN const struct MHD_Action * |
3496 | MHD_action_process_upload (MHD_UploadCallback uc, | 3519 | MHD_action_process_upload (MHD_UploadCallback uc, |
3497 | void *uc_cls) | 3520 | void *uc_cls) |
3498 | MHD_NONNULL(1); | 3521 | MHD_NONNULL (1); |
3499 | 3522 | ||
3500 | 3523 | ||
3501 | /** | 3524 | /** |
@@ -3559,9 +3582,9 @@ typedef const struct MHD_Action * | |||
3559 | */ | 3582 | */ |
3560 | _MHD_EXTERN const struct MHD_Action * | 3583 | _MHD_EXTERN const struct MHD_Action * |
3561 | MHD_action_parse_post (size_t buffer_size, | 3584 | MHD_action_parse_post (size_t buffer_size, |
3562 | MHD_PostDataIterator iter, | 3585 | MHD_PostDataIterator iter, |
3563 | void *iter_cls) | 3586 | void *iter_cls) |
3564 | MHD_NONNULL(2); | 3587 | MHD_NONNULL (2); |
3565 | 3588 | ||
3566 | 3589 | ||
3567 | 3590 | ||
@@ -3730,10 +3753,10 @@ union MHD_ConnectionInformation | |||
3730 | */ | 3753 | */ |
3731 | _MHD_EXTERN enum MHD_Bool | 3754 | _MHD_EXTERN enum MHD_Bool |
3732 | MHD_connection_get_information_sz (struct MHD_Connection *connection, | 3755 | MHD_connection_get_information_sz (struct MHD_Connection *connection, |
3733 | enum MHD_ConnectionInformationType info_type, | 3756 | enum MHD_ConnectionInformationType info_type, |
3734 | union MHD_ConnectionInformation *return_value, | 3757 | union MHD_ConnectionInformation *return_value, |
3735 | size_t return_value_size) | 3758 | size_t return_value_size) |
3736 | MHD_NONNULL(1,3); | 3759 | MHD_NONNULL (1,3); |
3737 | 3760 | ||
3738 | 3761 | ||
3739 | /** | 3762 | /** |
@@ -3750,7 +3773,8 @@ MHD_connection_get_information_sz (struct MHD_Connection *connection, | |||
3750 | #define MHD_connection_get_information(connection, \ | 3773 | #define MHD_connection_get_information(connection, \ |
3751 | info_type, \ | 3774 | info_type, \ |
3752 | return_value) \ | 3775 | return_value) \ |
3753 | MHD_connection_get_information_sz ((connection),(info_type),(return_value),sizeof(union MHD_ConnectionInformation)) | 3776 | MHD_connection_get_information_sz ((connection),(info_type),(return_value), \ |
3777 | sizeof(union MHD_ConnectionInformation)) | ||
3754 | 3778 | ||
3755 | 3779 | ||
3756 | /** | 3780 | /** |
@@ -3843,10 +3867,10 @@ enum MHD_RequestInformationType | |||
3843 | */ | 3867 | */ |
3844 | _MHD_EXTERN enum MHD_Bool | 3868 | _MHD_EXTERN enum MHD_Bool |
3845 | MHD_request_get_information_sz (struct MHD_Request *request, | 3869 | MHD_request_get_information_sz (struct MHD_Request *request, |
3846 | enum MHD_RequestInformationType info_type, | 3870 | enum MHD_RequestInformationType info_type, |
3847 | union MHD_RequestInformation *return_value, | 3871 | union MHD_RequestInformation *return_value, |
3848 | size_t return_value_size) | 3872 | size_t return_value_size) |
3849 | MHD_NONNULL(1,3); | 3873 | MHD_NONNULL (1,3); |
3850 | 3874 | ||
3851 | 3875 | ||
3852 | /** | 3876 | /** |
@@ -3863,7 +3887,8 @@ MHD_request_get_information_sz (struct MHD_Request *request, | |||
3863 | #define MHD_request_get_information (request, \ | 3887 | #define MHD_request_get_information (request, \ |
3864 | info_type, \ | 3888 | info_type, \ |
3865 | return_value) \ | 3889 | return_value) \ |
3866 | MHD_request_get_information_sz ((request), (info_type), (return_value), sizeof(union MHD_RequestInformation)) | 3890 | MHD_request_get_information_sz ((request), (info_type), (return_value), \ |
3891 | sizeof(union MHD_RequestInformation)) | ||
3867 | 3892 | ||
3868 | 3893 | ||
3869 | /** | 3894 | /** |
@@ -3950,10 +3975,10 @@ union MHD_DaemonInformation | |||
3950 | */ | 3975 | */ |
3951 | _MHD_EXTERN enum MHD_Bool | 3976 | _MHD_EXTERN enum MHD_Bool |
3952 | MHD_daemon_get_information_sz (struct MHD_Daemon *daemon, | 3977 | MHD_daemon_get_information_sz (struct MHD_Daemon *daemon, |
3953 | enum MHD_DaemonInformationType info_type, | 3978 | enum MHD_DaemonInformationType info_type, |
3954 | union MHD_DaemonInformation *return_value, | 3979 | union MHD_DaemonInformation *return_value, |
3955 | size_t return_value_size) | 3980 | size_t return_value_size) |
3956 | MHD_NONNULL(1,3); | 3981 | MHD_NONNULL (1,3); |
3957 | 3982 | ||
3958 | /** | 3983 | /** |
3959 | * Obtain information about the given daemon. | 3984 | * Obtain information about the given daemon. |
@@ -3969,7 +3994,8 @@ MHD_daemon_get_information_sz (struct MHD_Daemon *daemon, | |||
3969 | #define MHD_daemon_get_information(daemon, \ | 3994 | #define MHD_daemon_get_information(daemon, \ |
3970 | info_type, \ | 3995 | info_type, \ |
3971 | return_value) \ | 3996 | return_value) \ |
3972 | MHD_daemon_get_information_sz((daemon), (info_type), (return_value), sizeof(union MHD_DaemonInformation)); | 3997 | MHD_daemon_get_information_sz ((daemon), (info_type), (return_value), \ |
3998 | sizeof(union MHD_DaemonInformation)); | ||
3973 | 3999 | ||
3974 | 4000 | ||
3975 | /** | 4001 | /** |
@@ -4007,7 +4033,7 @@ typedef void | |||
4007 | */ | 4033 | */ |
4008 | _MHD_EXTERN void | 4034 | _MHD_EXTERN void |
4009 | MHD_set_panic_func (MHD_PanicCallback cb, | 4035 | MHD_set_panic_func (MHD_PanicCallback cb, |
4010 | void *cls); | 4036 | void *cls); |
4011 | 4037 | ||
4012 | 4038 | ||
4013 | /** | 4039 | /** |
@@ -4021,7 +4047,7 @@ MHD_set_panic_func (MHD_PanicCallback cb, | |||
4021 | */ | 4047 | */ |
4022 | _MHD_EXTERN size_t | 4048 | _MHD_EXTERN size_t |
4023 | MHD_http_unescape (char *val) | 4049 | MHD_http_unescape (char *val) |
4024 | MHD_NONNULL(1); | 4050 | MHD_NONNULL (1); |
4025 | 4051 | ||
4026 | 4052 | ||
4027 | /** | 4053 | /** |