GNU libmicrohttpd  0.9.75
microhttpd.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2006-2021 Christian Grothoff (and other contributing authors)
4  Copyright (C) 2014-2021 Evgeny Grin (Karlson2k)
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
80 #ifndef MHD_MICROHTTPD_H
81 #define MHD_MICROHTTPD_H
82 
83 #ifdef __cplusplus
84 extern "C"
85 {
86 #if 0 /* keep Emacsens' auto-indent happy */
87 }
88 #endif
89 #endif
90 
91 
99 #define MHD_VERSION 0x00097500
100 
101 /* If generic headers don't work on your platform, include headers
102  which define 'va_list', 'size_t', 'ssize_t', 'intptr_t',
103  'uint16_t', 'uint32_t', 'uint64_t', 'off_t', 'struct sockaddr',
104  'socklen_t', 'fd_set' and "#define MHD_PLATFORM_H" before
105  including "microhttpd.h". Then the following "standard"
106  includes won't be used (which might be a good idea, especially
107  on platforms where they do not exist).
108  */
109 #ifndef MHD_PLATFORM_H
110 #if defined(_WIN32) && ! defined(__CYGWIN__) && \
111  ! defined(_CRT_DECLARE_NONSTDC_NAMES)
112 /* Declare POSIX-compatible names */
113 #define _CRT_DECLARE_NONSTDC_NAMES 1
114 #endif /* _WIN32 && ! __CYGWIN__ && ! _CRT_DECLARE_NONSTDC_NAMES */
115 #include <stdarg.h>
116 #include <stdint.h>
117 #include <sys/types.h>
118 #if ! defined(_WIN32) || defined(__CYGWIN__)
119 #include <unistd.h>
120 #include <sys/time.h>
121 #include <sys/socket.h>
122 #else /* _WIN32 && ! __CYGWIN__ */
123 #include <ws2tcpip.h>
124 #if defined(_MSC_FULL_VER) && ! defined (_SSIZE_T_DEFINED)
125 #define _SSIZE_T_DEFINED
126 typedef intptr_t ssize_t;
127 #endif /* !_SSIZE_T_DEFINED */
128 #endif /* _WIN32 && ! __CYGWIN__ */
129 #endif
130 
131 #if defined(__CYGWIN__) && ! defined(_SYS_TYPES_FD_SET)
132 /* Do not define __USE_W32_SOCKETS under Cygwin! */
133 #error Cygwin with winsock fd_set is not supported
134 #endif
135 
136 #ifdef __has_attribute
137 #if __has_attribute (flag_enum)
138 #define _MHD_FLAGS_ENUM __attribute__((flag_enum))
139 #endif /* flag_enum */
140 #if __has_attribute (enum_extensibility)
141 #define _MHD_FIXED_ENUM __attribute__((enum_extensibility (closed)))
142 #endif /* enum_extensibility */
143 #endif /* __has_attribute */
144 
145 #ifndef _MHD_FLAGS_ENUM
146 #define _MHD_FLAGS_ENUM
147 #endif /* _MHD_FLAGS_ENUM */
148 #ifndef _MHD_FIXED_ENUM
149 #define _MHD_FIXED_ENUM
150 #endif /* _MHD_FIXED_ENUM */
151 
152 #define _MHD_FIXED_FLAGS_ENUM _MHD_FIXED_ENUM _MHD_FLAGS_ENUM
153 
158 {
162  MHD_NO = 0,
163 
167  MHD_YES = 1
168 
170 
171 
175 #define MHD_INVALID_NONCE -1
176 
181 #ifdef UINT64_MAX
182 #define MHD_SIZE_UNKNOWN UINT64_MAX
183 #else
184 #define MHD_SIZE_UNKNOWN ((uint64_t) -1LL)
185 #endif
186 
187 #define MHD_CONTENT_READER_END_OF_STREAM ((ssize_t) -1)
188 #define MHD_CONTENT_READER_END_WITH_ERROR ((ssize_t) -2)
189 
190 #ifndef _MHD_EXTERN
191 #if defined(_WIN32) && defined(MHD_W32LIB)
192 #define _MHD_EXTERN extern
193 #elif defined (_WIN32) && defined(MHD_W32DLL)
194 /* Define MHD_W32DLL when using MHD as W32 .DLL to speed up linker a little */
195 #define _MHD_EXTERN __declspec(dllimport)
196 #else
197 #define _MHD_EXTERN extern
198 #endif
199 #endif
200 
201 #ifndef MHD_SOCKET_DEFINED
205 #if ! defined(_WIN32) || defined(_SYS_TYPES_FD_SET)
206 #define MHD_POSIX_SOCKETS 1
207 typedef int MHD_socket;
208 #define MHD_INVALID_SOCKET (-1)
209 #else /* !defined(_WIN32) || defined(_SYS_TYPES_FD_SET) */
210 #define MHD_WINSOCK_SOCKETS 1
211 #include <winsock2.h>
212 typedef SOCKET MHD_socket;
213 #define MHD_INVALID_SOCKET (INVALID_SOCKET)
214 #endif /* !defined(_WIN32) || defined(_SYS_TYPES_FD_SET) */
215 #define MHD_SOCKET_DEFINED 1
216 #endif /* MHD_SOCKET_DEFINED */
217 
221 #ifdef MHD_NO_DEPRECATION
222 #define _MHD_DEPR_MACRO(msg)
223 #define _MHD_NO_DEPR_IN_MACRO 1
224 #define _MHD_DEPR_IN_MACRO(msg)
225 #define _MHD_NO_DEPR_FUNC 1
226 #define _MHD_DEPR_FUNC(msg)
227 #endif /* MHD_NO_DEPRECATION */
228 
229 #ifndef _MHD_DEPR_MACRO
230 #if defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1500
231 /* VS 2008 or later */
232 /* Stringify macros */
233 #define _MHD_INSTRMACRO(a) #a
234 #define _MHD_STRMACRO(a) _MHD_INSTRMACRO (a)
235 /* deprecation message */
236 #define _MHD_DEPR_MACRO(msg) \
237  __pragma(message (__FILE__ "(" _MHD_STRMACRO ( __LINE__) "): warning: " msg))
238 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg)
239 #elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__)
240 /* clang or GCC since 3.0 */
241 #define _MHD_GCC_PRAG(x) _Pragma(#x)
242 #if (defined(__clang__) && \
243  (__clang_major__ + 0 >= 5 || \
244  (! defined(__apple_build_version__) && \
245  (__clang_major__ + 0 > 3 || \
246  (__clang_major__ + 0 == 3 && __clang_minor__ >= 3))))) || \
247  __GNUC__ + 0 > 4 || (__GNUC__ + 0 == 4 && __GNUC_MINOR__ + 0 >= 8)
248 /* clang >= 3.3 (or XCode's clang >= 5.0) or
249  GCC >= 4.8 */
250 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG (GCC warning msg)
251 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg)
252 #else /* older clang or GCC */
253 /* clang < 3.3, XCode's clang < 5.0, 3.0 <= GCC < 4.8 */
254 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG (message msg)
255 #if (defined(__clang__) && \
256  (__clang_major__ + 0 > 2 || \
257  (__clang_major__ + 0 == 2 && __clang_minor__ >= 9))) /* clang >= 2.9 */
258 /* clang handles inline pragmas better than GCC */
259 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg)
260 #endif /* clang >= 2.9 */
261 #endif /* older clang or GCC */
262 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */
263 #endif /* clang || GCC >= 3.0 */
264 #endif /* !_MHD_DEPR_MACRO */
265 
266 #ifndef _MHD_DEPR_MACRO
267 #define _MHD_DEPR_MACRO(msg)
268 #endif /* !_MHD_DEPR_MACRO */
269 
270 #ifndef _MHD_DEPR_IN_MACRO
271 #define _MHD_NO_DEPR_IN_MACRO 1
272 #define _MHD_DEPR_IN_MACRO(msg)
273 #endif /* !_MHD_DEPR_IN_MACRO */
274 
275 #ifndef _MHD_DEPR_FUNC
276 #if defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1400
277 /* VS 2005 or later */
278 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated (msg))
279 #elif defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1310
280 /* VS .NET 2003 deprecation does not support custom messages */
281 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated)
282 #elif (__GNUC__ + 0 >= 5) || (defined (__clang__) && \
283  (__clang_major__ + 0 > 2 || \
284  (__clang_major__ + 0 == 2 && __clang_minor__ >= 9)))
285 /* GCC >= 5.0 or clang >= 2.9 */
286 #define _MHD_DEPR_FUNC(msg) __attribute__((deprecated (msg)))
287 #elif defined (__clang__) || __GNUC__ + 0 > 3 || \
288  (__GNUC__ + 0 == 3 && __GNUC_MINOR__ + 0 >= 1)
289 /* 3.1 <= GCC < 5.0 or clang < 2.9 */
290 /* old GCC-style deprecation does not support custom messages */
291 #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__))
292 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */
293 #endif /* clang < 2.9 || GCC >= 3.1 */
294 #endif /* !_MHD_DEPR_FUNC */
295 
296 #ifndef _MHD_DEPR_FUNC
297 #define _MHD_NO_DEPR_FUNC 1
298 #define _MHD_DEPR_FUNC(msg)
299 #endif /* !_MHD_DEPR_FUNC */
300 
306 #ifndef MHD_LONG_LONG
310 #define MHD_LONG_LONG long long
311 #define MHD_UNSIGNED_LONG_LONG unsigned long long
312 #else /* MHD_LONG_LONG */
313 _MHD_DEPR_MACRO ( \
314  "Macro MHD_LONG_LONG is deprecated, use MHD_UNSIGNED_LONG_LONG")
315 #endif
320 #ifndef MHD_LONG_LONG_PRINTF
324 #define MHD_LONG_LONG_PRINTF "ll"
325 #define MHD_UNSIGNED_LONG_LONG_PRINTF "%llu"
326 #else /* MHD_LONG_LONG_PRINTF */
327 _MHD_DEPR_MACRO ( \
328  "Macro MHD_LONG_LONG_PRINTF is deprecated, use MHD_UNSIGNED_LONG_LONG_PRINTF")
329 #endif
330 
331 
335 #define MHD_MD5_DIGEST_SIZE 16
336 
337 
346 /* 100 "Continue". RFC-ietf-httpbis-semantics, Section 15.2.1. */
347 #define MHD_HTTP_CONTINUE 100
348 /* 101 "Switching Protocols". RFC-ietf-httpbis-semantics, Section 15.2.2. */
349 #define MHD_HTTP_SWITCHING_PROTOCOLS 101
350 /* 102 "Processing". RFC2518. */
351 #define MHD_HTTP_PROCESSING 102
352 /* 103 "Early Hints". RFC8297. */
353 #define MHD_HTTP_EARLY_HINTS 103
354 
355 /* 200 "OK". RFC-ietf-httpbis-semantics, Section 15.3.1. */
356 #define MHD_HTTP_OK 200
357 /* 201 "Created". RFC-ietf-httpbis-semantics, Section 15.3.2. */
358 #define MHD_HTTP_CREATED 201
359 /* 202 "Accepted". RFC-ietf-httpbis-semantics, Section 15.3.3. */
360 #define MHD_HTTP_ACCEPTED 202
361 /* 203 "Non-Authoritative Information". RFC-ietf-httpbis-semantics, Section 15.3.4. */
362 #define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203
363 /* 204 "No Content". RFC-ietf-httpbis-semantics, Section 15.3.5. */
364 #define MHD_HTTP_NO_CONTENT 204
365 /* 205 "Reset Content". RFC-ietf-httpbis-semantics, Section 15.3.6. */
366 #define MHD_HTTP_RESET_CONTENT 205
367 /* 206 "Partial Content". RFC-ietf-httpbis-semantics, Section 15.3.7. */
368 #define MHD_HTTP_PARTIAL_CONTENT 206
369 /* 207 "Multi-Status". RFC4918. */
370 #define MHD_HTTP_MULTI_STATUS 207
371 /* 208 "Already Reported". RFC5842. */
372 #define MHD_HTTP_ALREADY_REPORTED 208
373 
374 /* 226 "IM Used". RFC3229. */
375 #define MHD_HTTP_IM_USED 226
376 
377 /* 300 "Multiple Choices". RFC-ietf-httpbis-semantics, Section 15.4.1. */
378 #define MHD_HTTP_MULTIPLE_CHOICES 300
379 /* 301 "Moved Permanently". RFC-ietf-httpbis-semantics, Section 15.4.2. */
380 #define MHD_HTTP_MOVED_PERMANENTLY 301
381 /* 302 "Found". RFC-ietf-httpbis-semantics, Section 15.4.3. */
382 #define MHD_HTTP_FOUND 302
383 /* 303 "See Other". RFC-ietf-httpbis-semantics, Section 15.4.4. */
384 #define MHD_HTTP_SEE_OTHER 303
385 /* 304 "Not Modified". RFC-ietf-httpbis-semantics, Section 15.4.5. */
386 #define MHD_HTTP_NOT_MODIFIED 304
387 /* 305 "Use Proxy". RFC-ietf-httpbis-semantics, Section 15.4.6. */
388 #define MHD_HTTP_USE_PROXY 305
389 /* 306 "Switch Proxy". Not used! RFC-ietf-httpbis-semantics, Section 15.4.7. */
390 #define MHD_HTTP_SWITCH_PROXY 306
391 /* 307 "Temporary Redirect". RFC-ietf-httpbis-semantics, Section 15.4.8. */
392 #define MHD_HTTP_TEMPORARY_REDIRECT 307
393 /* 308 "Permanent Redirect". RFC-ietf-httpbis-semantics, Section 15.4.9. */
394 #define MHD_HTTP_PERMANENT_REDIRECT 308
395 
396 /* 400 "Bad Request". RFC-ietf-httpbis-semantics, Section 15.5.1. */
397 #define MHD_HTTP_BAD_REQUEST 400
398 /* 401 "Unauthorized". RFC-ietf-httpbis-semantics, Section 15.5.2. */
399 #define MHD_HTTP_UNAUTHORIZED 401
400 /* 402 "Payment Required". RFC-ietf-httpbis-semantics, Section 15.5.3. */
401 #define MHD_HTTP_PAYMENT_REQUIRED 402
402 /* 403 "Forbidden". RFC-ietf-httpbis-semantics, Section 15.5.4. */
403 #define MHD_HTTP_FORBIDDEN 403
404 /* 404 "Not Found". RFC-ietf-httpbis-semantics, Section 15.5.5. */
405 #define MHD_HTTP_NOT_FOUND 404
406 /* 405 "Method Not Allowed". RFC-ietf-httpbis-semantics, Section 15.5.6. */
407 #define MHD_HTTP_METHOD_NOT_ALLOWED 405
408 /* 406 "Not Acceptable". RFC-ietf-httpbis-semantics, Section 15.5.7. */
409 #define MHD_HTTP_NOT_ACCEPTABLE 406
410 /* 407 "Proxy Authentication Required". RFC-ietf-httpbis-semantics, Section 15.5.8. */
411 #define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
412 /* 408 "Request Timeout". RFC-ietf-httpbis-semantics, Section 15.5.9. */
413 #define MHD_HTTP_REQUEST_TIMEOUT 408
414 /* 409 "Conflict". RFC-ietf-httpbis-semantics, Section 15.5.10. */
415 #define MHD_HTTP_CONFLICT 409
416 /* 410 "Gone". RFC-ietf-httpbis-semantics, Section 15.5.11. */
417 #define MHD_HTTP_GONE 410
418 /* 411 "Length Required". RFC-ietf-httpbis-semantics, Section 15.5.12. */
419 #define MHD_HTTP_LENGTH_REQUIRED 411
420 /* 412 "Precondition Failed". RFC-ietf-httpbis-semantics, Section 15.5.13. */
421 #define MHD_HTTP_PRECONDITION_FAILED 412
422 /* 413 "Content Too Large". RFC-ietf-httpbis-semantics, Section 15.5.14. */
423 #define MHD_HTTP_CONTENT_TOO_LARGE 413
424 /* 414 "URI Too Long". RFC-ietf-httpbis-semantics, Section 15.5.15. */
425 #define MHD_HTTP_URI_TOO_LONG 414
426 /* 415 "Unsupported Media Type". RFC-ietf-httpbis-semantics, Section 15.5.16. */
427 #define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415
428 /* 416 "Range Not Satisfiable". RFC-ietf-httpbis-semantics, Section 15.5.17. */
429 #define MHD_HTTP_RANGE_NOT_SATISFIABLE 416
430 /* 417 "Expectation Failed". RFC-ietf-httpbis-semantics, Section 15.5.18. */
431 #define MHD_HTTP_EXPECTATION_FAILED 417
432 
433 
434 /* 421 "Misdirected Request". RFC-ietf-httpbis-semantics, Section 15.5.20. */
435 #define MHD_HTTP_MISDIRECTED_REQUEST 421
436 /* 422 "Unprocessable Content". RFC-ietf-httpbis-semantics, Section 15.5.21. */
437 #define MHD_HTTP_UNPROCESSABLE_CONTENT 422
438 /* 423 "Locked". RFC4918. */
439 #define MHD_HTTP_LOCKED 423
440 /* 424 "Failed Dependency". RFC4918. */
441 #define MHD_HTTP_FAILED_DEPENDENCY 424
442 /* 425 "Too Early". RFC8470. */
443 #define MHD_HTTP_TOO_EARLY 425
444 /* 426 "Upgrade Required". RFC-ietf-httpbis-semantics, Section 15.5.22. */
445 #define MHD_HTTP_UPGRADE_REQUIRED 426
446 
447 /* 428 "Precondition Required". RFC6585. */
448 #define MHD_HTTP_PRECONDITION_REQUIRED 428
449 /* 429 "Too Many Requests". RFC6585. */
450 #define MHD_HTTP_TOO_MANY_REQUESTS 429
451 
452 /* 431 "Request Header Fields Too Large". RFC6585. */
453 #define MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
454 
455 /* 451 "Unavailable For Legal Reasons". RFC7725. */
456 #define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
457 
458 /* 500 "Internal Server Error". RFC-ietf-httpbis-semantics, Section 15.6.1. */
459 #define MHD_HTTP_INTERNAL_SERVER_ERROR 500
460 /* 501 "Not Implemented". RFC-ietf-httpbis-semantics, Section 15.6.2. */
461 #define MHD_HTTP_NOT_IMPLEMENTED 501
462 /* 502 "Bad Gateway". RFC-ietf-httpbis-semantics, Section 15.6.3. */
463 #define MHD_HTTP_BAD_GATEWAY 502
464 /* 503 "Service Unavailable". RFC-ietf-httpbis-semantics, Section 15.6.4. */
465 #define MHD_HTTP_SERVICE_UNAVAILABLE 503
466 /* 504 "Gateway Timeout". RFC-ietf-httpbis-semantics, Section 15.6.5. */
467 #define MHD_HTTP_GATEWAY_TIMEOUT 504
468 /* 505 "HTTP Version Not Supported". RFC-ietf-httpbis-semantics, Section 15.6.6. */
469 #define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
470 /* 506 "Variant Also Negotiates". RFC2295. */
471 #define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506
472 /* 507 "Insufficient Storage". RFC4918. */
473 #define MHD_HTTP_INSUFFICIENT_STORAGE 507
474 /* 508 "Loop Detected". RFC5842. */
475 #define MHD_HTTP_LOOP_DETECTED 508
476 
477 /* 510 "Not Extended". RFC2774. */
478 #define MHD_HTTP_NOT_EXTENDED 510
479 /* 511 "Network Authentication Required". RFC6585. */
480 #define MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
481 
482 
483 /* Not registered non-standard codes */
484 /* 449 "Reply With". MS IIS extension. */
485 #define MHD_HTTP_RETRY_WITH 449
486 
487 /* 450 "Blocked by Windows Parental Controls". MS extension. */
488 #define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
489 
490 /* 509 "Bandwidth Limit Exceeded". Apache extension. */
491 #define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
492 
493 /* Deprecated names and codes */
495 #define MHD_HTTP_METHOD_NOT_ACCEPTABLE \
496  _MHD_DEPR_IN_MACRO ( \
497  "Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") \
498  406
499 
501 #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \
502  _MHD_DEPR_IN_MACRO ( \
503  "Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_CONTENT_TOO_LARGE") \
504  413
505 
507 #define MHD_HTTP_PAYLOAD_TOO_LARGE \
508  _MHD_DEPR_IN_MACRO ( \
509  "Value MHD_HTTP_PAYLOAD_TOO_LARGE is deprecated, use MHD_HTTP_CONTENT_TOO_LARGE") \
510  413
511 
513 #define MHD_HTTP_REQUEST_URI_TOO_LONG \
514  _MHD_DEPR_IN_MACRO ( \
515  "Value MHD_HTTP_REQUEST_URI_TOO_LONG is deprecated, use MHD_HTTP_URI_TOO_LONG") \
516  414
517 
519 #define MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE \
520  _MHD_DEPR_IN_MACRO ( \
521  "Value MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE is deprecated, use MHD_HTTP_RANGE_NOT_SATISFIABLE") \
522  416
523 
525 #define MHD_HTTP_UNPROCESSABLE_ENTITY \
526  _MHD_DEPR_IN_MACRO ( \
527  "Value MHD_HTTP_UNPROCESSABLE_ENTITY is deprecated, use MHD_HTTP_UNPROCESSABLE_CONTENT") \
528  422
529 
531 #define MHD_HTTP_UNORDERED_COLLECTION \
532  _MHD_DEPR_IN_MACRO ( \
533  "Value MHD_HTTP_UNORDERED_COLLECTION is deprecated as it was removed from RFC") \
534  425
535 
537 #define MHD_HTTP_NO_RESPONSE \
538  _MHD_DEPR_IN_MACRO ( \
539  "Value MHD_HTTP_NO_RESPONSE is deprecated as it is nginx internal code for logs only") \
540  444
541 
542  /* end of group httpcode */
544 
551 _MHD_EXTERN const char *
552 MHD_get_reason_phrase_for (unsigned int code);
553 
554 
561 _MHD_EXTERN size_t
562 MHD_get_reason_phrase_len_for (unsigned int code);
563 
570 #define MHD_ICY_FLAG ((uint32_t) (((uint32_t) 1) << 31))
571 
580 /* Main HTTP headers. */
581 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 12.5.1 */
582 #define MHD_HTTP_HEADER_ACCEPT "Accept"
583 /* Deprecated. RFC-ietf-httpbis-semantics-19, Section 12.5.2 */
584 #define MHD_HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"
585 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 12.5.3 */
586 #define MHD_HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding"
587 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 12.5.4 */
588 #define MHD_HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"
589 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 14.3 */
590 #define MHD_HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges"
591 /* Permanent. RFC-ietf-httpbis-cache-19, Section 5.1 */
592 #define MHD_HTTP_HEADER_AGE "Age"
593 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.2.1 */
594 #define MHD_HTTP_HEADER_ALLOW "Allow"
595 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 11.6.3 */
596 #define MHD_HTTP_HEADER_AUTHENTICATION_INFO "Authentication-Info"
597 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 11.6.2 */
598 #define MHD_HTTP_HEADER_AUTHORIZATION "Authorization"
599 /* Permanent. RFC-ietf-httpbis-cache-19, Section 5.2 */
600 #define MHD_HTTP_HEADER_CACHE_CONTROL "Cache-Control"
601 /* Permanent. RFC-ietf-httpbis-cache-header-10 */
602 #define MHD_HTTP_HEADER_CACHE_STATUS "Cache-Status"
603 /* Permanent. RFC-ietf-httpbis-messaging-19, Section 9.6 */
604 #define MHD_HTTP_HEADER_CLOSE "Close"
605 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 7.6.1 */
606 #define MHD_HTTP_HEADER_CONNECTION "Connection"
607 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 8.4 */
608 #define MHD_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"
609 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 8.5 */
610 #define MHD_HTTP_HEADER_CONTENT_LANGUAGE "Content-Language"
611 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 8.6 */
612 #define MHD_HTTP_HEADER_CONTENT_LENGTH "Content-Length"
613 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 8.7 */
614 #define MHD_HTTP_HEADER_CONTENT_LOCATION "Content-Location"
615 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 14.4 */
616 #define MHD_HTTP_HEADER_CONTENT_RANGE "Content-Range"
617 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 8.3 */
618 #define MHD_HTTP_HEADER_CONTENT_TYPE "Content-Type"
619 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 6.6.1 */
620 #define MHD_HTTP_HEADER_DATE "Date"
621 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 8.8.3 */
622 #define MHD_HTTP_HEADER_ETAG "ETag"
623 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.1.1 */
624 #define MHD_HTTP_HEADER_EXPECT "Expect"
625 /* Permanent. RFC-ietf-httpbis-expect-ct-08 */
626 #define MHD_HTTP_HEADER_EXPECT_CT "Expect-CT"
627 /* Permanent. RFC-ietf-httpbis-cache-19, Section 5.3 */
628 #define MHD_HTTP_HEADER_EXPIRES "Expires"
629 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.1.2 */
630 #define MHD_HTTP_HEADER_FROM "From"
631 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 7.2 */
632 #define MHD_HTTP_HEADER_HOST "Host"
633 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 13.1.1 */
634 #define MHD_HTTP_HEADER_IF_MATCH "If-Match"
635 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 13.1.3 */
636 #define MHD_HTTP_HEADER_IF_MODIFIED_SINCE "If-Modified-Since"
637 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 13.1.2 */
638 #define MHD_HTTP_HEADER_IF_NONE_MATCH "If-None-Match"
639 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 13.1.5 */
640 #define MHD_HTTP_HEADER_IF_RANGE "If-Range"
641 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 13.1.4 */
642 #define MHD_HTTP_HEADER_IF_UNMODIFIED_SINCE "If-Unmodified-Since"
643 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 8.8.2 */
644 #define MHD_HTTP_HEADER_LAST_MODIFIED "Last-Modified"
645 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.2.2 */
646 #define MHD_HTTP_HEADER_LOCATION "Location"
647 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 7.6.2 */
648 #define MHD_HTTP_HEADER_MAX_FORWARDS "Max-Forwards"
649 /* Permanent. RFC-ietf-httpbis-messaging-19, Appendix B.1 */
650 #define MHD_HTTP_HEADER_MIME_VERSION "MIME-Version"
651 /* Permanent. RFC-ietf-httpbis-cache-19, Section 5.4 */
652 #define MHD_HTTP_HEADER_PRAGMA "Pragma"
653 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 11.7.1 */
654 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate"
655 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 11.7.3 */
656 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATION_INFO "Proxy-Authentication-Info"
657 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 11.7.2 */
658 #define MHD_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization"
659 /* Permanent. RFC-ietf-httpbis-proxy-status-08 */
660 #define MHD_HTTP_HEADER_PROXY_STATUS "Proxy-Status"
661 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 14.2 */
662 #define MHD_HTTP_HEADER_RANGE "Range"
663 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.1.3 */
664 #define MHD_HTTP_HEADER_REFERER "Referer"
665 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.2.3 */
666 #define MHD_HTTP_HEADER_RETRY_AFTER "Retry-After"
667 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.2.4 */
668 #define MHD_HTTP_HEADER_SERVER "Server"
669 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.1.4 */
670 #define MHD_HTTP_HEADER_TE "TE"
671 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 6.6.2 */
672 #define MHD_HTTP_HEADER_TRAILER "Trailer"
673 /* Permanent. RFC-ietf-httpbis-messaging-19, Section 6.1 */
674 #define MHD_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
675 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 7.8 */
676 #define MHD_HTTP_HEADER_UPGRADE "Upgrade"
677 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 10.1.5 */
678 #define MHD_HTTP_HEADER_USER_AGENT "User-Agent"
679 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 12.5.5 */
680 #define MHD_HTTP_HEADER_VARY "Vary"
681 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 7.6.3 */
682 #define MHD_HTTP_HEADER_VIA "Via"
683 /* Obsoleted. RFC-ietf-httpbis-cache-19, Section 5.5 */
684 #define MHD_HTTP_HEADER_WARNING "Warning"
685 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 11.6.1 */
686 #define MHD_HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate"
687 /* Permanent. RFC-ietf-httpbis-semantics-19, Section 12.5.5 */
688 #define MHD_HTTP_HEADER_ASTERISK "*"
689 
690 /* Additional HTTP headers. */
691 /* Permanent. RFC4229 */
692 #define MHD_HTTP_HEADER_A_IM "A-IM"
693 /* Permanent. RFC4229 */
694 #define MHD_HTTP_HEADER_ACCEPT_ADDITIONS "Accept-Additions"
695 /* Permanent. RFC8942, Section 3.1 */
696 #define MHD_HTTP_HEADER_ACCEPT_CH "Accept-CH"
697 /* Permanent. RFC7089 */
698 #define MHD_HTTP_HEADER_ACCEPT_DATETIME "Accept-Datetime"
699 /* Permanent. RFC4229 */
700 #define MHD_HTTP_HEADER_ACCEPT_FEATURES "Accept-Features"
701 /* Permanent. https://www.w3.org/TR/ldp/ */
702 #define MHD_HTTP_HEADER_ACCEPT_POST "Accept-Post"
703 /* Permanent. https://fetch.spec.whatwg.org/#http-access-control-allow-credentials */
704 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS \
705  "Access-Control-Allow-Credentials"
706 /* Permanent. https://fetch.spec.whatwg.org/#http-access-control-allow-headers */
707 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_HEADERS \
708  "Access-Control-Allow-Headers"
709 /* Permanent. https://fetch.spec.whatwg.org/#http-access-control-allow-methods */
710 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_METHODS \
711  "Access-Control-Allow-Methods"
712 /* Permanent. https://fetch.spec.whatwg.org/#http-access-control-allow-origin */
713 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN \
714  "Access-Control-Allow-Origin"
715 /* Permanent. https://fetch.spec.whatwg.org/#http-access-control-expose-headers */
716 #define MHD_HTTP_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS \
717  "Access-Control-Expose-Headers"
718 /* Permanent. https://fetch.spec.whatwg.org/#http-access-control-max-age */
719 #define MHD_HTTP_HEADER_ACCESS_CONTROL_MAX_AGE "Access-Control-Max-Age"
720 /* Permanent. https://fetch.spec.whatwg.org/#http-access-control-request-headers */
721 #define MHD_HTTP_HEADER_ACCESS_CONTROL_REQUEST_HEADERS \
722  "Access-Control-Request-Headers"
723 /* Permanent. https://fetch.spec.whatwg.org/#http-access-control-request-method */
724 #define MHD_HTTP_HEADER_ACCESS_CONTROL_REQUEST_METHOD \
725  "Access-Control-Request-Method"
726 /* Permanent. RFC7639, Section 2 */
727 #define MHD_HTTP_HEADER_ALPN "ALPN"
728 /* Permanent. RFC7838 */
729 #define MHD_HTTP_HEADER_ALT_SVC "Alt-Svc"
730 /* Permanent. RFC7838 */
731 #define MHD_HTTP_HEADER_ALT_USED "Alt-Used"
732 /* Permanent. RFC4229 */
733 #define MHD_HTTP_HEADER_ALTERNATES "Alternates"
734 /* Permanent. RFC4437 */
735 #define MHD_HTTP_HEADER_APPLY_TO_REDIRECT_REF "Apply-To-Redirect-Ref"
736 /* Permanent. RFC8053, Section 4 */
737 #define MHD_HTTP_HEADER_AUTHENTICATION_CONTROL "Authentication-Control"
738 /* Permanent. RFC4229 */
739 #define MHD_HTTP_HEADER_C_EXT "C-Ext"
740 /* Permanent. RFC4229 */
741 #define MHD_HTTP_HEADER_C_MAN "C-Man"
742 /* Permanent. RFC4229 */
743 #define MHD_HTTP_HEADER_C_OPT "C-Opt"
744 /* Permanent. RFC4229 */
745 #define MHD_HTTP_HEADER_C_PEP "C-PEP"
746 /* Permanent. RFC8607, Section 5.1 */
747 #define MHD_HTTP_HEADER_CAL_MANAGED_ID "Cal-Managed-ID"
748 /* Permanent. RFC7809, Section 7.1 */
749 #define MHD_HTTP_HEADER_CALDAV_TIMEZONES "CalDAV-Timezones"
750 /* Permanent. RFC8586 */
751 #define MHD_HTTP_HEADER_CDN_LOOP "CDN-Loop"
752 /* Permanent. RFC8739, Section 3.3 */
753 #define MHD_HTTP_HEADER_CERT_NOT_AFTER "Cert-Not-After"
754 /* Permanent. RFC8739, Section 3.3 */
755 #define MHD_HTTP_HEADER_CERT_NOT_BEFORE "Cert-Not-Before"
756 /* Permanent. RFC6266 */
757 #define MHD_HTTP_HEADER_CONTENT_DISPOSITION "Content-Disposition"
758 /* Permanent. RFC4229 */
759 #define MHD_HTTP_HEADER_CONTENT_ID "Content-ID"
760 /* Permanent. RFC4229 */
761 #define MHD_HTTP_HEADER_CONTENT_SCRIPT_TYPE "Content-Script-Type"
762 /* Permanent. https://www.w3.org/TR/CSP/#csp-header */
763 #define MHD_HTTP_HEADER_CONTENT_SECURITY_POLICY "Content-Security-Policy"
764 /* Permanent. https://www.w3.org/TR/CSP/#cspro-header */
765 #define MHD_HTTP_HEADER_CONTENT_SECURITY_POLICY_REPORT_ONLY \
766  "Content-Security-Policy-Report-Only"
767 /* Permanent. RFC4229 */
768 #define MHD_HTTP_HEADER_CONTENT_STYLE_TYPE "Content-Style-Type"
769 /* Permanent. RFC4229 */
770 #define MHD_HTTP_HEADER_CONTENT_VERSION "Content-Version"
771 /* Permanent. RFC6265 */
772 #define MHD_HTTP_HEADER_COOKIE "Cookie"
773 /* Permanent. https://html.spec.whatwg.org/multipage/origin.html#cross-origin-embedder-policy */
774 #define MHD_HTTP_HEADER_CROSS_ORIGIN_EMBEDDER_POLICY \
775  "Cross-Origin-Embedder-Policy"
776 /* Permanent. https://html.spec.whatwg.org/multipage/origin.html#cross-origin-embedder-policy-report-only */
777 #define MHD_HTTP_HEADER_CROSS_ORIGIN_EMBEDDER_POLICY_REPORT_ONLY \
778  "Cross-Origin-Embedder-Policy-Report-Only"
779 /* Permanent. https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy-2 */
780 #define MHD_HTTP_HEADER_CROSS_ORIGIN_OPENER_POLICY "Cross-Origin-Opener-Policy"
781 /* Permanent. https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policy-report-only */
782 #define MHD_HTTP_HEADER_CROSS_ORIGIN_OPENER_POLICY_REPORT_ONLY \
783  "Cross-Origin-Opener-Policy-Report-Only"
784 /* Permanent. https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header */
785 #define MHD_HTTP_HEADER_CROSS_ORIGIN_RESOURCE_POLICY \
786  "Cross-Origin-Resource-Policy"
787 /* Permanent. RFC5323 */
788 #define MHD_HTTP_HEADER_DASL "DASL"
789 /* Permanent. RFC4918 */
790 #define MHD_HTTP_HEADER_DAV "DAV"
791 /* Permanent. RFC4229 */
792 #define MHD_HTTP_HEADER_DEFAULT_STYLE "Default-Style"
793 /* Permanent. RFC4229 */
794 #define MHD_HTTP_HEADER_DELTA_BASE "Delta-Base"
795 /* Permanent. RFC4918 */
796 #define MHD_HTTP_HEADER_DEPTH "Depth"
797 /* Permanent. RFC4229 */
798 #define MHD_HTTP_HEADER_DERIVED_FROM "Derived-From"
799 /* Permanent. RFC4918 */
800 #define MHD_HTTP_HEADER_DESTINATION "Destination"
801 /* Permanent. RFC4229 */
802 #define MHD_HTTP_HEADER_DIFFERENTIAL_ID "Differential-ID"
803 /* Permanent. RFC4229 */
804 #define MHD_HTTP_HEADER_DIGEST "Digest"
805 /* Permanent. RFC8470 */
806 #define MHD_HTTP_HEADER_EARLY_DATA "Early-Data"
807 /* Permanent. RFC4229 */
808 #define MHD_HTTP_HEADER_EXT "Ext"
809 /* Permanent. RFC7239 */
810 #define MHD_HTTP_HEADER_FORWARDED "Forwarded"
811 /* Permanent. RFC4229 */
812 #define MHD_HTTP_HEADER_GETPROFILE "GetProfile"
813 /* Permanent. RFC7486, Section 6.1.1 */
814 #define MHD_HTTP_HEADER_HOBAREG "Hobareg"
815 /* Permanent. RFC7540, Section 3.2.1 */
816 #define MHD_HTTP_HEADER_HTTP2_SETTINGS "HTTP2-Settings"
817 /* Permanent. RFC4918 */
818 #define MHD_HTTP_HEADER_IF "If"
819 /* Permanent. RFC6638 */
820 #define MHD_HTTP_HEADER_IF_SCHEDULE_TAG_MATCH "If-Schedule-Tag-Match"
821 /* Permanent. RFC4229 */
822 #define MHD_HTTP_HEADER_IM "IM"
823 /* Permanent. RFC8473 */
824 #define MHD_HTTP_HEADER_INCLUDE_REFERRED_TOKEN_BINDING_ID \
825  "Include-Referred-Token-Binding-ID"
826 /* Permanent. RFC4229 */
827 #define MHD_HTTP_HEADER_KEEP_ALIVE "Keep-Alive"
828 /* Permanent. RFC4229 */
829 #define MHD_HTTP_HEADER_LABEL "Label"
830 /* Permanent. https://html.spec.whatwg.org/multipage/server-sent-events.html#last-event-id */
831 #define MHD_HTTP_HEADER_LAST_EVENT_ID "Last-Event-ID"
832 /* Permanent. RFC8288 */
833 #define MHD_HTTP_HEADER_LINK "Link"
834 /* Permanent. RFC4918 */
835 #define MHD_HTTP_HEADER_LOCK_TOKEN "Lock-Token"
836 /* Permanent. RFC4229 */
837 #define MHD_HTTP_HEADER_MAN "Man"
838 /* Permanent. RFC7089 */
839 #define MHD_HTTP_HEADER_MEMENTO_DATETIME "Memento-Datetime"
840 /* Permanent. RFC4229 */
841 #define MHD_HTTP_HEADER_METER "Meter"
842 /* Permanent. RFC4229 */
843 #define MHD_HTTP_HEADER_NEGOTIATE "Negotiate"
844 /* Permanent. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
845 #define MHD_HTTP_HEADER_ODATA_ENTITYID "OData-EntityId"
846 /* Permanent. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
847 #define MHD_HTTP_HEADER_ODATA_ISOLATION "OData-Isolation"
848 /* Permanent. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
849 #define MHD_HTTP_HEADER_ODATA_MAXVERSION "OData-MaxVersion"
850 /* Permanent. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
851 #define MHD_HTTP_HEADER_ODATA_VERSION "OData-Version"
852 /* Permanent. RFC4229 */
853 #define MHD_HTTP_HEADER_OPT "Opt"
854 /* Permanent. RFC8053, Section 3 */
855 #define MHD_HTTP_HEADER_OPTIONAL_WWW_AUTHENTICATE "Optional-WWW-Authenticate"
856 /* Permanent. RFC4229 */
857 #define MHD_HTTP_HEADER_ORDERING_TYPE "Ordering-Type"
858 /* Permanent. RFC6454 */
859 #define MHD_HTTP_HEADER_ORIGIN "Origin"
860 /* Permanent. https://html.spec.whatwg.org/multipage/origin.html#origin-agent-cluster */
861 #define MHD_HTTP_HEADER_ORIGIN_AGENT_CLUSTER "Origin-Agent-Cluster"
862 /* Permanent. RFC8613, Section 11.1 */
863 #define MHD_HTTP_HEADER_OSCORE "OSCORE"
864 /* Permanent. OASIS Project Specification 01; OASIS; Chet_Ensign */
865 #define MHD_HTTP_HEADER_OSLC_CORE_VERSION "OSLC-Core-Version"
866 /* Permanent. RFC4918 */
867 #define MHD_HTTP_HEADER_OVERWRITE "Overwrite"
868 /* Permanent. RFC4229 */
869 #define MHD_HTTP_HEADER_P3P "P3P"
870 /* Permanent. RFC4229 */
871 #define MHD_HTTP_HEADER_PEP "PEP"
872 /* Permanent. RFC4229 */
873 #define MHD_HTTP_HEADER_PEP_INFO "Pep-Info"
874 /* Permanent. RFC4229 */
875 #define MHD_HTTP_HEADER_PICS_LABEL "PICS-Label"
876 /* Permanent. https://html.spec.whatwg.org/multipage/links.html#ping-from */
877 #define MHD_HTTP_HEADER_PING_FROM "Ping-From"
878 /* Permanent. https://html.spec.whatwg.org/multipage/links.html#ping-to */
879 #define MHD_HTTP_HEADER_PING_TO "Ping-To"
880 /* Permanent. RFC4229 */
881 #define MHD_HTTP_HEADER_POSITION "Position"
882 /* Permanent. RFC7240 */
883 #define MHD_HTTP_HEADER_PREFER "Prefer"
884 /* Permanent. RFC7240 */
885 #define MHD_HTTP_HEADER_PREFERENCE_APPLIED "Preference-Applied"
886 /* Permanent. RFC4229 */
887 #define MHD_HTTP_HEADER_PROFILEOBJECT "ProfileObject"
888 /* Permanent. RFC4229 */
889 #define MHD_HTTP_HEADER_PROTOCOL "Protocol"
890 /* Permanent. RFC4229 */
891 #define MHD_HTTP_HEADER_PROTOCOL_REQUEST "Protocol-Request"
892 /* Permanent. RFC4229 */
893 #define MHD_HTTP_HEADER_PROXY_FEATURES "Proxy-Features"
894 /* Permanent. RFC4229 */
895 #define MHD_HTTP_HEADER_PROXY_INSTRUCTION "Proxy-Instruction"
896 /* Permanent. RFC4229 */
897 #define MHD_HTTP_HEADER_PUBLIC "Public"
898 /* Permanent. RFC7469 */
899 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS "Public-Key-Pins"
900 /* Permanent. RFC7469 */
901 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS_REPORT_ONLY \
902  "Public-Key-Pins-Report-Only"
903 /* Permanent. RFC4437 */
904 #define MHD_HTTP_HEADER_REDIRECT_REF "Redirect-Ref"
905 /* Permanent. https://html.spec.whatwg.org/multipage/browsing-the-web.html#refresh */
906 #define MHD_HTTP_HEADER_REFRESH "Refresh"
907 /* Permanent. RFC8555, Section 6.5.1 */
908 #define MHD_HTTP_HEADER_REPLAY_NONCE "Replay-Nonce"
909 /* Permanent. RFC4229 */
910 #define MHD_HTTP_HEADER_SAFE "Safe"
911 /* Permanent. RFC6638 */
912 #define MHD_HTTP_HEADER_SCHEDULE_REPLY "Schedule-Reply"
913 /* Permanent. RFC6638 */
914 #define MHD_HTTP_HEADER_SCHEDULE_TAG "Schedule-Tag"
915 /* Permanent. RFC8473 */
916 #define MHD_HTTP_HEADER_SEC_TOKEN_BINDING "Sec-Token-Binding"
917 /* Permanent. RFC6455 */
918 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_ACCEPT "Sec-WebSocket-Accept"
919 /* Permanent. RFC6455 */
920 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_EXTENSIONS "Sec-WebSocket-Extensions"
921 /* Permanent. RFC6455 */
922 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY "Sec-WebSocket-Key"
923 /* Permanent. RFC6455 */
924 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_PROTOCOL "Sec-WebSocket-Protocol"
925 /* Permanent. RFC6455 */
926 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION "Sec-WebSocket-Version"
927 /* Permanent. RFC4229 */
928 #define MHD_HTTP_HEADER_SECURITY_SCHEME "Security-Scheme"
929 /* Permanent. https://www.w3.org/TR/server-timing/ */
930 #define MHD_HTTP_HEADER_SERVER_TIMING "Server-Timing"
931 /* Permanent. RFC6265 */
932 #define MHD_HTTP_HEADER_SET_COOKIE "Set-Cookie"
933 /* Permanent. RFC4229 */
934 #define MHD_HTTP_HEADER_SETPROFILE "SetProfile"
935 /* Permanent. RFC5023 */
936 #define MHD_HTTP_HEADER_SLUG "SLUG"
937 /* Permanent. RFC4229 */
938 #define MHD_HTTP_HEADER_SOAPACTION "SoapAction"
939 /* Permanent. RFC4229 */
940 #define MHD_HTTP_HEADER_STATUS_URI "Status-URI"
941 /* Permanent. RFC6797 */
942 #define MHD_HTTP_HEADER_STRICT_TRANSPORT_SECURITY "Strict-Transport-Security"
943 /* Permanent. RFC8594 */
944 #define MHD_HTTP_HEADER_SUNSET "Sunset"
945 /* Permanent. RFC4229 */
946 #define MHD_HTTP_HEADER_SURROGATE_CAPABILITY "Surrogate-Capability"
947 /* Permanent. RFC4229 */
948 #define MHD_HTTP_HEADER_SURROGATE_CONTROL "Surrogate-Control"
949 /* Permanent. RFC4229 */
950 #define MHD_HTTP_HEADER_TCN "TCN"
951 /* Permanent. RFC4918 */
952 #define MHD_HTTP_HEADER_TIMEOUT "Timeout"
953 /* Permanent. RFC8030, Section 5.4 */
954 #define MHD_HTTP_HEADER_TOPIC "Topic"
955 /* Permanent. RFC8030, Section 5.2 */
956 #define MHD_HTTP_HEADER_TTL "TTL"
957 /* Permanent. RFC8030, Section 5.3 */
958 #define MHD_HTTP_HEADER_URGENCY "Urgency"
959 /* Permanent. RFC4229 */
960 #define MHD_HTTP_HEADER_URI "URI"
961 /* Permanent. RFC4229 */
962 #define MHD_HTTP_HEADER_VARIANT_VARY "Variant-Vary"
963 /* Permanent. RFC4229 */
964 #define MHD_HTTP_HEADER_WANT_DIGEST "Want-Digest"
965 /* Permanent. https://fetch.spec.whatwg.org/#x-content-type-options-header */
966 #define MHD_HTTP_HEADER_X_CONTENT_TYPE_OPTIONS "X-Content-Type-Options"
967 /* Permanent. https://html.spec.whatwg.org/multipage/browsing-the-web.html#x-frame-options */
968 #define MHD_HTTP_HEADER_X_FRAME_OPTIONS "X-Frame-Options"
969 /* Provisional. RFC5789 */
970 #define MHD_HTTP_HEADER_ACCEPT_PATCH "Accept-Patch"
971 /* Provisional. https://github.com/ampproject/amphtml/blob/master/spec/amp-cache-transform.md */
972 #define MHD_HTTP_HEADER_AMP_CACHE_TRANSFORM "AMP-Cache-Transform"
973 /* Provisional. RFC4229 */
974 #define MHD_HTTP_HEADER_COMPLIANCE "Compliance"
975 /* Provisional. https://docs.oasis-open-projects.org/oslc-op/config/v1.0/psd01/config-resources.html#configcontext */
976 #define MHD_HTTP_HEADER_CONFIGURATION_CONTEXT "Configuration-Context"
977 /* Provisional. RFC4229 */
978 #define MHD_HTTP_HEADER_CONTENT_TRANSFER_ENCODING "Content-Transfer-Encoding"
979 /* Provisional. RFC4229 */
980 #define MHD_HTTP_HEADER_COST "Cost"
981 /* Provisional. RFC6017 */
982 #define MHD_HTTP_HEADER_EDIINT_FEATURES "EDIINT-Features"
983 /* Provisional. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
984 #define MHD_HTTP_HEADER_ISOLATION "Isolation"
985 /* Provisional. RFC4229 */
986 #define MHD_HTTP_HEADER_MESSAGE_ID "Message-ID"
987 /* Provisional. RFC4229 */
988 #define MHD_HTTP_HEADER_NON_COMPLIANCE "Non-Compliance"
989 /* Provisional. RFC4229 */
990 #define MHD_HTTP_HEADER_OPTIONAL "Optional"
991 /* Provisional. Repeatable Requests Version 1.0; OASIS; Chet_Ensign */
992 #define MHD_HTTP_HEADER_REPEATABILITY_CLIENT_ID "Repeatability-Client-ID"
993 /* Provisional. Repeatable Requests Version 1.0; OASIS; Chet_Ensign */
994 #define MHD_HTTP_HEADER_REPEATABILITY_FIRST_SENT "Repeatability-First-Sent"
995 /* Provisional. Repeatable Requests Version 1.0; OASIS; Chet_Ensign */
996 #define MHD_HTTP_HEADER_REPEATABILITY_REQUEST_ID "Repeatability-Request-ID"
997 /* Provisional. Repeatable Requests Version 1.0; OASIS; Chet_Ensign */
998 #define MHD_HTTP_HEADER_REPEATABILITY_RESULT "Repeatability-Result"
999 /* Provisional. RFC4229 */
1000 #define MHD_HTTP_HEADER_RESOLUTION_HINT "Resolution-Hint"
1001 /* Provisional. RFC4229 */
1002 #define MHD_HTTP_HEADER_RESOLVER_LOCATION "Resolver-Location"
1003 /* Provisional. RFC4229 */
1004 #define MHD_HTTP_HEADER_SUBOK "SubOK"
1005 /* Provisional. RFC4229 */
1006 #define MHD_HTTP_HEADER_SUBST "Subst"
1007 /* Provisional. https://www.w3.org/TR/resource-timing-1/#timing-allow-origin */
1008 #define MHD_HTTP_HEADER_TIMING_ALLOW_ORIGIN "Timing-Allow-Origin"
1009 /* Provisional. RFC4229 */
1010 #define MHD_HTTP_HEADER_TITLE "Title"
1011 /* Provisional. https://www.w3.org/TR/trace-context/#traceparent-field */
1012 #define MHD_HTTP_HEADER_TRACEPARENT "Traceparent"
1013 /* Provisional. https://www.w3.org/TR/trace-context/#tracestate-field */
1014 #define MHD_HTTP_HEADER_TRACESTATE "Tracestate"
1015 /* Provisional. RFC4229 */
1016 #define MHD_HTTP_HEADER_UA_COLOR "UA-Color"
1017 /* Provisional. RFC4229 */
1018 #define MHD_HTTP_HEADER_UA_MEDIA "UA-Media"
1019 /* Provisional. RFC4229 */
1020 #define MHD_HTTP_HEADER_UA_PIXELS "UA-Pixels"
1021 /* Provisional. RFC4229 */
1022 #define MHD_HTTP_HEADER_UA_RESOLUTION "UA-Resolution"
1023 /* Provisional. RFC4229 */
1024 #define MHD_HTTP_HEADER_UA_WINDOWPIXELS "UA-Windowpixels"
1025 /* Provisional. RFC4229 */
1026 #define MHD_HTTP_HEADER_VERSION "Version"
1027 /* Provisional. W3C Mobile Web Best Practices Working Group */
1028 #define MHD_HTTP_HEADER_X_DEVICE_ACCEPT "X-Device-Accept"
1029 /* Provisional. W3C Mobile Web Best Practices Working Group */
1030 #define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_CHARSET "X-Device-Accept-Charset"
1031 /* Provisional. W3C Mobile Web Best Practices Working Group */
1032 #define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_ENCODING "X-Device-Accept-Encoding"
1033 /* Provisional. W3C Mobile Web Best Practices Working Group */
1034 #define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_LANGUAGE "X-Device-Accept-Language"
1035 /* Provisional. W3C Mobile Web Best Practices Working Group */
1036 #define MHD_HTTP_HEADER_X_DEVICE_USER_AGENT "X-Device-User-Agent"
1037 /* Deprecated. RFC4229 */
1038 #define MHD_HTTP_HEADER_C_PEP_INFO "C-PEP-Info"
1039 /* Deprecated. RFC4229 */
1040 #define MHD_HTTP_HEADER_PROTOCOL_INFO "Protocol-Info"
1041 /* Deprecated. RFC4229 */
1042 #define MHD_HTTP_HEADER_PROTOCOL_QUERY "Protocol-Query"
1043 /* Obsoleted. https://www.w3.org/TR/2007/WD-access-control-20071126/#access-control0 */
1044 #define MHD_HTTP_HEADER_ACCESS_CONTROL "Access-Control"
1045 /* Obsoleted. RFC2068; RFC2616 */
1046 #define MHD_HTTP_HEADER_CONTENT_BASE "Content-Base"
1047 /* Obsoleted. RFC2616, Section 14.15; RFC7231, Appendix B */
1048 #define MHD_HTTP_HEADER_CONTENT_MD5 "Content-MD5"
1049 /* Obsoleted. RFC2965; RFC6265 */
1050 #define MHD_HTTP_HEADER_COOKIE2 "Cookie2"
1051 /* Obsoleted. https://www.w3.org/TR/2007/WD-access-control-20071126/#method-check */
1052 #define MHD_HTTP_HEADER_METHOD_CHECK "Method-Check"
1053 /* Obsoleted. https://www.w3.org/TR/2007/WD-access-control-20071126/#method-check-expires */
1054 #define MHD_HTTP_HEADER_METHOD_CHECK_EXPIRES "Method-Check-Expires"
1055 /* Obsoleted. https://www.w3.org/TR/2007/WD-access-control-20071126/#referer-root */
1056 #define MHD_HTTP_HEADER_REFERER_ROOT "Referer-Root"
1057 /* Obsoleted. RFC2965; RFC6265 */
1058 #define MHD_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2"
1059 
1060 /* Some provisional headers. */
1061 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN \
1062  "Access-Control-Allow-Origin" /* end of group headers */
1064 
1071 #define MHD_HTTP_VERSION_1_0 "HTTP/1.0"
1072 #define MHD_HTTP_VERSION_1_1 "HTTP/1.1"
1073  /* end of group versions */
1075 
1084 /* Main HTTP methods. */
1085 /* Not safe. Not idempotent. RFC-ietf-httpbis-semantics, Section 9.3.6. */
1086 #define MHD_HTTP_METHOD_CONNECT "CONNECT"
1087 /* Not safe. Idempotent. RFC-ietf-httpbis-semantics, Section 9.3.5. */
1088 #define MHD_HTTP_METHOD_DELETE "DELETE"
1089 /* Safe. Idempotent. RFC-ietf-httpbis-semantics, Section 9.3.1. */
1090 #define MHD_HTTP_METHOD_GET "GET"
1091 /* Safe. Idempotent. RFC-ietf-httpbis-semantics, Section 9.3.2. */
1092 #define MHD_HTTP_METHOD_HEAD "HEAD"
1093 /* Safe. Idempotent. RFC-ietf-httpbis-semantics, Section 9.3.7. */
1094 #define MHD_HTTP_METHOD_OPTIONS "OPTIONS"
1095 /* Not safe. Not idempotent. RFC-ietf-httpbis-semantics, Section 9.3.3. */
1096 #define MHD_HTTP_METHOD_POST "POST"
1097 /* Not safe. Idempotent. RFC-ietf-httpbis-semantics, Section 9.3.4. */
1098 #define MHD_HTTP_METHOD_PUT "PUT"
1099 /* Safe. Idempotent. RFC-ietf-httpbis-semantics, Section 9.3.8. */
1100 #define MHD_HTTP_METHOD_TRACE "TRACE"
1101 /* Not safe. Not idempotent. RFC-ietf-httpbis-semantics, Section 18.2. */
1102 #define MHD_HTTP_METHOD_ASTERISK "*"
1103 
1104 /* Additional HTTP methods. */
1105 /* Not safe. Idempotent. RFC3744, Section 8.1. */
1106 #define MHD_HTTP_METHOD_ACL "ACL"
1107 /* Not safe. Idempotent. RFC3253, Section 12.6. */
1108 #define MHD_HTTP_METHOD_BASELINE_CONTROL "BASELINE-CONTROL"
1109 /* Not safe. Idempotent. RFC5842, Section 4. */
1110 #define MHD_HTTP_METHOD_BIND "BIND"
1111 /* Not safe. Idempotent. RFC3253, Section 4.4, Section 9.4. */
1112 #define MHD_HTTP_METHOD_CHECKIN "CHECKIN"
1113 /* Not safe. Idempotent. RFC3253, Section 4.3, Section 8.8. */
1114 #define MHD_HTTP_METHOD_CHECKOUT "CHECKOUT"
1115 /* Not safe. Idempotent. RFC4918, Section 9.8. */
1116 #define MHD_HTTP_METHOD_COPY "COPY"
1117 /* Not safe. Idempotent. RFC3253, Section 8.2. */
1118 #define MHD_HTTP_METHOD_LABEL "LABEL"
1119 /* Not safe. Idempotent. RFC2068, Section 19.6.1.2. */
1120 #define MHD_HTTP_METHOD_LINK "LINK"
1121 /* Not safe. Not idempotent. RFC4918, Section 9.10. */
1122 #define MHD_HTTP_METHOD_LOCK "LOCK"
1123 /* Not safe. Idempotent. RFC3253, Section 11.2. */
1124 #define MHD_HTTP_METHOD_MERGE "MERGE"
1125 /* Not safe. Idempotent. RFC3253, Section 13.5. */
1126 #define MHD_HTTP_METHOD_MKACTIVITY "MKACTIVITY"
1127 /* Not safe. Idempotent. RFC4791, Section 5.3.1; RFC8144, Section 2.3. */
1128 #define MHD_HTTP_METHOD_MKCALENDAR "MKCALENDAR"
1129 /* Not safe. Idempotent. RFC4918, Section 9.3; RFC5689, Section 3; RFC8144, Section 2.3. */
1130 #define MHD_HTTP_METHOD_MKCOL "MKCOL"
1131 /* Not safe. Idempotent. RFC4437, Section 6. */
1132 #define MHD_HTTP_METHOD_MKREDIRECTREF "MKREDIRECTREF"
1133 /* Not safe. Idempotent. RFC3253, Section 6.3. */
1134 #define MHD_HTTP_METHOD_MKWORKSPACE "MKWORKSPACE"
1135 /* Not safe. Idempotent. RFC4918, Section 9.9. */
1136 #define MHD_HTTP_METHOD_MOVE "MOVE"
1137 /* Not safe. Idempotent. RFC3648, Section 7. */
1138 #define MHD_HTTP_METHOD_ORDERPATCH "ORDERPATCH"
1139 /* Not safe. Not idempotent. RFC5789, Section 2. */
1140 #define MHD_HTTP_METHOD_PATCH "PATCH"
1141 /* Safe. Idempotent. RFC7540, Section 3.5. */
1142 #define MHD_HTTP_METHOD_PRI "PRI"
1143 /* Safe. Idempotent. RFC4918, Section 9.1; RFC8144, Section 2.1. */
1144 #define MHD_HTTP_METHOD_PROPFIND "PROPFIND"
1145 /* Not safe. Idempotent. RFC4918, Section 9.2; RFC8144, Section 2.2. */
1146 #define MHD_HTTP_METHOD_PROPPATCH "PROPPATCH"
1147 /* Not safe. Idempotent. RFC5842, Section 6. */
1148 #define MHD_HTTP_METHOD_REBIND "REBIND"
1149 /* Safe. Idempotent. RFC3253, Section 3.6; RFC8144, Section 2.1. */
1150 #define MHD_HTTP_METHOD_REPORT "REPORT"
1151 /* Safe. Idempotent. RFC5323, Section 2. */
1152 #define MHD_HTTP_METHOD_SEARCH "SEARCH"
1153 /* Not safe. Idempotent. RFC5842, Section 5. */
1154 #define MHD_HTTP_METHOD_UNBIND "UNBIND"
1155 /* Not safe. Idempotent. RFC3253, Section 4.5. */
1156 #define MHD_HTTP_METHOD_UNCHECKOUT "UNCHECKOUT"
1157 /* Not safe. Idempotent. RFC2068, Section 19.6.1.3. */
1158 #define MHD_HTTP_METHOD_UNLINK "UNLINK"
1159 /* Not safe. Idempotent. RFC4918, Section 9.11. */
1160 #define MHD_HTTP_METHOD_UNLOCK "UNLOCK"
1161 /* Not safe. Idempotent. RFC3253, Section 7.1. */
1162 #define MHD_HTTP_METHOD_UPDATE "UPDATE"
1163 /* Not safe. Idempotent. RFC4437, Section 7. */
1164 #define MHD_HTTP_METHOD_UPDATEREDIRECTREF "UPDATEREDIRECTREF"
1165 /* Not safe. Idempotent. RFC3253, Section 3.5. */
1166 #define MHD_HTTP_METHOD_VERSION_CONTROL "VERSION-CONTROL"
1167  /* end of group methods */
1169 
1175 #define MHD_HTTP_POST_ENCODING_FORM_URLENCODED \
1176  "application/x-www-form-urlencoded"
1177 #define MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data"
1178  /* end of group postenc */
1180 
1181 
1186 struct MHD_Daemon;
1187 
1196 struct MHD_Connection;
1197 
1202 struct MHD_Response;
1203 
1208 struct MHD_PostProcessor;
1209 
1210 
1224 {
1229 
1236 
1242 
1247 
1250 #if 0
1251  /* let's do this later once versions that define MHD_USE_TLS a more widely deployed. */
1252 #define MHD_USE_SSL \
1253  _MHD_DEPR_IN_MACRO ("Value MHD_USE_SSL is deprecated, use MHD_USE_TLS") \
1254  MHD_USE_TLS
1255 #endif
1256 
1262 
1274 
1277 #if 0 /* Will be marked for real deprecation later. */
1278 #define MHD_USE_SELECT_INTERNALLY \
1279  _MHD_DEPR_IN_MACRO ( \
1280  "Value MHD_USE_SELECT_INTERNALLY is deprecated, use MHD_USE_INTERNAL_POLLING_THREAD instead") \
1281  MHD_USE_INTERNAL_POLLING_THREAD
1282 #endif /* 0 */
1283 
1292 
1303 #if 0 /* Will be marked for real deprecation later. */
1304 #define MHD_USE_PEDANTIC_CHECKS \
1305  _MHD_DEPR_IN_MACRO ( \
1306  "Flag MHD_USE_PEDANTIC_CHECKS is deprecated, use option MHD_OPTION_STRICT_FOR_CLIENT instead") \
1307  32
1308 #endif /* 0 */
1309 
1320 
1326 
1329 #if 0 /* Will be marked for real deprecation later. */
1330 #define MHD_USE_POLL_INTERNALLY \
1331  _MHD_DEPR_IN_MACRO ( \
1332  "Value MHD_USE_POLL_INTERNALLY is deprecated, use MHD_USE_POLL_INTERNAL_THREAD instead") \
1333  MHD_USE_POLL_INTERNAL_THREAD
1334 #endif /* 0 */
1335 
1343 
1346 #if 0 /* Will be marked for real deprecation later. */
1347 #define MHD_SUPPRESS_DATE_NO_CLOCK \
1348  _MHD_DEPR_IN_MACRO ( \
1349  "Value MHD_SUPPRESS_DATE_NO_CLOCK is deprecated, use MHD_USE_SUPPRESS_DATE_NO_CLOCK instead") \
1350  MHD_USE_SUPPRESS_DATE_NO_CLOCK
1351 #endif /* 0 */
1352 
1361 
1370 
1373 #if 0 /* Will be marked for real deprecation later. */
1374 #define MHD_USE_EPOLL_LINUX_ONLY \
1375  _MHD_DEPR_IN_MACRO ( \
1376  "Value MHD_USE_EPOLL_LINUX_ONLY is deprecated, use MHD_USE_EPOLL") \
1377  MHD_USE_EPOLL
1378 #endif /* 0 */
1379 
1388 
1394 #if 0 /* Will be marked for real deprecation later. */
1395 #define MHD_USE_EPOLL_INTERNALLY \
1396  _MHD_DEPR_IN_MACRO ( \
1397  "Value MHD_USE_EPOLL_INTERNALLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \
1398  MHD_USE_EPOLL_INTERNAL_THREAD
1400 #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \
1401  _MHD_DEPR_IN_MACRO ( \
1402  "Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \
1403  MHD_USE_EPOLL_INTERNAL_THREAD
1404 #endif /* 0 */
1405 
1418  MHD_USE_ITC = 1024,
1419 
1422 #if 0 /* Will be marked for real deprecation later. */
1423 #define MHD_USE_PIPE_FOR_SHUTDOWN \
1424  _MHD_DEPR_IN_MACRO ( \
1425  "Value MHD_USE_PIPE_FOR_SHUTDOWN is deprecated, use MHD_USE_ITC") \
1426  MHD_USE_ITC
1427 #endif /* 0 */
1428 
1433 
1441 
1444 #if 0 /* Will be marked for real deprecation later. */
1445 #define MHD_USE_EPOLL_TURBO \
1446  _MHD_DEPR_IN_MACRO ( \
1447  "Value MHD_USE_EPOLL_TURBO is deprecated, use MHD_USE_TURBO") \
1448  MHD_USE_TURBO
1449 #endif /* 0 */
1450 
1456 
1459 #if 0 /* Will be marked for real deprecation later. */
1460 #define MHD_USE_SUSPEND_RESUME \
1461  _MHD_DEPR_IN_MACRO ( \
1462  "Value MHD_USE_SUSPEND_RESUME is deprecated, use MHD_ALLOW_SUSPEND_RESUME instead") \
1463  MHD_ALLOW_SUSPEND_RESUME
1464 #endif /* 0 */
1465 
1472 
1479 
1491  MHD_USE_AUTO = 65536,
1492 
1500 
1506 
1512 
1513 };
1514 
1515 
1524 typedef void
1525 (*MHD_LogCallback)(void *cls,
1526  const char *fm,
1527  va_list ap);
1528 
1529 
1542 typedef int
1544  const struct MHD_Connection *connection,
1545  const char *username,
1546  void **psk,
1547  size_t *psk_size);
1548 
1555 {
1556 
1562 
1571 
1577 
1586 
1600 
1612 
1620 
1652 
1660 
1668 
1675 
1681 
1689 
1704 
1714 
1735 
1757 
1768 
1775 
1781 
1788 
1794 
1810 
1819 
1826 
1835 
1844 
1855 
1863 
1879 
1887 
1898 
1909 
1920 
1930 
1931 
1937 {
1941  MHD_DSC_SANE = 0
1942 
1944 
1945 
1950 {
1955  enum MHD_OPTION option;
1956 
1962  intptr_t value;
1963 
1968  void *ptr_value;
1969 
1970 };
1971 
1972 
1978 {
1979 
1985 #define MHD_RESPONSE_HEADER_KIND \
1986  _MHD_DEPR_IN_MACRO ( \
1987  "Value MHD_RESPONSE_HEADER_KIND is deprecated and not used") \
1988  MHD_RESPONSE_HEADER_KIND
1989 
1994 
2000 
2010 
2015 
2019  MHD_FOOTER_KIND = 16
2021 
2022 
2029 {
2030 
2036 
2045 
2053 
2060 
2070 
2077 
2079 
2080 
2087 {
2088 
2094 
2100 
2102 
2103 
2108 {
2109 
2113  int /* enum gnutls_cipher_algorithm */ cipher_algorithm;
2114 
2118  int /* enum gnutls_protocol */ protocol;
2119 
2123  int /* MHD_YES or MHD_NO */ suspended;
2124 
2130  unsigned int connection_timeout;
2131 
2135  unsigned int http_status;
2136 
2141 
2145  size_t header_size;
2146 
2150  void * /* gnutls_session_t */ tls_session;
2151 
2155  void * /* gnutls_x509_crt_t */ client_cert;
2156 
2160  struct sockaddr *client_addr;
2161 
2167 
2173 };
2174 
2175 
2181 {
2185  const void *iov_base;
2186 
2190  size_t iov_len;
2191 };
2192 
2193 
2200 {
2207 
2214 
2223 
2229 
2237 
2243 
2251 
2261 
2267 
2273 
2279 
2285 
2287 
2288 
2294 {
2299 
2304 
2310 
2325 
2334 
2342 
2351 
2352 
2363 typedef void
2364 (*MHD_PanicCallback) (void *cls,
2365  const char *file,
2366  unsigned int line,
2367  const char *reason);
2368 
2377 typedef enum MHD_Result
2378 (*MHD_AcceptPolicyCallback)(void *cls,
2379  const struct sockaddr *addr,
2380  socklen_t addrlen);
2381 
2382 
2446 typedef enum MHD_Result
2447 (*MHD_AccessHandlerCallback)(void *cls,
2448  struct MHD_Connection *connection,
2449  const char *url,
2450  const char *method,
2451  const char *version,
2452  const char *upload_data,
2453  size_t *upload_data_size,
2454  void **con_cls);
2455 
2456 
2469 typedef void
2470 (*MHD_RequestCompletedCallback) (void *cls,
2471  struct MHD_Connection *connection,
2472  void **con_cls,
2473  enum MHD_RequestTerminationCode toe);
2474 
2475 
2495 typedef void
2496 (*MHD_NotifyConnectionCallback) (void *cls,
2497  struct MHD_Connection *connection,
2498  void **socket_context,
2500 
2501 
2517 typedef enum MHD_Result
2518 (*MHD_KeyValueIterator)(void *cls,
2519  enum MHD_ValueKind kind,
2520  const char *key,
2521  const char *value);
2522 
2523 
2542 typedef enum MHD_Result
2543 (*MHD_KeyValueIteratorN)(void *cls,
2544  enum MHD_ValueKind kind,
2545  const char *key,
2546  size_t key_size,
2547  const char *value,
2548  size_t value_size);
2549 
2550 
2596 typedef ssize_t
2597 (*MHD_ContentReaderCallback) (void *cls,
2598  uint64_t pos,
2599  char *buf,
2600  size_t max);
2601 
2602 
2612 typedef void
2613 (*MHD_ContentReaderFreeCallback) (void *cls);
2614 
2615 
2635 typedef enum MHD_Result
2636 (*MHD_PostDataIterator)(void *cls,
2637  enum MHD_ValueKind kind,
2638  const char *key,
2639  const char *filename,
2640  const char *content_type,
2641  const char *transfer_encoding,
2642  const char *data,
2643  uint64_t off,
2644  size_t size);
2645 
2646 /* **************** Daemon handling functions ***************** */
2647 
2669 _MHD_EXTERN struct MHD_Daemon *
2670 MHD_start_daemon_va (unsigned int flags,
2671  uint16_t port,
2673  MHD_AccessHandlerCallback dh, void *dh_cls,
2674  va_list ap);
2675 
2676 
2697 _MHD_EXTERN struct MHD_Daemon *
2698 MHD_start_daemon (unsigned int flags,
2699  uint16_t port,
2701  MHD_AccessHandlerCallback dh, void *dh_cls,
2702  ...);
2703 
2704 
2725 MHD_quiesce_daemon (struct MHD_Daemon *daemon);
2726 
2727 
2734 _MHD_EXTERN void
2735 MHD_stop_daemon (struct MHD_Daemon *daemon);
2736 
2737 
2765 MHD_add_connection (struct MHD_Daemon *daemon,
2766  MHD_socket client_socket,
2767  const struct sockaddr *addr,
2768  socklen_t addrlen);
2769 
2770 
2803 MHD_get_fdset (struct MHD_Daemon *daemon,
2804  fd_set *read_fd_set,
2805  fd_set *write_fd_set,
2806  fd_set *except_fd_set,
2807  MHD_socket *max_fd);
2808 
2809 
2845 MHD_get_fdset2 (struct MHD_Daemon *daemon,
2846  fd_set *read_fd_set,
2847  fd_set *write_fd_set,
2848  fd_set *except_fd_set,
2849  MHD_socket *max_fd,
2850  unsigned int fd_setsize);
2851 
2852 
2884 #define MHD_get_fdset(daemon,read_fd_set,write_fd_set,except_fd_set,max_fd) \
2885  MHD_get_fdset2 ((daemon),(read_fd_set),(write_fd_set),(except_fd_set), \
2886  (max_fd),FD_SETSIZE)
2887 
2888 
2920 MHD_get_timeout (struct MHD_Daemon *daemon,
2921  MHD_UNSIGNED_LONG_LONG *timeout);
2922 
2923 
2952 MHD_run (struct MHD_Daemon *daemon);
2953 
2954 
2994 MHD_run_wait (struct MHD_Daemon *daemon,
2995  int32_t millisec);
2996 
2997 
3025 MHD_run_from_select (struct MHD_Daemon *daemon,
3026  const fd_set *read_fd_set,
3027  const fd_set *write_fd_set,
3028  const fd_set *except_fd_set);
3029 
3030 
3031 /* **************** Connection handling functions ***************** */
3032 
3045 _MHD_EXTERN int
3046 MHD_get_connection_values (struct MHD_Connection *connection,
3047  enum MHD_ValueKind kind,
3048  MHD_KeyValueIterator iterator,
3049  void *iterator_cls);
3050 
3051 
3065 _MHD_EXTERN int
3066 MHD_get_connection_values_n (struct MHD_Connection *connection,
3067  enum MHD_ValueKind kind,
3068  MHD_KeyValueIteratorN iterator,
3069  void *iterator_cls);
3070 
3071 
3099 MHD_set_connection_value (struct MHD_Connection *connection,
3100  enum MHD_ValueKind kind,
3101  const char *key,
3102  const char *value);
3103 
3104 
3132 MHD_set_connection_value_n (struct MHD_Connection *connection,
3133  enum MHD_ValueKind kind,
3134  const char *key,
3135  size_t key_size,
3136  const char *value,
3137  size_t value_size);
3138 
3139 
3156 _MHD_EXTERN void
3157 MHD_set_panic_func (MHD_PanicCallback cb, void *cls);
3158 
3159 
3169 _MHD_EXTERN size_t
3170 MHD_http_unescape (char *val);
3171 
3172 
3183 _MHD_EXTERN const char *
3184 MHD_lookup_connection_value (struct MHD_Connection *connection,
3185  enum MHD_ValueKind kind,
3186  const char *key);
3187 
3188 
3209 MHD_lookup_connection_value_n (struct MHD_Connection *connection,
3210  enum MHD_ValueKind kind,
3211  const char *key,
3212  size_t key_size,
3213  const char **value_ptr,
3214  size_t *value_size_ptr);
3215 
3216 
3235 MHD_queue_response (struct MHD_Connection *connection,
3236  unsigned int status_code,
3237  struct MHD_Response *response);
3238 
3239 
3268 _MHD_EXTERN void
3269 MHD_suspend_connection (struct MHD_Connection *connection);
3270 
3271 
3286 _MHD_EXTERN void
3287 MHD_resume_connection (struct MHD_Connection *connection);
3288 
3289 
3290 /* **************** Response manipulation functions ***************** */
3291 
3292 
3297 {
3303 
3322 
3343 
3350 
3359 
3360 
3365 {
3369  MHD_RO_END = 0
3371 
3372 
3382 MHD_set_response_options (struct MHD_Response *response,
3383  enum MHD_ResponseFlags flags,
3384  ...);
3385 
3386 
3403 _MHD_EXTERN struct MHD_Response *
3404 MHD_create_response_from_callback (uint64_t size,
3405  size_t block_size,
3408 
3409 
3425  "MHD_create_response_from_data() is deprecated, use MHD_create_response_from_buffer()") \
3426  _MHD_EXTERN struct MHD_Response *
3427 MHD_create_response_from_data (size_t size,
3428  void *data,
3431 
3432 
3439 {
3440 
3448 
3456 
3465 
3467 
3468 
3486 _MHD_EXTERN struct MHD_Response *
3487 MHD_create_response_from_buffer (size_t size,
3488  void *buffer,
3489  enum MHD_ResponseMemoryMode mode);
3490 
3491 
3510 _MHD_EXTERN struct MHD_Response *
3512  void *buffer,
3514  crfc);
3515 
3516 
3537 _MHD_EXTERN struct MHD_Response *
3539  void *buffer,
3541  crfc,
3542  void *crfc_cls);
3543 
3544 
3563 _MHD_EXTERN struct MHD_Response *
3564 MHD_create_response_from_fd (size_t size,
3565  int fd);
3566 
3567 
3586 _MHD_EXTERN struct MHD_Response *
3588 
3589 
3610 _MHD_EXTERN struct MHD_Response *
3611 MHD_create_response_from_fd64 (uint64_t size,
3612  int fd);
3613 
3614 
3639  "Function MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
3640  _MHD_EXTERN struct MHD_Response *
3642  int fd,
3643  off_t offset);
3644 
3645 #if ! defined(_MHD_NO_DEPR_IN_MACRO) || defined(_MHD_NO_DEPR_FUNC)
3646 /* Substitute MHD_create_response_from_fd_at_offset64() instead of MHD_create_response_from_fd_at_offset()
3647  to minimize potential problems with different off_t sizes */
3648 #define MHD_create_response_from_fd_at_offset(size,fd,offset) \
3649  _MHD_DEPR_IN_MACRO ( \
3650  "Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
3651  MHD_create_response_from_fd_at_offset64 ((size),(fd),(offset))
3652 #endif /* !_MHD_NO_DEPR_IN_MACRO || _MHD_NO_DEPR_FUNC */
3653 
3654 
3678 _MHD_EXTERN struct MHD_Response *
3680  int fd,
3681  uint64_t offset);
3682 
3683 
3705 _MHD_EXTERN struct MHD_Response *
3706 MHD_create_response_from_iovec (const struct MHD_IoVec *iov,
3707  unsigned int iovcnt,
3709  void *cls);
3710 
3711 
3719 {
3720 
3727 
3732 
3737 
3739 
3740 
3746 struct MHD_UpgradeResponseHandle;
3747 
3748 
3762 MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh,
3763  enum MHD_UpgradeAction action,
3764  ...);
3765 
3766 
3814 typedef void
3815 (*MHD_UpgradeHandler)(void *cls,
3816  struct MHD_Connection *connection,
3817  void *con_cls,
3818  const char *extra_in,
3819  size_t extra_in_size,
3820  MHD_socket sock,
3821  struct MHD_UpgradeResponseHandle *urh);
3822 
3823 
3853 _MHD_EXTERN struct MHD_Response *
3855  void *upgrade_handler_cls);
3856 
3857 
3867 _MHD_EXTERN void
3868 MHD_destroy_response (struct MHD_Response *response);
3869 
3870 
3921 MHD_add_response_header (struct MHD_Response *response,
3922  const char *header,
3923  const char *content);
3924 
3925 
3936 MHD_add_response_footer (struct MHD_Response *response,
3937  const char *footer,
3938  const char *content);
3939 
3940 
3956 MHD_del_response_header (struct MHD_Response *response,
3957  const char *header,
3958  const char *content);
3959 
3960 
3971 _MHD_EXTERN int
3972 MHD_get_response_headers (struct MHD_Response *response,
3973  MHD_KeyValueIterator iterator,
3974  void *iterator_cls);
3975 
3976 
3985 _MHD_EXTERN const char *
3986 MHD_get_response_header (struct MHD_Response *response,
3987  const char *key);
3988 
3989 
3990 /* ********************** PostProcessor functions ********************** */
3991 
4017 _MHD_EXTERN struct MHD_PostProcessor *
4018 MHD_create_post_processor (struct MHD_Connection *connection,
4019  size_t buffer_size,
4020  MHD_PostDataIterator iter, void *iter_cls);
4021 
4022 
4037 MHD_post_process (struct MHD_PostProcessor *pp,
4038  const char *post_data,
4039  size_t post_data_len);
4040 
4041 
4053 MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
4054 
4055 
4056 /* ********************* Digest Authentication functions *************** */
4057 
4058 
4064 #define MHD_INVALID_NONCE -1
4065 
4066 
4075 _MHD_EXTERN char *
4076 MHD_digest_auth_get_username (struct MHD_Connection *connection);
4077 
4078 
4087 _MHD_EXTERN void
4088 MHD_free (void *ptr);
4089 
4090 
4095 {
4096 
4101 
4106 
4111 
4113 
4114 
4130 _MHD_EXTERN int
4131 MHD_digest_auth_check2 (struct MHD_Connection *connection,
4132  const char *realm,
4133  const char *username,
4134  const char *password,
4135  unsigned int nonce_timeout,
4136  enum MHD_DigestAuthAlgorithm algo);
4137 
4138 
4157 _MHD_EXTERN int
4158 MHD_digest_auth_check (struct MHD_Connection *connection,
4159  const char *realm,
4160  const char *username,
4161  const char *password,
4162  unsigned int nonce_timeout);
4163 
4164 
4183 _MHD_EXTERN int
4184 MHD_digest_auth_check_digest2 (struct MHD_Connection *connection,
4185  const char *realm,
4186  const char *username,
4187  const uint8_t *digest,
4188  size_t digest_size,
4189  unsigned int nonce_timeout,
4190  enum MHD_DigestAuthAlgorithm algo);
4191 
4192 
4212 _MHD_EXTERN int
4213 MHD_digest_auth_check_digest (struct MHD_Connection *connection,
4214  const char *realm,
4215  const char *username,
4216  const uint8_t digest[MHD_MD5_DIGEST_SIZE],
4217  unsigned int nonce_timeout);
4218 
4219 
4237 MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
4238  const char *realm,
4239  const char *opaque,
4240  struct MHD_Response *response,
4241  int signal_stale,
4242  enum MHD_DigestAuthAlgorithm algo);
4243 
4244 
4263 MHD_queue_auth_fail_response (struct MHD_Connection *connection,
4264  const char *realm,
4265  const char *opaque,
4266  struct MHD_Response *response,
4267  int signal_stale);
4268 
4269 
4279 _MHD_EXTERN char *
4281  char **password);
4282 
4283 
4298  const char *realm,
4299  struct MHD_Response *response);
4300 
4301 /* ********************** generic query functions ********************** */
4302 
4303 
4314 _MHD_EXTERN const union MHD_ConnectionInfo *
4315 MHD_get_connection_info (struct MHD_Connection *connection,
4316  enum MHD_ConnectionInfoType info_type,
4317  ...);
4318 
4319 
4325 {
4326 
4337 
4339 
4340 
4351 MHD_set_connection_option (struct MHD_Connection *connection,
4352  enum MHD_CONNECTION_OPTION option,
4353  ...);
4354 
4355 
4360 {
4365  size_t key_size;
4366 
4372 
4377 
4381  uint16_t port;
4382 
4387 
4391  unsigned int num_connections;
4392 
4399  enum MHD_FLAG flags;
4400 };
4401 
4402 
4414 _MHD_EXTERN const union MHD_DaemonInfo *
4415 MHD_get_daemon_info (struct MHD_Daemon *daemon,
4416  enum MHD_DaemonInfoType info_type,
4417  ...);
4418 
4419 
4426 _MHD_EXTERN const char *
4427 MHD_get_version (void);
4428 
4429 
4435 {
4441 
4451 
4457 
4463 
4471 
4477 
4484 
4491 
4497 
4504 
4511 
4519 
4527 
4534 
4544 
4550 
4557 
4570 
4576 
4583 
4590 
4595 
4602 
4603 
4616 MHD_is_feature_supported (enum MHD_FEATURE feature);
4617 
4618 
4619 #ifdef __cplusplus
4620 #if 0 /* keep Emacsens' auto-indent happy */
4621 {
4622 #endif
4623 }
4624 #endif
4625 
4626 #endif
_MHD_EXTERN char * MHD_digest_auth_get_username(struct MHD_Connection *connection)
Definition: digestauth.c:632
_MHD_EXTERN int MHD_digest_auth_check2(struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout, enum MHD_DigestAuthAlgorithm algo)
Definition: digestauth.c:1240
_MHD_EXTERN enum MHD_Result MHD_queue_auth_fail_response2(struct MHD_Connection *connection, const char *realm, const char *opaque, struct MHD_Response *response, int signal_stale, enum MHD_DigestAuthAlgorithm algo)
Definition: digestauth.c:1351
_MHD_EXTERN int MHD_digest_auth_check_digest2(struct MHD_Connection *connection, const char *realm, const char *username, const uint8_t *digest, size_t digest_size, unsigned int nonce_timeout, enum MHD_DigestAuthAlgorithm algo)
Definition: digestauth.c:1278
_MHD_EXTERN char * MHD_basic_auth_get_username_password(struct MHD_Connection *connection, char **password)
Definition: basicauth.c:47
_MHD_EXTERN enum MHD_Result MHD_queue_auth_fail_response(struct MHD_Connection *connection, const char *realm, const char *opaque, struct MHD_Response *response, int signal_stale)
Definition: digestauth.c:1474
_MHD_EXTERN int MHD_digest_auth_check_digest(struct MHD_Connection *connection, const char *realm, const char *username, const uint8_t digest[MHD_MD5_DIGEST_SIZE], unsigned int nonce_timeout)
Definition: digestauth.c:1319
_MHD_EXTERN int MHD_digest_auth_check(struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout)
Definition: digestauth.c:1161
_MHD_EXTERN enum MHD_Result MHD_queue_basic_auth_fail_response(struct MHD_Connection *connection, const char *realm, struct MHD_Response *response)
Definition: basicauth.c:124
_MHD_EXTERN struct MHD_Daemon * MHD_start_daemon(unsigned int flags, uint16_t port, MHD_AcceptPolicyCallback apc, void *apc_cls, MHD_AccessHandlerCallback dh, void *dh_cls,...)
Definition: daemon.c:5451
_MHD_EXTERN void MHD_stop_daemon(struct MHD_Daemon *daemon)
Definition: daemon.c:7653
_MHD_EXTERN enum MHD_Result MHD_run_from_select(struct MHD_Daemon *daemon, const fd_set *read_fd_set, const fd_set *write_fd_set, const fd_set *except_fd_set)
Definition: daemon.c:4127
_MHD_EXTERN struct MHD_Daemon * MHD_start_daemon_va(unsigned int flags, uint16_t port, MHD_AcceptPolicyCallback apc, void *apc_cls, MHD_AccessHandlerCallback dh, void *dh_cls, va_list ap)
Definition: daemon.c:6384
_MHD_EXTERN enum MHD_Result MHD_run(struct MHD_Daemon *daemon)
Definition: daemon.c:5207
_MHD_EXTERN enum MHD_Result MHD_get_timeout(struct MHD_Daemon *daemon, MHD_UNSIGNED_LONG_LONG *timeout)
Definition: daemon.c:3895
#define MHD_get_fdset(daemon, read_fd_set, write_fd_set, except_fd_set, max_fd)
Definition: microhttpd.h:2884
_MHD_EXTERN enum MHD_Result MHD_run_wait(struct MHD_Daemon *daemon, int32_t millisec)
Definition: daemon.c:5257
_MHD_EXTERN enum MHD_Result MHD_get_fdset2(struct MHD_Daemon *daemon, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, MHD_socket *max_fd, unsigned int fd_setsize)
Definition: daemon.c:1136
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:2364
void(* MHD_LogCallback)(void *cls, const char *fm, va_list ap)
Definition: microhttpd.h:1525
_MHD_EXTERN void MHD_set_panic_func(MHD_PanicCallback cb, void *cls)
Definition: panic.c:56
MHD_ConnectionNotificationCode
Definition: microhttpd.h:2087
_MHD_EXTERN enum MHD_Result MHD_destroy_post_processor(struct MHD_PostProcessor *pp)
enum MHD_Result(* MHD_KeyValueIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
Definition: microhttpd.h:2518
_MHD_EXTERN int MHD_get_connection_values_n(struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIteratorN iterator, void *iterator_cls)
Definition: connection.c:423
_MHD_EXTERN enum MHD_Result MHD_post_process(struct MHD_PostProcessor *pp, const char *post_data, size_t post_data_len)
_MHD_EXTERN enum MHD_Result MHD_set_connection_value_n(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, size_t key_size, const char *value, size_t value_size)
Definition: connection.c:536
enum MHD_Result(* MHD_KeyValueIteratorN)(void *cls, enum MHD_ValueKind kind, const char *key, size_t key_size, const char *value, size_t value_size)
Definition: microhttpd.h:2543
_MHD_EXTERN struct MHD_PostProcessor * MHD_create_post_processor(struct MHD_Connection *connection, size_t buffer_size, MHD_PostDataIterator iter, void *iter_cls)
_MHD_EXTERN const char * MHD_lookup_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key)
Definition: connection.c:612
_MHD_EXTERN int MHD_get_connection_values(struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIterator iterator, void *iterator_cls)
Definition: connection.c:384
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:2496
MHD_ConnectionInfoType
Definition: microhttpd.h:2200
_MHD_EXTERN enum MHD_Result MHD_set_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, const char *value)
Definition: connection.c:583
_MHD_EXTERN enum MHD_Result MHD_lookup_connection_value_n(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, size_t key_size, const char **value_ptr, size_t *value_size_ptr)
Definition: connection.c:649
#define _MHD_FIXED_ENUM
Definition: microhttpd.h:149
MHD_RequestTerminationCode
Definition: microhttpd.h:2029
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
Definition: microhttpd.h:2470
@ MHD_CONNECTION_NOTIFY_STARTED
Definition: microhttpd.h:2093
@ MHD_CONNECTION_NOTIFY_CLOSED
Definition: microhttpd.h:2099
@ MHD_CONNECTION_INFO_CONNECTION_TIMEOUT
Definition: microhttpd.h:2272
@ MHD_CONNECTION_INFO_SOCKET_CONTEXT
Definition: microhttpd.h:2260
@ MHD_CONNECTION_INFO_GNUTLS_SESSION
Definition: microhttpd.h:2228
@ MHD_CONNECTION_INFO_REQUEST_HEADER_SIZE
Definition: microhttpd.h:2278
@ MHD_CONNECTION_INFO_CIPHER_ALGO
Definition: microhttpd.h:2206
@ MHD_CONNECTION_INFO_CONNECTION_SUSPENDED
Definition: microhttpd.h:2266
@ MHD_CONNECTION_INFO_CLIENT_ADDRESS
Definition: microhttpd.h:2222
@ MHD_CONNECTION_INFO_DAEMON
Definition: microhttpd.h:2242
@ MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT
Definition: microhttpd.h:2236
@ MHD_CONNECTION_INFO_HTTP_STATUS
Definition: microhttpd.h:2284
@ MHD_CONNECTION_INFO_CONNECTION_FD
Definition: microhttpd.h:2250
@ MHD_CONNECTION_INFO_PROTOCOL
Definition: microhttpd.h:2213
@ MHD_REQUEST_TERMINATED_TIMEOUT_REACHED
Definition: microhttpd.h:2052
@ MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN
Definition: microhttpd.h:2059
@ MHD_REQUEST_TERMINATED_COMPLETED_OK
Definition: microhttpd.h:2035
@ MHD_REQUEST_TERMINATED_WITH_ERROR
Definition: microhttpd.h:2044
@ MHD_REQUEST_TERMINATED_READ_ERROR
Definition: microhttpd.h:2069
@ MHD_REQUEST_TERMINATED_CLIENT_ABORT
Definition: microhttpd.h:2076
_MHD_EXTERN enum MHD_Result MHD_del_response_header(struct MHD_Response *response, const char *header, const char *content)
Definition: response.c:597
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_iovec(const struct MHD_IoVec *iov, unsigned int iovcnt, MHD_ContentReaderFreeCallback free_cb, void *cls)
Definition: response.c:1413
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer_with_free_callback(size_t size, void *buffer, MHD_ContentReaderFreeCallback crfc)
Definition: response.c:1337
_MHD_EXTERN enum MHD_Result MHD_add_response_footer(struct MHD_Response *response, const char *footer, const char *content)
Definition: response.c:571
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd(size_t size, int fd)
Definition: response.c:1180
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_pipe(int fd)
Definition: response.c:1145
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer(size_t size, void *buffer, enum MHD_ResponseMemoryMode mode)
Definition: response.c:1308
_MHD_EXTERN int MHD_get_response_headers(struct MHD_Response *response, MHD_KeyValueIterator iterator, void *iterator_cls)
Definition: response.c:666
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_callback(uint64_t size, size_t block_size, MHD_ContentReaderCallback crc, void *crc_cls, MHD_ContentReaderFreeCallback crfc)
Definition: response.c:825
MHD_ResponseMemoryMode
Definition: microhttpd.h:3439
_MHD_EXTERN enum MHD_Result MHD_queue_response(struct MHD_Connection *connection, unsigned int status_code, struct MHD_Response *response)
Definition: connection.c:5099
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2613
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd_at_offset64(uint64_t size, int fd, uint64_t offset)
Definition: response.c:1094
_MHD_EXTERN void MHD_destroy_response(struct MHD_Response *response)
Definition: response.c:1948
_MHD_EXTERN enum MHD_Result MHD_add_response_header(struct MHD_Response *response, const char *header, const char *content)
Definition: response.c:493
_MHD_EXTERN const char * MHD_get_response_header(struct MHD_Response *response, const char *key)
Definition: response.c:698
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd64(uint64_t size, int fd)
Definition: response.c:1210
struct MHD_Response * MHD_create_response_from_data(size_t size, void *data, int must_free, int must_copy)
Definition: response.c:1241
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer_with_free_callback_cls(size_t size, void *buffer, MHD_ContentReaderFreeCallback crfc, void *crfc_cls)
Definition: response.c:1376
@ MHD_RESPMEM_MUST_FREE
Definition: microhttpd.h:3455
@ MHD_RESPMEM_PERSISTENT
Definition: microhttpd.h:3447
@ MHD_RESPMEM_MUST_COPY
Definition: microhttpd.h:3464
_MHD_EXTERN const union MHD_DaemonInfo * MHD_get_daemon_info(struct MHD_Daemon *daemon, enum MHD_DaemonInfoType info_type,...)
Definition: daemon.c:7835
_MHD_EXTERN const union MHD_ConnectionInfo * MHD_get_connection_info(struct MHD_Connection *connection, enum MHD_ConnectionInfoType info_type,...)
Definition: connection.c:4947
_MHD_EXTERN MHD_socket MHD_quiesce_daemon(struct MHD_Daemon *daemon)
Definition: daemon.c:5496
_MHD_EXTERN enum MHD_Result MHD_add_connection(struct MHD_Daemon *daemon, MHD_socket client_socket, const struct sockaddr *addr, socklen_t addrlen)
Definition: daemon.c:3442
_MHD_EXTERN enum MHD_Result MHD_is_feature_supported(enum MHD_FEATURE feature)
Definition: daemon.c:7950
_MHD_EXTERN enum MHD_Result MHD_set_connection_option(struct MHD_Connection *connection, enum MHD_CONNECTION_OPTION option,...)
Definition: connection.c:5011
_MHD_EXTERN const char * MHD_get_version(void)
Definition: version.c:35
int MHD_socket
Definition: microhttpd.h:207
MHD_FEATURE
Definition: microhttpd.h:4435
@ MHD_FEATURE_POSTPROCESSOR
Definition: microhttpd.h:4526
@ MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET
Definition: microhttpd.h:4490
@ MHD_FEATURE_THREADS
Definition: microhttpd.h:4594
@ MHD_FEATURE_SENDFILE
Definition: microhttpd.h:4589
@ MHD_FEATURE_AUTODETECT_BIND_PORT
Definition: microhttpd.h:4575
@ MHD_FEATURE_LARGE_FILE
Definition: microhttpd.h:4543
@ MHD_FEATURE_HTTPS_CERT_CALLBACK
Definition: microhttpd.h:4456
@ MHD_THREAD_NAMES
Definition: microhttpd.h:4549
@ MHD_FEATURE_BASIC_AUTH
Definition: microhttpd.h:4510
@ MHD_FEATURE_DIGEST_AUTH
Definition: microhttpd.h:4518
@ MHD_FEATURE_IPv6
Definition: microhttpd.h:4462
@ MHD_FEATURE_POLL
Definition: microhttpd.h:4476
@ MHD_FEATURE_THREAD_NAMES
Definition: microhttpd.h:4548
@ MHD_FEATURE_EPOLL
Definition: microhttpd.h:4483
@ MHD_FEATURE_TLS
Definition: microhttpd.h:4449
@ MHD_FEATURE_HTTPS_KEY_PASSWORD
Definition: microhttpd.h:4533
@ MHD_FEATURE_AUTOSUPPRESS_SIGPIPE
Definition: microhttpd.h:4582
@ MHD_FEATURE_RESPONSES_SHARED_FD
Definition: microhttpd.h:4569
@ MHD_FEATURE_MESSAGES
Definition: microhttpd.h:4440
@ MHD_FEATURE_SSL
Definition: microhttpd.h:4450
@ MHD_FEATURE_IPv6_ONLY
Definition: microhttpd.h:4470
@ MHD_FEATURE_UPGRADE
Definition: microhttpd.h:4556
@ MHD_FEATURE_SOCKETPAIR
Definition: microhttpd.h:4496
@ MHD_FEATURE_TCP_FASTOPEN
Definition: microhttpd.h:4503
@ MHD_FEATURE_HTTPS_CERT_CALLBACK2
Definition: microhttpd.h:4600
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:3815
MHD_OPTION
MHD options.
Definition: microhttpd.h:1555
@ MHD_OPTION_CONNECTION_MEMORY_INCREMENT
Definition: microhttpd.h:1793
@ MHD_OPTION_HTTPS_CRED_TYPE
Definition: microhttpd.h:1674
@ MHD_OPTION_URI_LOG_CALLBACK
Definition: microhttpd.h:1651
@ MHD_OPTION_HTTPS_CERT_CALLBACK2
Definition: microhttpd.h:1897
@ MHD_OPTION_SIGPIPE_HANDLED_BY_APP
Definition: microhttpd.h:1919
@ MHD_OPTION_UNESCAPE_CALLBACK
Definition: microhttpd.h:1756
@ MHD_OPTION_EXTERNAL_LOGGER
Definition: microhttpd.h:1703
@ MHD_OPTION_TLS_NO_ALPN
Definition: microhttpd.h:1928
@ MHD_OPTION_LISTEN_BACKLOG_SIZE
Definition: microhttpd.h:1862
@ MHD_OPTION_HTTPS_PRIORITIES
Definition: microhttpd.h:1680
@ MHD_OPTION_HTTPS_MEM_DHPARAMS
Definition: microhttpd.h:1825
@ MHD_OPTION_NOTIFY_CONNECTION
Definition: microhttpd.h:1854
@ MHD_OPTION_LISTENING_ADDRESS_REUSE
Definition: microhttpd.h:1834
@ MHD_OPTION_THREAD_POOL_SIZE
Definition: microhttpd.h:1713
@ MHD_OPTION_CONNECTION_LIMIT
Definition: microhttpd.h:1576
@ MHD_OPTION_PER_IP_CONNECTION_LIMIT
Definition: microhttpd.h:1611
@ MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE
Definition: microhttpd.h:1818
@ MHD_OPTION_HTTPS_MEM_CERT
Definition: microhttpd.h:1667
@ MHD_OPTION_SERVER_INSANITY
Definition: microhttpd.h:1908
@ MHD_OPTION_LISTEN_SOCKET
Definition: microhttpd.h:1688
@ MHD_OPTION_HTTPS_MEM_KEY
Definition: microhttpd.h:1659
@ MHD_OPTION_DIGEST_AUTH_RANDOM
Definition: microhttpd.h:1767
@ MHD_OPTION_HTTPS_KEY_PASSWORD
Definition: microhttpd.h:1843
@ MHD_OPTION_NONCE_NC_SIZE
Definition: microhttpd.h:1774
@ MHD_OPTION_CONNECTION_MEMORY_LIMIT
Definition: microhttpd.h:1570
@ MHD_OPTION_THREAD_STACK_SIZE
Definition: microhttpd.h:1780
@ MHD_OPTION_ARRAY
Definition: microhttpd.h:1734
@ MHD_OPTION_STRICT_FOR_CLIENT
Definition: microhttpd.h:1878
@ MHD_OPTION_SOCK_ADDR
Definition: microhttpd.h:1619
@ MHD_OPTION_CONNECTION_TIMEOUT
Definition: microhttpd.h:1585
@ MHD_OPTION_GNUTLS_PSK_CRED_HANDLER
Definition: microhttpd.h:1886
@ MHD_OPTION_END
Definition: microhttpd.h:1561
@ MHD_OPTION_HTTPS_MEM_TRUST
Definition: microhttpd.h:1787
@ MHD_OPTION_HTTPS_CERT_CALLBACK
Definition: microhttpd.h:1809
@ MHD_OPTION_NOTIFY_COMPLETED
Definition: microhttpd.h:1599
#define MHD_RESPONSE_HEADER_KIND
Definition: microhttpd.h:1985
MHD_DisableSanityCheck
Definition: microhttpd.h:1937
@ MHD_DSC_SANE
Definition: microhttpd.h:1941
MHD_Result
Definition: microhttpd.h:158
@ MHD_YES
Definition: microhttpd.h:167
@ MHD_NO
Definition: microhttpd.h:162
int off_t offset
Definition: microhttpd.h:3643
#define _MHD_EXTERN
Definition: microhttpd.h:197
_MHD_EXTERN struct MHD_Response * MHD_create_response_for_upgrade(MHD_UpgradeHandler upgrade_handler, void *upgrade_handler_cls)
enum MHD_Result(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:2378
void int int must_copy
Definition: microhttpd.h:3430
#define MHD_create_response_from_fd_at_offset(size, fd, offset)
Definition: microhttpd.h:3648
#define MHD_UNSIGNED_LONG_LONG
Definition: microhttpd.h:311
#define _MHD_DEPR_MACRO(msg)
Definition: microhttpd.h:267
void int must_free
Definition: microhttpd.h:3429
int fd
Definition: microhttpd.h:3642
_MHD_EXTERN void MHD_resume_connection(struct MHD_Connection *connection)
Definition: daemon.c:3245
void * data
Definition: microhttpd.h:3428
_MHD_EXTERN size_t MHD_get_reason_phrase_len_for(unsigned int code)
_MHD_EXTERN size_t MHD_http_unescape(char *val)
Definition: internal.c:142
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2597
#define _MHD_FIXED_FLAGS_ENUM
Definition: microhttpd.h:152
#define _MHD_DEPR_FUNC(msg)
Definition: microhttpd.h:298
enum MHD_Result(* MHD_PostDataIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, size_t size)
Definition: microhttpd.h:2636
enum MHD_Result(* MHD_AccessHandlerCallback)(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **con_cls)
Definition: microhttpd.h:2447
MHD_UpgradeAction
Definition: microhttpd.h:3719
@ MHD_UPGRADE_ACTION_CORK_ON
Definition: microhttpd.h:3731
@ MHD_UPGRADE_ACTION_CLOSE
Definition: microhttpd.h:3726
@ MHD_UPGRADE_ACTION_CORK_OFF
Definition: microhttpd.h:3736
MHD_ValueKind
Definition: microhttpd.h:1978
@ MHD_POSTDATA_KIND
Definition: microhttpd.h:2009
@ MHD_FOOTER_KIND
Definition: microhttpd.h:2019
@ MHD_COOKIE_KIND
Definition: microhttpd.h:1999
@ MHD_HEADER_KIND
Definition: microhttpd.h:1993
@ MHD_GET_ARGUMENT_KIND
Definition: microhttpd.h:2014
int(* MHD_PskServerCredentialsCallback)(void *cls, const struct MHD_Connection *connection, const char *username, void **psk, size_t *psk_size)
Definition: microhttpd.h:1543
_MHD_EXTERN const char * MHD_get_reason_phrase_for(unsigned int code)
MHD_DaemonInfoType
Definition: microhttpd.h:2294
@ MHD_DAEMON_INFO_MAC_KEY_SIZE
Definition: microhttpd.h:2303
@ MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY
Definition: microhttpd.h:2323
@ MHD_DAEMON_INFO_BIND_PORT
Definition: microhttpd.h:2349
@ MHD_DAEMON_INFO_EPOLL_FD
Definition: microhttpd.h:2324
@ MHD_DAEMON_INFO_FLAGS
Definition: microhttpd.h:2341
@ MHD_DAEMON_INFO_KEY_SIZE
Definition: microhttpd.h:2298
@ MHD_DAEMON_INFO_CURRENT_CONNECTIONS
Definition: microhttpd.h:2333
@ MHD_DAEMON_INFO_LISTEN_FD
Definition: microhttpd.h:2309
MHD_FLAG
Flags for the struct MHD_Daemon.
Definition: microhttpd.h:1224
@ MHD_USE_EPOLL
Definition: microhttpd.h:1369
@ MHD_ALLOW_SUSPEND_RESUME
Definition: microhttpd.h:1455
@ MHD_USE_TCP_FASTOPEN
Definition: microhttpd.h:1471
@ MHD_USE_THREAD_PER_CONNECTION
Definition: microhttpd.h:1261
@ MHD_USE_EPOLL_INTERNALLY
Definition: microhttpd.h:1390
@ MHD_USE_AUTO
Definition: microhttpd.h:1491
@ MHD_USE_EPOLL_LINUX_ONLY
Definition: microhttpd.h:1372
@ MHD_SUPPRESS_DATE_NO_CLOCK
Definition: microhttpd.h:1345
@ MHD_USE_POST_HANDSHAKE_AUTH_SUPPORT
Definition: microhttpd.h:1505
@ MHD_USE_DEBUG
Definition: microhttpd.h:1241
@ MHD_USE_TURBO
Definition: microhttpd.h:1440
@ MHD_USE_IPv6
Definition: microhttpd.h:1291
@ MHD_USE_SUPPRESS_DATE_NO_CLOCK
Definition: microhttpd.h:1342
@ MHD_USE_SUSPEND_RESUME
Definition: microhttpd.h:1458
@ MHD_USE_DUAL_STACK
Definition: microhttpd.h:1432
@ MHD_USE_POLL
Definition: microhttpd.h:1319
@ MHD_NO_FLAG
Definition: microhttpd.h:1228
@ MHD_USE_POLL_INTERNAL_THREAD
Definition: microhttpd.h:1325
@ MHD_USE_SELECT_INTERNALLY
Definition: microhttpd.h:1276
@ MHD_USE_EPOLL_INTERNAL_THREAD
Definition: microhttpd.h:1386
@ MHD_USE_TLS
Definition: microhttpd.h:1246
@ MHD_USE_PIPE_FOR_SHUTDOWN
Definition: microhttpd.h:1421
@ MHD_USE_AUTO_INTERNAL_THREAD
Definition: microhttpd.h:1499
@ MHD_USE_INSECURE_TLS_EARLY_DATA
Definition: microhttpd.h:1511
@ MHD_USE_SSL
Definition: microhttpd.h:1249
@ MHD_ALLOW_UPGRADE
Definition: microhttpd.h:1478
@ MHD_USE_ERROR_LOG
Definition: microhttpd.h:1235
@ MHD_USE_EPOLL_TURBO
Definition: microhttpd.h:1443
@ MHD_USE_POLL_INTERNALLY
Definition: microhttpd.h:1328
@ MHD_USE_NO_LISTEN_SOCKET
Definition: microhttpd.h:1360
@ MHD_USE_PEDANTIC_CHECKS
Definition: microhttpd.h:1302
@ MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY
Definition: microhttpd.h:1392
@ MHD_USE_INTERNAL_POLLING_THREAD
Definition: microhttpd.h:1273
@ MHD_USE_ITC
Definition: microhttpd.h:1418
MHD_ResponseOptions
Definition: microhttpd.h:3365
@ MHD_RO_END
Definition: microhttpd.h:3369
MHD_ResponseFlags
Definition: microhttpd.h:3297
@ MHD_RF_SEND_KEEP_ALIVE_HEADER
Definition: microhttpd.h:3357
@ MHD_RF_HTTP_VERSION_1_0_RESPONSE
Definition: microhttpd.h:3342
@ MHD_RF_HTTP_1_0_COMPATIBLE_STRICT
Definition: microhttpd.h:3316
@ MHD_RF_HTTP_1_0_SERVER
Definition: microhttpd.h:3337
@ MHD_RF_INSANITY_HEADER_CONTENT_LENGTH
Definition: microhttpd.h:3349
@ MHD_RF_HTTP_VERSION_1_0_ONLY
Definition: microhttpd.h:3321
@ MHD_RF_NONE
Definition: microhttpd.h:3302
MHD_DigestAuthAlgorithm
Definition: microhttpd.h:4095
@ MHD_DIGEST_ALG_AUTO
Definition: microhttpd.h:4100
@ MHD_DIGEST_ALG_MD5
Definition: microhttpd.h:4105
@ MHD_DIGEST_ALG_SHA256
Definition: microhttpd.h:4110
_MHD_EXTERN enum MHD_Result MHD_set_response_options(struct MHD_Response *response, enum MHD_ResponseFlags flags,...)
Definition: response.c:866
_MHD_EXTERN void MHD_free(void *ptr)
Definition: memorypool.c:89
_MHD_EXTERN enum MHD_Result MHD_upgrade_action(struct MHD_UpgradeResponseHandle *urh, enum MHD_UpgradeAction action,...)
_MHD_EXTERN void MHD_suspend_connection(struct MHD_Connection *connection)
Definition: daemon.c:3208
#define MHD_MD5_DIGEST_SIZE
Definition: microhttpd.h:335
MHD_CONNECTION_OPTION
Definition: microhttpd.h:4325
@ MHD_CONNECTION_OPTION_TIMEOUT
Definition: microhttpd.h:4336
void * socket_context
Definition: internal.h:694
const char * url
Definition: internal.h:1011
char * version
Definition: internal.h:1017
char * method
Definition: internal.h:1000
uint16_t port
Definition: internal.h:1819
void * apc_cls
Definition: internal.h:1765
MHD_AcceptPolicyCallback apc
Definition: internal.h:1760
const void * iov_base
Definition: microhttpd.h:2185
size_t iov_len
Definition: microhttpd.h:2190
intptr_t value
Definition: microhttpd.h:1962
enum MHD_OPTION option
Definition: microhttpd.h:1955
void * ptr_value
Definition: microhttpd.h:1968
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:1606
void * crc_cls
Definition: internal.h:1594
MHD_ContentReaderCallback crc
Definition: internal.h:1600
unsigned int connection_timeout
Definition: microhttpd.h:2130
struct MHD_Daemon * daemon
Definition: microhttpd.h:2166
unsigned int http_status
Definition: microhttpd.h:2135
struct sockaddr * client_addr
Definition: microhttpd.h:2160
MHD_socket connect_fd
Definition: microhttpd.h:2140
enum MHD_FLAG flags
Definition: microhttpd.h:4399
uint16_t port
Definition: microhttpd.h:4381
size_t mac_key_size
Definition: microhttpd.h:4371
unsigned int num_connections
Definition: microhttpd.h:4391
MHD_socket listen_fd
Definition: microhttpd.h:4376