GNU libmicrohttpd  0.9.72
internal.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2007-2017 Daniel Pittman and Christian Grothoff
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
27 #ifndef INTERNAL_H
28 #define INTERNAL_H
29 
30 #include "mhd_options.h"
31 #include "platform.h"
32 #include "microhttpd2.h"
33 #include "microhttpd_tls.h"
34 #include "mhd_assert.h"
35 #include "mhd_compat.h"
36 #include "mhd_itc.h"
37 #include "mhd_mono_clock.h"
38 #include "memorypool.h"
39 
40 #ifdef HTTPS_SUPPORT
41 #include <gnutls/gnutls.h>
42 #if GNUTLS_VERSION_MAJOR >= 3
43 #include <gnutls/abstract.h>
44 #endif
45 #endif /* HTTPS_SUPPORT */
46 
47 #ifdef HAVE_STDBOOL_H
48 #include <stdbool.h>
49 #endif
50 #ifdef MHD_PANIC
51 /* Override any defined MHD_PANIC macro with proper one */
52 #undef MHD_PANIC
53 #endif /* MHD_PANIC */
54 
55 #ifdef HAVE_MESSAGES
61 #define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, msg); \
62  BUILTIN_NOT_REACHED; } while (0)
63 #else
69 #define MHD_PANIC(msg) do { mhd_panic (mhd_panic_cls, __FILE__, __LINE__, NULL); \
70  BUILTIN_NOT_REACHED; } while (0)
71 #endif
72 
73 #include "mhd_threads.h"
74 #include "mhd_locks.h"
75 #include "mhd_sockets.h"
76 #include "mhd_str.h"
77 #include "mhd_itc_types.h"
78 
79 
80 #ifdef HAVE_MESSAGES
85 void
86 MHD_DLOG (const struct MHD_Daemon *daemon,
87  enum MHD_StatusCode sc,
88  const char *format,
89  ...);
90 
91 #endif
92 
93 
98 #define MHD_fd_close_chk_(fd) do { \
99  if ( (0 != close ((fd)) && (EBADF == errno)) ) \
100  MHD_PANIC (_ ("Failed to close FD.\n")); \
101 } while (0)
102 
107 #define EXTRA_CHECKS MHD_NO
108 
109 #define MHD_MAX(a,b) (((a)<(b)) ? (b) : (a))
110 #define MHD_MIN(a,b) (((a)<(b)) ? (a) : (b))
111 
112 
120 #define MHD_BUF_INC_SIZE 1024
121 
122 
127 
131 extern void *mhd_panic_cls;
132 
133 /* If we have Clang or gcc >= 4.5, use __buildin_unreachable() */
134 #if defined(__clang__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= \
135  5)
136 #define BUILTIN_NOT_REACHED __builtin_unreachable ()
137 #elif defined(_MSC_FULL_VER)
138 #define BUILTIN_NOT_REACHED __assume (0)
139 #else
140 #define BUILTIN_NOT_REACHED
141 #endif
142 
143 #ifndef MHD_STATICSTR_LEN_
147 #define MHD_STATICSTR_LEN_(macro) (sizeof(macro) / sizeof(char) - 1)
148 #endif /* ! MHD_STATICSTR_LEN_ */
149 
150 
155 {
160 
165 
170 };
171 
172 
181 typedef ssize_t
182 (*ReceiveCallback) (struct MHD_Connection *conn,
183  void *write_to,
184  size_t max_bytes);
185 
186 
195 typedef ssize_t
196 (*TransmitCallback) (struct MHD_Connection *conn,
197  const void *read_from,
198  size_t max_bytes);
199 
200 
216 enum MHD_REQUEST_STATE // FIXME: fix capitalization!
217 {
223 
228 
233 
238 
243 
248 
253 
258 
264 
270 
276 
281 
286 
292 
297 
302 
307 
312 
317 
322 
323 #ifdef UPGRADE_SUPPORT
328  MHD_REQUEST_UPGRADE
329 #endif /* UPGRADE_SUPPORT */
330 
331 };
332 
333 
338 {
343 
347  char *header;
348 
352  char *value;
353 
358  enum MHD_ValueKind kind;
359 
360 };
361 
362 
367 {
368 
373 
378 
384 
389 
394 
402 
407  char *method_s;
408 
413  const char *url;
414 
419  char *version_s;
420 
427 
433  char *read_buffer;
434 
440 
447  char *last;
448 
456  char *colon;
457 
458 #ifdef UPGRADE_SUPPORT
465  struct MHD_UpgradeResponseHandle *urh;
466 #endif /* UPGRADE_SUPPORT */
467 
475 
481 
486 
491 
497 
502  size_t header_size;
503 
509 
517 
523 
530 
531  #if defined(_MHD_HAVE_SENDFILE)
532  // FIXME: document, fix capitalization!
533  enum MHD_resp_sender_
534  {
535  MHD_resp_sender_std = 0,
536  MHD_resp_sender_sendfile
537  } resp_sender;
538 #endif /* _MHD_HAVE_SENDFILE */
539 
545 
550 
554  enum MHD_Method method;
555 
559  enum MHD_RequestEventLoopInfo event_loop_info;
560 
565  bool in_idle;
566 
572 
581 };
582 
583 
588 {
589 
595 
601 
607 
612 
617 
622 
627 };
628 
629 
634 {
635 
636 #ifdef EPOLL_SUPPORT
640  struct MHD_Connection *nextE;
641 
645  struct MHD_Connection *prevE;
646 #endif
647 
652 
657 
666 
671 
676 
685  struct MemoryPool *pool;
686 
695 
696 #ifdef HTTPS_SUPPORT
700  struct MHD_TLS_ConnectionState *tls_cs;
701 #endif
702 
707 
712 
717  struct MHD_Request request;
718 
723  MHD_thread_handle_ID_ pid;
724 
728  struct sockaddr_storage addr;
729 
733  socklen_t addr_len;
734 
740 
746 
753 
754 #ifdef EPOLL_SUPPORT
758  enum MHD_EpollState epoll_state;
759 #endif
760 
764  bool suspended;
765 
770 
774  bool resuming;
775 
780 
785 
793 
794 };
795 
796 
797 #ifdef UPGRADE_SUPPORT
807 #define RESERVE_EBUF_SIZE 8
808 
815 struct UpgradeEpollHandle
816 {
821  struct MHD_UpgradeResponseHandle *urh;
822 
838  MHD_socket socket;
839 
843  enum MHD_EpollState celi;
844 
845 };
846 
847 
853 struct MHD_UpgradeResponseHandle
854 {
860  struct MHD_Connection *connection;
861 
862 #ifdef HTTPS_SUPPORT
866  struct MHD_UpgradeResponseHandle *next;
867 
871  struct MHD_UpgradeResponseHandle *prev;
872 
873 #ifdef EPOLL_SUPPORT
877  struct MHD_UpgradeResponseHandle *nextE;
878 
882  struct MHD_UpgradeResponseHandle *prevE;
883 
887  bool in_eready_list;
888 #endif
889 
895  char *in_buffer;
896 
902  char *out_buffer;
903 
909  size_t in_buffer_size;
910 
916  size_t out_buffer_size;
917 
925  size_t in_buffer_used;
926 
934  size_t out_buffer_used;
935 
939  struct UpgradeEpollHandle app;
940 
945  struct UpgradeEpollHandle mhd;
946 
951  char e_buf[RESERVE_EBUF_SIZE];
952 
953 #endif /* HTTPS_SUPPORT */
954 
965  volatile bool was_closed;
966 
988  bool clean_ready;
989 };
990 #endif /* UPGRADE_SUPPORT */
991 
992 
1001 {
1005  MHD_RequestCallback rc;
1006 
1010  void *rc_cls;
1011 
1015  MHD_LoggingCallback logger;
1016 
1020  void *logger_cls;
1021 
1027 
1032 
1036  MHD_EarlyUriLogCallback early_uri_logger_cb;
1037 
1042 
1048 
1053 
1058  MHD_UnescapeCallback unescape_cb;
1059 
1064 
1069 
1074 
1075 
1076 #if HTTPS_SUPPORT
1077 #ifdef UPGRADE_SUPPORT
1083  struct MHD_UpgradeResponseHandle *urh_head;
1084 
1090  struct MHD_UpgradeResponseHandle *urh_tail;
1091 #endif /* UPGRADE_SUPPORT */
1092 
1098  void *tls_backend_lib;
1099 
1103  struct MHD_TLS_Plugin *tls_api;
1104 #endif
1105 #if ENABLE_DAUTH
1106 
1111  const void *digest_auth_random_buf;
1112 #endif
1113 
1129 
1136 
1144 
1151 
1156 
1161 
1167 
1173 
1178 
1183 
1188 
1189 #ifdef EPOLL_SUPPORT
1193  struct MHD_Connection *eready_head;
1194 
1198  struct MHD_Connection *eready_tail;
1199 
1203  const char *epoll_itc_marker;
1204 #ifdef UPGRADE_SUPPORT
1208  struct MHD_UpgradeResponseHandle *eready_urh_head;
1209 
1213  struct MHD_UpgradeResponseHandle *eready_urh_tail;
1214 #endif /* UPGRADE_SUPPORT */
1215 #endif /* EPOLL_SUPPORT */
1216 
1217 #ifdef DAUTH_SUPPORT
1218 
1222  const char *digest_auth_random;
1223 
1227  struct MHD_NonceNc *nnc;
1228 
1232  MHD_mutex_ nnc_lock;
1233 
1237  size_t digest_auth_rand_size;
1238 
1242  unsigned int nonce_nc_size;
1243 
1244 #endif
1245 
1249  MHD_thread_handle_ID_ pid;
1250 
1254  struct sockaddr_storage listen_sa;
1255 
1260 
1266 
1272 
1276 #define POOL_SIZE_DEFAULT (32 * 1024)
1282 
1290 #define BUF_INC_SIZE_DEFAULT 1024
1291 
1297 
1303 
1304 #if ENABLE_DAUTH
1305 
1309  size_t digest_auth_random_buf_size;
1310 
1314 #define DIGEST_NC_LENGTH_DEFAULT 4
1315 
1320  size_t digest_nc_length;
1321 #endif
1322 
1326 #ifdef SOMAXCONN
1327 #define LISTEN_BACKLOG_DEFAULT SOMAXCONN
1328 #else /* !SOMAXCONN */
1329 #define LISTEN_BACKLOG_DEFAULT 511
1330 #endif
1331 
1337 
1341 #define FO_QUEUE_LENGTH_DEFAULT 50
1342 
1346  unsigned int fo_queue_length;
1347 
1352 
1356  unsigned int ip_connection_limit;
1357 
1361  unsigned int connections;
1362 
1366  unsigned int worker_pool_size;
1367 
1372 
1378 
1379 #ifdef EPOLL_SUPPORT
1383  int epoll_fd;
1384 
1389  bool listen_socket_in_epoll;
1390 
1391 #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT)
1396  int epoll_upgrade_fd;
1397 
1402  bool upgrade_fd_in_epoll;
1403 #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */
1404 
1405 #endif
1406 
1410  struct MHD_itc_ itc;
1411 
1417  enum MHD_ThreadingMode threading_mode;
1418 
1423  enum MHD_FastOpenMethod fast_open_method;
1424 
1429  enum MHD_AddressFamily listen_af;
1430 
1436  enum MHD_EventLoopSyscall event_loop_syscall;
1437 
1442  enum MHD_ProtocolStrictLevel protocol_strict_level;
1443 
1449  uint16_t listen_port;
1450 
1457 
1463 
1469 
1475 
1483  bool at_limit;
1484 
1491 
1501 
1506 
1510  bool resuming;
1511 
1517 
1522 
1526  volatile bool shutdown;
1527 
1528 };
1529 
1530 
1539 typedef enum MHD_StatusCode
1540 (*ActionCallback)(void *cls,
1541  struct MHD_Request *request);
1542 
1543 
1549 {
1550 
1555 
1559  void *action_cls;
1560 
1561 };
1562 
1563 
1568 {
1569 
1575  struct MHD_Action action;
1576 
1583 
1588  char *data;
1589 
1594  void *crc_cls;
1595 
1601 
1607 
1612  MHD_RequestTerminationCallback termination_cb;
1613 
1618 
1619 #ifdef UPGRADE_SUPPORT
1625  MHD_UpgradeHandler upgrade_handler;
1626 
1630  void *upgrade_handler_cls;
1631 #endif /* UPGRADE_SUPPORT */
1632 
1637  MHD_mutex_ mutex;
1638 
1642  uint64_t total_size;
1643 
1648  uint64_t data_start;
1649 
1653  uint64_t fd_off;
1654 
1659  size_t data_size;
1660 
1665 
1669  enum MHD_HTTP_StatusCode status_code;
1670 
1675  unsigned int reference_count;
1676 
1680  int fd;
1681 
1685  bool v10_only;
1686 
1690  bool icy;
1691 
1692 };
1693 
1694 
1706 typedef bool
1707 (*MHD_ArgumentIterator_)(struct MHD_Request *request,
1708  const char *key,
1709  const char *value,
1710  enum MHD_ValueKind kind);
1711 
1712 
1727 bool
1728 MHD_parse_arguments_ (struct MHD_Request *request,
1729  enum MHD_ValueKind kind,
1730  char *args,
1732  unsigned int *num_headers);
1733 
1734 
1743 #define DLL_insert(head,tail,element) do { \
1744  mhd_assert (NULL == (element)->next); \
1745  mhd_assert (NULL == (element)->prev); \
1746  (element)->next = (head); \
1747  (element)->prev = NULL; \
1748  if ((tail) == NULL) \
1749  (tail) = element; \
1750  else \
1751  (head)->prev = element; \
1752  (head) = (element); } while (0)
1753 
1754 
1763 #define DLL_remove(head,tail,element) do { \
1764  mhd_assert ( (NULL != (element)->next) || ((element) == (tail))); \
1765  mhd_assert ( (NULL != (element)->prev) || ((element) == (head))); \
1766  if ((element)->prev == NULL) \
1767  (head) = (element)->next; \
1768  else \
1769  (element)->prev->next = (element)->next; \
1770  if ((element)->next == NULL) \
1771  (tail) = (element)->prev; \
1772  else \
1773  (element)->next->prev = (element)->prev; \
1774  (element)->next = NULL; \
1775  (element)->prev = NULL; } while (0)
1776 
1777 
1786 #define XDLL_insert(head,tail,element) do { \
1787  mhd_assert (NULL == (element)->nextX); \
1788  mhd_assert (NULL == (element)->prevX); \
1789  (element)->nextX = (head); \
1790  (element)->prevX = NULL; \
1791  if (NULL == (tail)) \
1792  (tail) = element; \
1793  else \
1794  (head)->prevX = element; \
1795  (head) = (element); } while (0)
1796 
1797 
1806 #define XDLL_remove(head,tail,element) do { \
1807  mhd_assert ( (NULL != (element)->nextX) || ((element) == (tail))); \
1808  mhd_assert ( (NULL != (element)->prevX) || ((element) == (head))); \
1809  if (NULL == (element)->prevX) \
1810  (head) = (element)->nextX; \
1811  else \
1812  (element)->prevX->nextX = (element)->nextX; \
1813  if (NULL == (element)->nextX) \
1814  (tail) = (element)->prevX; \
1815  else \
1816  (element)->nextX->prevX = (element)->prevX; \
1817  (element)->nextX = NULL; \
1818  (element)->prevX = NULL; } while (0)
1819 
1820 
1829 #define EDLL_insert(head,tail,element) do { \
1830  (element)->nextE = (head); \
1831  (element)->prevE = NULL; \
1832  if ((tail) == NULL) \
1833  (tail) = element; \
1834  else \
1835  (head)->prevE = element; \
1836  (head) = (element); } while (0)
1837 
1838 
1847 #define EDLL_remove(head,tail,element) do { \
1848  if ((element)->prevE == NULL) \
1849  (head) = (element)->nextE; \
1850  else \
1851  (element)->prevE->nextE = (element)->nextE; \
1852  if ((element)->nextE == NULL) \
1853  (tail) = (element)->prevE; \
1854  else \
1855  (element)->nextE->prevE = (element)->prevE; \
1856  (element)->nextE = NULL; \
1857  (element)->prevE = NULL; } while (0)
1858 
1859 
1863 #define MHD_ERR_AGAIN_ (-3073)
1864 
1868 #define MHD_ERR_CONNRESET_ (-3074)
1869 
1874 #define MHD_ERR_NOTCONN_ (-3075)
1875 
1879 #define MHD_ERR_NOMEM_ (-3076)
1880 
1884 #define MHD_ERR_BADF_ (-3077)
1885 
1889 #define MHD_ERR_INVAL_ (-3078)
1890 
1891 
1892 #endif
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:2131
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:2239
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2355
MHD_PanicCallback mhd_panic
Definition: panic.c:31
ssize_t(* TransmitCallback)(struct MHD_Connection *conn, const void *read_from, size_t max_bytes)
Definition: internal.h:196
MHD_EpollState
Definition: internal.h:588
@ MHD_EPOLL_STATE_SUSPENDED
Definition: internal.h:621
@ MHD_EPOLL_STATE_IN_EREADY_EDLL
Definition: internal.h:611
@ MHD_EPOLL_STATE_READ_READY
Definition: internal.h:600
@ MHD_EPOLL_STATE_IN_EPOLL_SET
Definition: internal.h:616
@ MHD_EPOLL_STATE_UNREADY
Definition: internal.h:594
@ MHD_EPOLL_STATE_WRITE_READY
Definition: internal.h:606
@ MHD_EPOLL_STATE_ERROR
Definition: internal.h:626
bool(* MHD_ArgumentIterator_)(struct MHD_Request *request, const char *key, const char *value, enum MHD_ValueKind kind)
Definition: internal.h:1707
MHD_ConnKeepAlive
Definition: internal.h:155
@ MHD_CONN_USE_KEEPALIVE
Definition: internal.h:169
@ MHD_CONN_MUST_CLOSE
Definition: internal.h:159
@ MHD_CONN_KEEPALIVE_UNKOWN
Definition: internal.h:164
ssize_t(* ReceiveCallback)(struct MHD_Connection *conn, void *write_to, size_t max_bytes)
Definition: internal.h:182
MHD_REQUEST_STATE
Definition: internal.h:217
@ MHD_REQUEST_CHUNKED_BODY_UNREADY
Definition: internal.h:301
@ MHD_REQUEST_CLOSED
Definition: internal.h:321
@ MHD_REQUEST_CONTINUE_SENDING
Definition: internal.h:247
@ MHD_REQUEST_NORMAL_BODY_READY
Definition: internal.h:285
@ MHD_REQUEST_FOOTER_PART_RECEIVED
Definition: internal.h:263
@ MHD_REQUEST_HEADER_PART_RECEIVED
Definition: internal.h:232
@ MHD_REQUEST_FOOTERS_SENDING
Definition: internal.h:311
@ MHD_REQUEST_HEADERS_SENDING
Definition: internal.h:275
@ MHD_REQUEST_HEADERS_SENT
Definition: internal.h:280
@ MHD_REQUEST_BODY_RECEIVED
Definition: internal.h:257
@ MHD_REQUEST_INIT
Definition: internal.h:222
@ MHD_REQUEST_CHUNKED_BODY_READY
Definition: internal.h:296
@ MHD_REQUEST_HEADERS_RECEIVED
Definition: internal.h:237
@ MHD_REQUEST_FOOTERS_RECEIVED
Definition: internal.h:269
@ MHD_REQUEST_HEADERS_PROCESSED
Definition: internal.h:242
@ MHD_REQUEST_FOOTERS_SENT
Definition: internal.h:316
@ MHD_REQUEST_URL_RECEIVED
Definition: internal.h:227
@ MHD_REQUEST_BODY_SENT
Definition: internal.h:306
@ MHD_REQUEST_CONTINUE_SENT
Definition: internal.h:252
@ MHD_REQUEST_NORMAL_BODY_UNREADY
Definition: internal.h:291
bool MHD_parse_arguments_(struct MHD_Request *request, enum MHD_ValueKind kind, char *args, MHD_ArgumentIterator_ cb, unsigned int *num_headers)
Definition: internal.c:190
void * mhd_panic_cls
Definition: panic.c:36
enum MHD_StatusCode(* ActionCallback)(void *cls, struct MHD_Request *request)
Definition: internal.h:1540
additional automatic macros for MHD_config.h
memory pool; mostly used for efficient (de)allocation for each connection and bounding memory use for...
macros for mhd_assert()
Header for platform missing functions.
Header for platform-independent inter-thread communication.
Types for platform-independent inter-thread communication.
Header for platform-independent locks abstraction.
internal monotonic clock functions implementations
Header for string manipulating helpers.
Header for platform-independent threads abstraction.
int MHD_socket
Definition: microhttpd.h:196
void(* MHD_UpgradeHandler)(void *cls, struct MHD_Connection *connection, void *con_cls, const char *extra_in, size_t extra_in_size, MHD_socket sock, struct MHD_UpgradeResponseHandle *urh)
Definition: microhttpd.h:3333
enum MHD_Result(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:2145
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2339
MHD_ValueKind
Definition: microhttpd.h:1781
interface for TLS plugins of libmicrohttpd
platform-specific includes for libmicrohttpd
ActionCallback action
Definition: internal.h:1554
void * action_cls
Definition: internal.h:1559
MHD_socket socket_fd
Definition: internal.h:752
struct MHD_Connection * prevX
Definition: internal.h:670
socklen_t addr_len
Definition: internal.h:733
bool tls_read_ready
Definition: internal.h:769
void * socket_context
Definition: internal.h:694
bool suspended
Definition: internal.h:764
ReceiveCallback recv_cls
Definition: internal.h:706
bool sk_nonblck
Definition: internal.h:784
struct MHD_Request request
Definition: internal.h:717
struct MHD_Connection * next
Definition: internal.h:651
time_t connection_timeout
Definition: internal.h:745
struct sockaddr_storage addr
Definition: internal.h:728
TransmitCallback send_cls
Definition: internal.h:711
struct MemoryPool * pool
Definition: internal.h:685
struct MHD_Connection * prev
Definition: internal.h:656
MHD_thread_handle_ID_ pid
Definition: internal.h:723
struct MHD_Connection * nextX
Definition: internal.h:665
bool read_closed
Definition: internal.h:792
time_t last_activity
Definition: internal.h:739
struct MHD_Daemon * daemon
Definition: internal.h:675
bool thread_joined
Definition: internal.h:779
bool data_already_pending
Definition: internal.h:1500
MHD_mutex_ per_ip_connection_mutex
Definition: internal.h:1259
void * per_ip_connection_count
Definition: internal.h:1187
bool at_limit
Definition: internal.h:1483
MHD_EarlyUriLogCallback early_uri_logger_cb
Definition: internal.h:1036
unsigned int ip_connection_limit
Definition: internal.h:1356
enum MHD_AddressFamily listen_af
Definition: internal.h:1429
bool was_quiesced
Definition: internal.h:1505
MHD_mutex_ cleanup_connection_mutex
Definition: internal.h:1265
int listen_backlog
Definition: internal.h:1336
MHD_AcceptPolicyCallback accept_policy_cb
Definition: internal.h:1026
struct MHD_Connection * connections_head
Definition: internal.h:1155
uint16_t listen_port
Definition: internal.h:1449
MHD_NotifyConnectionCallback notify_connection_cb
Definition: internal.h:1047
void * notify_connection_cb_cls
Definition: internal.h:1052
size_t listen_sa_len
Definition: internal.h:1271
void * early_uri_logger_cb_cls
Definition: internal.h:1041
unsigned int worker_pool_size
Definition: internal.h:1366
unsigned int connections
Definition: internal.h:1361
struct MHD_itc_ itc
Definition: internal.h:1410
bool disable_itc
Definition: internal.h:1462
void * unescape_cb_cls
Definition: internal.h:1063
enum MHD_FastOpenMethod fast_open_method
Definition: internal.h:1423
bool suppress_date
Definition: internal.h:1456
enum MHD_EventLoopSyscall event_loop_syscall
Definition: internal.h:1436
MHD_RequestCallback rc
Definition: internal.h:1005
struct MHD_Connection * manual_timeout_tail
Definition: internal.h:1150
bool enable_shoutcast
Definition: internal.h:1521
bool disallow_upgrade
Definition: internal.h:1474
volatile bool shutdown
Definition: internal.h:1526
size_t connection_memory_increment_b
Definition: internal.h:1296
MHD_LoggingCallback logger
Definition: internal.h:1015
bool disallow_suspend_resume
Definition: internal.h:1468
bool enable_turbo
Definition: internal.h:1490
struct sockaddr_storage listen_sa
Definition: internal.h:1254
void * rc_cls
Definition: internal.h:1010
struct MHD_Connection * cleanup_tail
Definition: internal.h:1182
bool allow_address_reuse
Definition: internal.h:1516
bool resuming
Definition: internal.h:1510
enum MHD_ProtocolStrictLevel protocol_strict_level
Definition: internal.h:1442
struct MHD_Daemon * worker_pool
Definition: internal.h:1073
MHD_thread_handle_ID_ pid
Definition: internal.h:1249
time_t connection_default_timeout
Definition: internal.h:1371
struct MHD_Connection * manual_timeout_head
Definition: internal.h:1143
MHD_socket listen_socket
Definition: internal.h:1377
struct MHD_Connection * suspended_connections_tail
Definition: internal.h:1172
struct MHD_Connection * cleanup_head
Definition: internal.h:1177
struct MHD_Daemon * master
Definition: internal.h:1068
struct MHD_Connection * normal_timeout_head
Definition: internal.h:1128
size_t connection_memory_limit_b
Definition: internal.h:1281
struct MHD_Connection * normal_timeout_tail
Definition: internal.h:1135
enum MHD_ThreadingMode threading_mode
Definition: internal.h:1417
void * logger_cls
Definition: internal.h:1020
unsigned int global_connection_limit
Definition: internal.h:1351
MHD_UnescapeCallback unescape_cb
Definition: internal.h:1058
void * accept_policy_cb_cls
Definition: internal.h:1031
size_t thread_stack_limit_b
Definition: internal.h:1302
struct MHD_Connection * suspended_connections_head
Definition: internal.h:1166
struct MHD_Connection * connections_tail
Definition: internal.h:1160
unsigned int fo_queue_length
Definition: internal.h:1346
char * header
Definition: internal.h:347
enum MHD_ValueKind kind
Definition: internal.h:358
struct MHD_HTTP_Header * next
Definition: internal.h:342
char * value
Definition: internal.h:352
size_t write_buffer_append_offset
Definition: internal.h:496
struct MHD_Response * response
Definition: internal.h:383
size_t read_buffer_size
Definition: internal.h:474
uint64_t current_chunk_size
Definition: internal.h:516
uint64_t current_chunk_offset
Definition: internal.h:522
struct MHD_HTTP_Header * headers_received
Definition: internal.h:388
struct MHD_HTTP_Header * headers_received_tail
Definition: internal.h:393
size_t continue_message_write_offset
Definition: internal.h:544
void * client_context
Definition: internal.h:401
size_t write_buffer_size
Definition: internal.h:485
enum MHD_Method method
Definition: internal.h:554
const char * url
Definition: internal.h:413
char * read_buffer
Definition: internal.h:433
bool in_idle
Definition: internal.h:565
size_t write_buffer_send_offset
Definition: internal.h:490
size_t read_buffer_offset
Definition: internal.h:480
enum MHD_RequestEventLoopInfo event_loop_info
Definition: internal.h:559
uint64_t response_write_position
Definition: internal.h:529
char * colon
Definition: internal.h:456
struct MHD_Connection * connection
Definition: internal.h:377
char * write_buffer
Definition: internal.h:439
size_t header_size
Definition: internal.h:502
char * last
Definition: internal.h:447
struct MHD_Daemon * daemon
Definition: internal.h:372
bool in_cleanup
Definition: internal.h:571
char * version_s
Definition: internal.h:419
bool have_chunked_upload
Definition: internal.h:580
enum MHD_REQUEST_STATE state
Definition: internal.h:549
enum MHD_ConnKeepAlive keepalive
Definition: internal.h:426
uint64_t remaining_upload_size
Definition: internal.h:508
char * method_s
Definition: internal.h:407
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:1606
void * termination_cb_cls
Definition: internal.h:1617
struct MHD_HTTP_Header * first_header
Definition: internal.h:1582
void * crc_cls
Definition: internal.h:1594
size_t data_buffer_size
Definition: internal.h:1664
bool v10_only
Definition: internal.h:1685
enum MHD_HTTP_StatusCode status_code
Definition: internal.h:1669
uint64_t data_start
Definition: internal.h:1648
MHD_ContentReaderCallback crc
Definition: internal.h:1600
struct MHD_Action action
Definition: internal.h:1575
MHD_RequestTerminationCallback termination_cb
Definition: internal.h:1612
size_t data_size
Definition: internal.h:1659
unsigned int reference_count
Definition: internal.h:1675
char * data
Definition: internal.h:1588
MHD_mutex_ mutex
Definition: internal.h:1637
uint64_t total_size
Definition: internal.h:1642
uint64_t fd_off
Definition: internal.h:1653