GNU libmicrohttpd  0.9.73
microhttpd.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2006--2020 Christian Grothoff (and other contributing authors)
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 
79 #ifndef MHD_MICROHTTPD_H
80 #define MHD_MICROHTTPD_H
81 
82 #ifdef __cplusplus
83 extern "C"
84 {
85 #if 0 /* keep Emacsens' auto-indent happy */
86 }
87 #endif
88 #endif
89 
90 /* If generic headers don't work on your platform, include headers
91  which define 'va_list', 'size_t', 'ssize_t', 'intptr_t',
92  'uint16_t', 'uint32_t', 'uint64_t', 'off_t', 'struct sockaddr',
93  'socklen_t', 'fd_set' and "#define MHD_PLATFORM_H" before
94  including "microhttpd.h". Then the following "standard"
95  includes won't be used (which might be a good idea, especially
96  on platforms where they do not exist).
97  */
98 #ifndef MHD_PLATFORM_H
99 #if defined(_WIN32) && ! defined(__CYGWIN__) && \
100  ! defined(_CRT_DECLARE_NONSTDC_NAMES)
101 #define _CRT_DECLARE_NONSTDC_NAMES 1
102 #endif /* _WIN32 && ! __CYGWIN__ && ! _CRT_DECLARE_NONSTDC_NAMES */
103 #include <stdarg.h>
104 #include <stdint.h>
105 #include <sys/types.h>
106 #if ! defined(_WIN32) || defined(__CYGWIN__)
107 #include <unistd.h>
108 #include <sys/time.h>
109 #include <sys/socket.h>
110 #else /* _WIN32 && ! __CYGWIN__ */
111 /* Declare POSIX-compatible names */
112 #define _CRT_DECLARE_NONSTDC_NAMES 1
113 #include <ws2tcpip.h>
114 #if defined(_MSC_FULL_VER) && ! defined (_SSIZE_T_DEFINED)
115 #define _SSIZE_T_DEFINED
116 typedef intptr_t ssize_t;
117 #endif /* !_SSIZE_T_DEFINED */
118 #endif /* _WIN32 && ! __CYGWIN__ */
119 #endif
120 
121 #if defined(__CYGWIN__) && ! defined(_SYS_TYPES_FD_SET)
122 /* Do not define __USE_W32_SOCKETS under Cygwin! */
123 #error Cygwin with winsock fd_set is not supported
124 #endif
125 
133 #define MHD_VERSION 0x00097300
134 
139 {
143  MHD_NO = 0,
144 
148  MHD_YES = 1
149 
150 };
151 
152 
156 #define MHD_INVALID_NONCE -1
157 
162 #ifdef UINT64_MAX
163 #define MHD_SIZE_UNKNOWN UINT64_MAX
164 #else
165 #define MHD_SIZE_UNKNOWN ((uint64_t) -1LL)
166 #endif
167 
168 #ifdef SIZE_MAX
169 #define MHD_CONTENT_READER_END_OF_STREAM SIZE_MAX
170 #define MHD_CONTENT_READER_END_WITH_ERROR (SIZE_MAX - 1)
171 #else
172 #define MHD_CONTENT_READER_END_OF_STREAM ((size_t) -1LL)
173 #define MHD_CONTENT_READER_END_WITH_ERROR (((size_t) -1LL) - 1)
174 #endif
175 
176 #ifndef _MHD_EXTERN
177 #if defined(_WIN32) && defined(MHD_W32LIB)
178 #define _MHD_EXTERN extern
179 #elif defined (_WIN32) && defined(MHD_W32DLL)
180 /* Define MHD_W32DLL when using MHD as W32 .DLL to speed up linker a little */
181 #define _MHD_EXTERN __declspec(dllimport)
182 #else
183 #define _MHD_EXTERN extern
184 #endif
185 #endif
186 
187 #ifndef MHD_SOCKET_DEFINED
188 
191 #if ! defined(_WIN32) || defined(_SYS_TYPES_FD_SET)
192 #define MHD_POSIX_SOCKETS 1
193 typedef int MHD_socket;
194 #define MHD_INVALID_SOCKET (-1)
195 #else /* !defined(_WIN32) || defined(_SYS_TYPES_FD_SET) */
196 #define MHD_WINSOCK_SOCKETS 1
197 #include <winsock2.h>
198 typedef SOCKET MHD_socket;
199 #define MHD_INVALID_SOCKET (INVALID_SOCKET)
200 #endif /* !defined(_WIN32) || defined(_SYS_TYPES_FD_SET) */
201 #define MHD_SOCKET_DEFINED 1
202 #endif /* MHD_SOCKET_DEFINED */
203 
207 #ifdef MHD_NO_DEPRECATION
208 #define _MHD_DEPR_MACRO(msg)
209 #define _MHD_NO_DEPR_IN_MACRO 1
210 #define _MHD_DEPR_IN_MACRO(msg)
211 #define _MHD_NO_DEPR_FUNC 1
212 #define _MHD_DEPR_FUNC(msg)
213 #endif /* MHD_NO_DEPRECATION */
214 
215 #ifndef _MHD_DEPR_MACRO
216 #if defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1500
217 /* VS 2008 or later */
218 /* Stringify macros */
219 #define _MHD_INSTRMACRO(a) #a
220 #define _MHD_STRMACRO(a) _MHD_INSTRMACRO (a)
221 /* deprecation message */
222 #define _MHD_DEPR_MACRO(msg) __pragma(message (__FILE__ "(" _MHD_STRMACRO ( \
223  __LINE__) "): warning: " msg))
224 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg)
225 #elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__)
226 /* clang or GCC since 3.0 */
227 #define _MHD_GCC_PRAG(x) _Pragma(#x)
228 #if (defined(__clang__) && (__clang_major__ + 0 >= 5 || \
229  (! defined(__apple_build_version__) && \
230  (__clang_major__ + 0 > 3 || (__clang_major__ + 0 == 3 && __clang_minor__ >= \
231  3))))) || \
232  __GNUC__ + 0 > 4 || (__GNUC__ + 0 == 4 && __GNUC_MINOR__ + 0 >= 8)
233 /* clang >= 3.3 (or XCode's clang >= 5.0) or
234  GCC >= 4.8 */
235 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG (GCC warning msg)
236 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg)
237 #else /* older clang or GCC */
238 /* clang < 3.3, XCode's clang < 5.0, 3.0 <= GCC < 4.8 */
239 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG (message msg)
240 #if (defined(__clang__) && (__clang_major__ + 0 > 2 || (__clang_major__ + 0 == \
241  2 && __clang_minor__ >= \
242  9))) /* FIXME: clang >= 2.9, earlier versions not tested */
243 /* clang handles inline pragmas better than GCC */
244 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg)
245 #endif /* clang >= 2.9 */
246 #endif /* older clang or GCC */
247 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */
248 #endif /* clang || GCC >= 3.0 */
249 #endif /* !_MHD_DEPR_MACRO */
250 
251 #ifndef _MHD_DEPR_MACRO
252 #define _MHD_DEPR_MACRO(msg)
253 #endif /* !_MHD_DEPR_MACRO */
254 
255 #ifndef _MHD_DEPR_IN_MACRO
256 #define _MHD_NO_DEPR_IN_MACRO 1
257 #define _MHD_DEPR_IN_MACRO(msg)
258 #endif /* !_MHD_DEPR_IN_MACRO */
259 
260 #ifndef _MHD_DEPR_FUNC
261 #if defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1400
262 /* VS 2005 or later */
263 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated (msg))
264 #elif defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1310
265 /* VS .NET 2003 deprecation do not support custom messages */
266 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated)
267 #elif (__GNUC__ + 0 >= 5) || (defined (__clang__) && \
268  (__clang_major__ + 0 > 2 || (__clang_major__ + 0 == 2 && __clang_minor__ >= \
269  9))) /* FIXME: earlier versions not tested */
270 /* GCC >= 5.0 or clang >= 2.9 */
271 #define _MHD_DEPR_FUNC(msg) __attribute__((deprecated (msg)))
272 #elif defined (__clang__) || __GNUC__ + 0 > 3 || (__GNUC__ + 0 == 3 && \
273  __GNUC_MINOR__ + 0 >= 1)
274 /* 3.1 <= GCC < 5.0 or clang < 2.9 */
275 /* old GCC-style deprecation do not support custom messages */
276 #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__))
277 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */
278 #endif /* clang < 2.9 || GCC >= 3.1 */
279 #endif /* !_MHD_DEPR_FUNC */
280 
281 #ifndef _MHD_DEPR_FUNC
282 #define _MHD_NO_DEPR_FUNC 1
283 #define _MHD_DEPR_FUNC(msg)
284 #endif /* !_MHD_DEPR_FUNC */
285 
291 #ifndef MHD_LONG_LONG
292 
295 #define MHD_LONG_LONG long long
296 #define MHD_UNSIGNED_LONG_LONG unsigned long long
297 #else /* MHD_LONG_LONG */
299  "Macro MHD_LONG_LONG is deprecated, use MHD_UNSIGNED_LONG_LONG")
300 #endif
301 
305 #ifndef MHD_LONG_LONG_PRINTF
306 
309 #define MHD_LONG_LONG_PRINTF "ll"
310 #define MHD_UNSIGNED_LONG_LONG_PRINTF "%llu"
311 #else /* MHD_LONG_LONG_PRINTF */
313  "Macro MHD_LONG_LONG_PRINTF is deprecated, use MHD_UNSIGNED_LONG_LONG_PRINTF")
314 #endif
315 
316 
320 #define MHD_MD5_DIGEST_SIZE 16
321 
322 
331 /* 100 "Continue". RFC7231, Section 6.2.1. */
332 #define MHD_HTTP_CONTINUE 100
333 /* 101 "Switching Protocols". RFC7231, Section 6.2.2. */
334 #define MHD_HTTP_SWITCHING_PROTOCOLS 101
335 /* 102 "Processing". RFC2518. */
336 #define MHD_HTTP_PROCESSING 102
337 /* 103 "Early Hints". RFC8297. */
338 #define MHD_HTTP_EARLY_HINTS 103
339 
340 /* 200 "OK". RFC7231, Section 6.3.1. */
341 #define MHD_HTTP_OK 200
342 /* 201 "Created". RFC7231, Section 6.3.2. */
343 #define MHD_HTTP_CREATED 201
344 /* 202 "Accepted". RFC7231, Section 6.3.3. */
345 #define MHD_HTTP_ACCEPTED 202
346 /* 203 "Non-Authoritative Information". RFC7231, Section 6.3.4. */
347 #define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203
348 /* 204 "No Content". RFC7231, Section 6.3.5. */
349 #define MHD_HTTP_NO_CONTENT 204
350 /* 205 "Reset Content". RFC7231, Section 6.3.6. */
351 #define MHD_HTTP_RESET_CONTENT 205
352 /* 206 "Partial Content". RFC7233, Section 4.1. */
353 #define MHD_HTTP_PARTIAL_CONTENT 206
354 /* 207 "Multi-Status". RFC4918. */
355 #define MHD_HTTP_MULTI_STATUS 207
356 /* 208 "Already Reported". RFC5842. */
357 #define MHD_HTTP_ALREADY_REPORTED 208
358 
359 /* 226 "IM Used". RFC3229. */
360 #define MHD_HTTP_IM_USED 226
361 
362 /* 300 "Multiple Choices". RFC7231, Section 6.4.1. */
363 #define MHD_HTTP_MULTIPLE_CHOICES 300
364 /* 301 "Moved Permanently". RFC7231, Section 6.4.2. */
365 #define MHD_HTTP_MOVED_PERMANENTLY 301
366 /* 302 "Found". RFC7231, Section 6.4.3. */
367 #define MHD_HTTP_FOUND 302
368 /* 303 "See Other". RFC7231, Section 6.4.4. */
369 #define MHD_HTTP_SEE_OTHER 303
370 /* 304 "Not Modified". RFC7232, Section 4.1. */
371 #define MHD_HTTP_NOT_MODIFIED 304
372 /* 305 "Use Proxy". RFC7231, Section 6.4.5. */
373 #define MHD_HTTP_USE_PROXY 305
374 /* 306 "Switch Proxy". Not used! RFC7231, Section 6.4.6. */
375 #define MHD_HTTP_SWITCH_PROXY 306
376 /* 307 "Temporary Redirect". RFC7231, Section 6.4.7. */
377 #define MHD_HTTP_TEMPORARY_REDIRECT 307
378 /* 308 "Permanent Redirect". RFC7538. */
379 #define MHD_HTTP_PERMANENT_REDIRECT 308
380 
381 /* 400 "Bad Request". RFC7231, Section 6.5.1. */
382 #define MHD_HTTP_BAD_REQUEST 400
383 /* 401 "Unauthorized". RFC7235, Section 3.1. */
384 #define MHD_HTTP_UNAUTHORIZED 401
385 /* 402 "Payment Required". RFC7231, Section 6.5.2. */
386 #define MHD_HTTP_PAYMENT_REQUIRED 402
387 /* 403 "Forbidden". RFC7231, Section 6.5.3. */
388 #define MHD_HTTP_FORBIDDEN 403
389 /* 404 "Not Found". RFC7231, Section 6.5.4. */
390 #define MHD_HTTP_NOT_FOUND 404
391 /* 405 "Method Not Allowed". RFC7231, Section 6.5.5. */
392 #define MHD_HTTP_METHOD_NOT_ALLOWED 405
393 /* 406 "Not Acceptable". RFC7231, Section 6.5.6. */
394 #define MHD_HTTP_NOT_ACCEPTABLE 406
395 /* 407 "Proxy Authentication Required". RFC7235, Section 3.2. */
396 #define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
397 /* 408 "Request Timeout". RFC7231, Section 6.5.7. */
398 #define MHD_HTTP_REQUEST_TIMEOUT 408
399 /* 409 "Conflict". RFC7231, Section 6.5.8. */
400 #define MHD_HTTP_CONFLICT 409
401 /* 410 "Gone". RFC7231, Section 6.5.9. */
402 #define MHD_HTTP_GONE 410
403 /* 411 "Length Required". RFC7231, Section 6.5.10. */
404 #define MHD_HTTP_LENGTH_REQUIRED 411
405 /* 412 "Precondition Failed". RFC7232, Section 4.2; RFC8144, Section 3.2. */
406 #define MHD_HTTP_PRECONDITION_FAILED 412
407 /* 413 "Payload Too Large". RFC7231, Section 6.5.11. */
408 #define MHD_HTTP_PAYLOAD_TOO_LARGE 413
409 /* 414 "URI Too Long". RFC7231, Section 6.5.12. */
410 #define MHD_HTTP_URI_TOO_LONG 414
411 /* 415 "Unsupported Media Type". RFC7231, Section 6.5.13; RFC7694, Section 3. */
412 #define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415
413 /* 416 "Range Not Satisfiable". RFC7233, Section 4.4. */
414 #define MHD_HTTP_RANGE_NOT_SATISFIABLE 416
415 /* 417 "Expectation Failed". RFC7231, Section 6.5.14. */
416 #define MHD_HTTP_EXPECTATION_FAILED 417
417 
418 /* 421 "Misdirected Request". RFC7540, Section 9.1.2. */
419 #define MHD_HTTP_MISDIRECTED_REQUEST 421
420 /* 422 "Unprocessable Entity". RFC4918. */
421 #define MHD_HTTP_UNPROCESSABLE_ENTITY 422
422 /* 423 "Locked". RFC4918. */
423 #define MHD_HTTP_LOCKED 423
424 /* 424 "Failed Dependency". RFC4918. */
425 #define MHD_HTTP_FAILED_DEPENDENCY 424
426 /* 425 "Too Early". RFC8470. */
427 #define MHD_HTTP_TOO_EARLY 425
428 /* 426 "Upgrade Required". RFC7231, Section 6.5.15. */
429 #define MHD_HTTP_UPGRADE_REQUIRED 426
430 
431 /* 428 "Precondition Required". RFC6585. */
432 #define MHD_HTTP_PRECONDITION_REQUIRED 428
433 /* 429 "Too Many Requests". RFC6585. */
434 #define MHD_HTTP_TOO_MANY_REQUESTS 429
435 
436 /* 431 "Request Header Fields Too Large". RFC6585. */
437 #define MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
438 
439 /* 451 "Unavailable For Legal Reasons". RFC7725. */
440 #define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
441 
442 /* 500 "Internal Server Error". RFC7231, Section 6.6.1. */
443 #define MHD_HTTP_INTERNAL_SERVER_ERROR 500
444 /* 501 "Not Implemented". RFC7231, Section 6.6.2. */
445 #define MHD_HTTP_NOT_IMPLEMENTED 501
446 /* 502 "Bad Gateway". RFC7231, Section 6.6.3. */
447 #define MHD_HTTP_BAD_GATEWAY 502
448 /* 503 "Service Unavailable". RFC7231, Section 6.6.4. */
449 #define MHD_HTTP_SERVICE_UNAVAILABLE 503
450 /* 504 "Gateway Timeout". RFC7231, Section 6.6.5. */
451 #define MHD_HTTP_GATEWAY_TIMEOUT 504
452 /* 505 "HTTP Version Not Supported". RFC7231, Section 6.6.6. */
453 #define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
454 /* 506 "Variant Also Negotiates". RFC2295. */
455 #define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506
456 /* 507 "Insufficient Storage". RFC4918. */
457 #define MHD_HTTP_INSUFFICIENT_STORAGE 507
458 /* 508 "Loop Detected". RFC5842. */
459 #define MHD_HTTP_LOOP_DETECTED 508
460 
461 /* 510 "Not Extended". RFC2774. */
462 #define MHD_HTTP_NOT_EXTENDED 510
463 /* 511 "Network Authentication Required". RFC6585. */
464 #define MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
465 
466 
467 /* Not registered non-standard codes */
468 /* 449 "Reply With". MS IIS extension. */
469 #define MHD_HTTP_RETRY_WITH 449
470 
471 /* 450 "Blocked by Windows Parental Controls". MS extension. */
472 #define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
473 
474 /* 509 "Bandwidth Limit Exceeded". Apache extension. */
475 #define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
476 
477 
478 /* Deprecated codes */
480 #define MHD_HTTP_METHOD_NOT_ACCEPTABLE \
481  _MHD_DEPR_IN_MACRO ( \
482  "Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") \
483  406
484 
486 #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \
487  _MHD_DEPR_IN_MACRO ( \
488  "Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_PAYLOAD_TOO_LARGE") \
489  413
490 
492 #define MHD_HTTP_REQUEST_URI_TOO_LONG \
493  _MHD_DEPR_IN_MACRO ( \
494  "Value MHD_HTTP_REQUEST_URI_TOO_LONG is deprecated, use MHD_HTTP_URI_TOO_LONG") \
495  414
496 
498 #define MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE \
499  _MHD_DEPR_IN_MACRO ( \
500  "Value MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE is deprecated, use MHD_HTTP_RANGE_NOT_SATISFIABLE") \
501  416
502 
504 #define MHD_HTTP_UNORDERED_COLLECTION \
505  _MHD_DEPR_IN_MACRO ( \
506  "Value MHD_HTTP_UNORDERED_COLLECTION is deprecated as it was removed from RFC") \
507  425
508 
510 #define MHD_HTTP_NO_RESPONSE \
511  _MHD_DEPR_IN_MACRO ( \
512  "Value MHD_HTTP_NO_RESPONSE is deprecated as it is nginx internal code for logs only") \
513  444
514 
515  /* end of group httpcode */
517 
524 _MHD_EXTERN const char *
525 MHD_get_reason_phrase_for (unsigned int code);
526 
527 
534 #define MHD_ICY_FLAG ((uint32_t) (((uint32_t) 1) << 31))
535 
544 /* Main HTTP headers. */
545 /* Standard. RFC7231, Section 5.3.2 */
546 #define MHD_HTTP_HEADER_ACCEPT "Accept"
547 /* Standard. RFC7231, Section 5.3.3 */
548 #define MHD_HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"
549 /* Standard. RFC7231, Section 5.3.4; RFC7694, Section 3 */
550 #define MHD_HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding"
551 /* Standard. RFC7231, Section 5.3.5 */
552 #define MHD_HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"
553 /* Standard. RFC7233, Section 2.3 */
554 #define MHD_HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges"
555 /* Standard. RFC7234, Section 5.1 */
556 #define MHD_HTTP_HEADER_AGE "Age"
557 /* Standard. RFC7231, Section 7.4.1 */
558 #define MHD_HTTP_HEADER_ALLOW "Allow"
559 /* Standard. RFC7235, Section 4.2 */
560 #define MHD_HTTP_HEADER_AUTHORIZATION "Authorization"
561 /* Standard. RFC7234, Section 5.2 */
562 #define MHD_HTTP_HEADER_CACHE_CONTROL "Cache-Control"
563 /* Reserved. RFC7230, Section 8.1 */
564 #define MHD_HTTP_HEADER_CLOSE "Close"
565 /* Standard. RFC7230, Section 6.1 */
566 #define MHD_HTTP_HEADER_CONNECTION "Connection"
567 /* Standard. RFC7231, Section 3.1.2.2 */
568 #define MHD_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"
569 /* Standard. RFC7231, Section 3.1.3.2 */
570 #define MHD_HTTP_HEADER_CONTENT_LANGUAGE "Content-Language"
571 /* Standard. RFC7230, Section 3.3.2 */
572 #define MHD_HTTP_HEADER_CONTENT_LENGTH "Content-Length"
573 /* Standard. RFC7231, Section 3.1.4.2 */
574 #define MHD_HTTP_HEADER_CONTENT_LOCATION "Content-Location"
575 /* Standard. RFC7233, Section 4.2 */
576 #define MHD_HTTP_HEADER_CONTENT_RANGE "Content-Range"
577 /* Standard. RFC7231, Section 3.1.1.5 */
578 #define MHD_HTTP_HEADER_CONTENT_TYPE "Content-Type"
579 /* Standard. RFC7231, Section 7.1.1.2 */
580 #define MHD_HTTP_HEADER_DATE "Date"
581 /* Standard. RFC7232, Section 2.3 */
582 #define MHD_HTTP_HEADER_ETAG "ETag"
583 /* Standard. RFC7231, Section 5.1.1 */
584 #define MHD_HTTP_HEADER_EXPECT "Expect"
585 /* Standard. RFC7234, Section 5.3 */
586 #define MHD_HTTP_HEADER_EXPIRES "Expires"
587 /* Standard. RFC7231, Section 5.5.1 */
588 #define MHD_HTTP_HEADER_FROM "From"
589 /* Standard. RFC7230, Section 5.4 */
590 #define MHD_HTTP_HEADER_HOST "Host"
591 /* Standard. RFC7232, Section 3.1 */
592 #define MHD_HTTP_HEADER_IF_MATCH "If-Match"
593 /* Standard. RFC7232, Section 3.3 */
594 #define MHD_HTTP_HEADER_IF_MODIFIED_SINCE "If-Modified-Since"
595 /* Standard. RFC7232, Section 3.2 */
596 #define MHD_HTTP_HEADER_IF_NONE_MATCH "If-None-Match"
597 /* Standard. RFC7233, Section 3.2 */
598 #define MHD_HTTP_HEADER_IF_RANGE "If-Range"
599 /* Standard. RFC7232, Section 3.4 */
600 #define MHD_HTTP_HEADER_IF_UNMODIFIED_SINCE "If-Unmodified-Since"
601 /* Standard. RFC7232, Section 2.2 */
602 #define MHD_HTTP_HEADER_LAST_MODIFIED "Last-Modified"
603 /* Standard. RFC7231, Section 7.1.2 */
604 #define MHD_HTTP_HEADER_LOCATION "Location"
605 /* Standard. RFC7231, Section 5.1.2 */
606 #define MHD_HTTP_HEADER_MAX_FORWARDS "Max-Forwards"
607 /* Standard. RFC7231, Appendix A.1 */
608 #define MHD_HTTP_HEADER_MIME_VERSION "MIME-Version"
609 /* Standard. RFC7234, Section 5.4 */
610 #define MHD_HTTP_HEADER_PRAGMA "Pragma"
611 /* Standard. RFC7235, Section 4.3 */
612 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate"
613 /* Standard. RFC7235, Section 4.4 */
614 #define MHD_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization"
615 /* Standard. RFC7233, Section 3.1 */
616 #define MHD_HTTP_HEADER_RANGE "Range"
617 /* Standard. RFC7231, Section 5.5.2 */
618 #define MHD_HTTP_HEADER_REFERER "Referer"
619 /* Standard. RFC7231, Section 7.1.3 */
620 #define MHD_HTTP_HEADER_RETRY_AFTER "Retry-After"
621 /* Standard. RFC7231, Section 7.4.2 */
622 #define MHD_HTTP_HEADER_SERVER "Server"
623 /* Standard. RFC7230, Section 4.3 */
624 #define MHD_HTTP_HEADER_TE "TE"
625 /* Standard. RFC7230, Section 4.4 */
626 #define MHD_HTTP_HEADER_TRAILER "Trailer"
627 /* Standard. RFC7230, Section 3.3.1 */
628 #define MHD_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
629 /* Standard. RFC7230, Section 6.7 */
630 #define MHD_HTTP_HEADER_UPGRADE "Upgrade"
631 /* Standard. RFC7231, Section 5.5.3 */
632 #define MHD_HTTP_HEADER_USER_AGENT "User-Agent"
633 /* Standard. RFC7231, Section 7.1.4 */
634 #define MHD_HTTP_HEADER_VARY "Vary"
635 /* Standard. RFC7230, Section 5.7.1 */
636 #define MHD_HTTP_HEADER_VIA "Via"
637 /* Standard. RFC7235, Section 4.1 */
638 #define MHD_HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate"
639 /* Standard. RFC7234, Section 5.5 */
640 #define MHD_HTTP_HEADER_WARNING "Warning"
641 
642 /* Additional HTTP headers. */
643 /* No category. RFC4229 */
644 #define MHD_HTTP_HEADER_A_IM "A-IM"
645 /* No category. RFC4229 */
646 #define MHD_HTTP_HEADER_ACCEPT_ADDITIONS "Accept-Additions"
647 /* Experimental. RFC-ietf-httpbis-client-hints-15, Section 3.1 */
648 #define MHD_HTTP_HEADER_ACCEPT_CH "Accept-CH"
649 /* Informational. RFC7089 */
650 #define MHD_HTTP_HEADER_ACCEPT_DATETIME "Accept-Datetime"
651 /* No category. RFC4229 */
652 #define MHD_HTTP_HEADER_ACCEPT_FEATURES "Accept-Features"
653 /* No category. RFC5789 */
654 #define MHD_HTTP_HEADER_ACCEPT_PATCH "Accept-Patch"
655 /* Standard. https://www.w3.org/TR/ldp/ */
656 #define MHD_HTTP_HEADER_ACCEPT_POST "Accept-Post"
657 /* Standard. RFC7639, Section 2 */
658 #define MHD_HTTP_HEADER_ALPN "ALPN"
659 /* Standard. RFC7838 */
660 #define MHD_HTTP_HEADER_ALT_SVC "Alt-Svc"
661 /* Standard. RFC7838 */
662 #define MHD_HTTP_HEADER_ALT_USED "Alt-Used"
663 /* No category. RFC4229 */
664 #define MHD_HTTP_HEADER_ALTERNATES "Alternates"
665 /* No category. RFC4437 */
666 #define MHD_HTTP_HEADER_APPLY_TO_REDIRECT_REF "Apply-To-Redirect-Ref"
667 /* Experimental. RFC8053, Section 4 */
668 #define MHD_HTTP_HEADER_AUTHENTICATION_CONTROL "Authentication-Control"
669 /* Standard. RFC7615, Section 3 */
670 #define MHD_HTTP_HEADER_AUTHENTICATION_INFO "Authentication-Info"
671 /* No category. RFC4229 */
672 #define MHD_HTTP_HEADER_C_EXT "C-Ext"
673 /* No category. RFC4229 */
674 #define MHD_HTTP_HEADER_C_MAN "C-Man"
675 /* No category. RFC4229 */
676 #define MHD_HTTP_HEADER_C_OPT "C-Opt"
677 /* No category. RFC4229 */
678 #define MHD_HTTP_HEADER_C_PEP "C-PEP"
679 /* No category. RFC4229 */
680 #define MHD_HTTP_HEADER_C_PEP_INFO "C-PEP-Info"
681 /* Standard. RFC8607, Section 5.1 */
682 #define MHD_HTTP_HEADER_CAL_MANAGED_ID "Cal-Managed-ID"
683 /* Standard. RFC7809, Section 7.1 */
684 #define MHD_HTTP_HEADER_CALDAV_TIMEZONES "CalDAV-Timezones"
685 /* Standard. RFC8586 */
686 #define MHD_HTTP_HEADER_CDN_LOOP "CDN-Loop"
687 /* Standard. RFC8739, Section 3.3 */
688 #define MHD_HTTP_HEADER_CERT_NOT_AFTER "Cert-Not-After"
689 /* Standard. RFC8739, Section 3.3 */
690 #define MHD_HTTP_HEADER_CERT_NOT_BEFORE "Cert-Not-Before"
691 /* Obsoleted. RFC2068; RFC2616 */
692 #define MHD_HTTP_HEADER_CONTENT_BASE "Content-Base"
693 /* Standard. RFC6266 */
694 #define MHD_HTTP_HEADER_CONTENT_DISPOSITION "Content-Disposition"
695 /* No category. RFC4229 */
696 #define MHD_HTTP_HEADER_CONTENT_ID "Content-ID"
697 /* No category. RFC4229 */
698 #define MHD_HTTP_HEADER_CONTENT_MD5 "Content-MD5"
699 /* No category. RFC4229 */
700 #define MHD_HTTP_HEADER_CONTENT_SCRIPT_TYPE "Content-Script-Type"
701 /* No category. RFC4229 */
702 #define MHD_HTTP_HEADER_CONTENT_STYLE_TYPE "Content-Style-Type"
703 /* No category. RFC4229 */
704 #define MHD_HTTP_HEADER_CONTENT_VERSION "Content-Version"
705 /* Standard. RFC6265 */
706 #define MHD_HTTP_HEADER_COOKIE "Cookie"
707 /* Obsoleted. RFC2965; RFC6265 */
708 #define MHD_HTTP_HEADER_COOKIE2 "Cookie2"
709 /* Standard. RFC5323 */
710 #define MHD_HTTP_HEADER_DASL "DASL"
711 /* Standard. RFC4918 */
712 #define MHD_HTTP_HEADER_DAV "DAV"
713 /* No category. RFC4229 */
714 #define MHD_HTTP_HEADER_DEFAULT_STYLE "Default-Style"
715 /* No category. RFC4229 */
716 #define MHD_HTTP_HEADER_DELTA_BASE "Delta-Base"
717 /* Standard. RFC4918 */
718 #define MHD_HTTP_HEADER_DEPTH "Depth"
719 /* No category. RFC4229 */
720 #define MHD_HTTP_HEADER_DERIVED_FROM "Derived-From"
721 /* Standard. RFC4918 */
722 #define MHD_HTTP_HEADER_DESTINATION "Destination"
723 /* No category. RFC4229 */
724 #define MHD_HTTP_HEADER_DIFFERENTIAL_ID "Differential-ID"
725 /* No category. RFC4229 */
726 #define MHD_HTTP_HEADER_DIGEST "Digest"
727 /* Standard. RFC8470 */
728 #define MHD_HTTP_HEADER_EARLY_DATA "Early-Data"
729 /* Experimental. RFC-ietf-httpbis-expect-ct-08 */
730 #define MHD_HTTP_HEADER_EXPECT_CT "Expect-CT"
731 /* No category. RFC4229 */
732 #define MHD_HTTP_HEADER_EXT "Ext"
733 /* Standard. RFC7239 */
734 #define MHD_HTTP_HEADER_FORWARDED "Forwarded"
735 /* No category. RFC4229 */
736 #define MHD_HTTP_HEADER_GETPROFILE "GetProfile"
737 /* Experimental. RFC7486, Section 6.1.1 */
738 #define MHD_HTTP_HEADER_HOBAREG "Hobareg"
739 /* Standard. RFC7540, Section 3.2.1 */
740 #define MHD_HTTP_HEADER_HTTP2_SETTINGS "HTTP2-Settings"
741 /* No category. RFC4229 */
742 #define MHD_HTTP_HEADER_IM "IM"
743 /* Standard. RFC4918 */
744 #define MHD_HTTP_HEADER_IF "If"
745 /* Standard. RFC6638 */
746 #define MHD_HTTP_HEADER_IF_SCHEDULE_TAG_MATCH "If-Schedule-Tag-Match"
747 /* Standard. RFC8473 */
748 #define MHD_HTTP_HEADER_INCLUDE_REFERRED_TOKEN_BINDING_ID \
749  "Include-Referred-Token-Binding-ID"
750 /* No category. RFC4229 */
751 #define MHD_HTTP_HEADER_KEEP_ALIVE "Keep-Alive"
752 /* No category. RFC4229 */
753 #define MHD_HTTP_HEADER_LABEL "Label"
754 /* Standard. RFC8288 */
755 #define MHD_HTTP_HEADER_LINK "Link"
756 /* Standard. RFC4918 */
757 #define MHD_HTTP_HEADER_LOCK_TOKEN "Lock-Token"
758 /* No category. RFC4229 */
759 #define MHD_HTTP_HEADER_MAN "Man"
760 /* Informational. RFC7089 */
761 #define MHD_HTTP_HEADER_MEMENTO_DATETIME "Memento-Datetime"
762 /* No category. RFC4229 */
763 #define MHD_HTTP_HEADER_METER "Meter"
764 /* No category. RFC4229 */
765 #define MHD_HTTP_HEADER_NEGOTIATE "Negotiate"
766 /* Standard. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
767 #define MHD_HTTP_HEADER_ODATA_ENTITYID "OData-EntityId"
768 /* Standard. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
769 #define MHD_HTTP_HEADER_ODATA_ISOLATION "OData-Isolation"
770 /* Standard. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
771 #define MHD_HTTP_HEADER_ODATA_MAXVERSION "OData-MaxVersion"
772 /* Standard. OData Version 4.01 Part 1: Protocol; OASIS; Chet_Ensign */
773 #define MHD_HTTP_HEADER_ODATA_VERSION "OData-Version"
774 /* No category. RFC4229 */
775 #define MHD_HTTP_HEADER_OPT "Opt"
776 /* Experimental. RFC8053, Section 3 */
777 #define MHD_HTTP_HEADER_OPTIONAL_WWW_AUTHENTICATE "Optional-WWW-Authenticate"
778 /* Standard. RFC4229 */
779 #define MHD_HTTP_HEADER_ORDERING_TYPE "Ordering-Type"
780 /* Standard. RFC6454 */
781 #define MHD_HTTP_HEADER_ORIGIN "Origin"
782 /* Standard. RFC8613, Section 11.1 */
783 #define MHD_HTTP_HEADER_OSCORE "OSCORE"
784 /* Standard. RFC4918 */
785 #define MHD_HTTP_HEADER_OVERWRITE "Overwrite"
786 /* No category. RFC4229 */
787 #define MHD_HTTP_HEADER_P3P "P3P"
788 /* No category. RFC4229 */
789 #define MHD_HTTP_HEADER_PEP "PEP"
790 /* No category. RFC4229 */
791 #define MHD_HTTP_HEADER_PICS_LABEL "PICS-Label"
792 /* No category. RFC4229 */
793 #define MHD_HTTP_HEADER_PEP_INFO "Pep-Info"
794 /* Standard. RFC4229 */
795 #define MHD_HTTP_HEADER_POSITION "Position"
796 /* Standard. RFC7240 */
797 #define MHD_HTTP_HEADER_PREFER "Prefer"
798 /* Standard. RFC7240 */
799 #define MHD_HTTP_HEADER_PREFERENCE_APPLIED "Preference-Applied"
800 /* No category. RFC4229 */
801 #define MHD_HTTP_HEADER_PROFILEOBJECT "ProfileObject"
802 /* No category. RFC4229 */
803 #define MHD_HTTP_HEADER_PROTOCOL "Protocol"
804 /* No category. RFC4229 */
805 #define MHD_HTTP_HEADER_PROTOCOL_INFO "Protocol-Info"
806 /* No category. RFC4229 */
807 #define MHD_HTTP_HEADER_PROTOCOL_QUERY "Protocol-Query"
808 /* No category. RFC4229 */
809 #define MHD_HTTP_HEADER_PROTOCOL_REQUEST "Protocol-Request"
810 /* Standard. RFC7615, Section 4 */
811 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATION_INFO "Proxy-Authentication-Info"
812 /* No category. RFC4229 */
813 #define MHD_HTTP_HEADER_PROXY_FEATURES "Proxy-Features"
814 /* No category. RFC4229 */
815 #define MHD_HTTP_HEADER_PROXY_INSTRUCTION "Proxy-Instruction"
816 /* No category. RFC4229 */
817 #define MHD_HTTP_HEADER_PUBLIC "Public"
818 /* Standard. RFC7469 */
819 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS "Public-Key-Pins"
820 /* Standard. RFC7469 */
821 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS_REPORT_ONLY \
822  "Public-Key-Pins-Report-Only"
823 /* No category. RFC4437 */
824 #define MHD_HTTP_HEADER_REDIRECT_REF "Redirect-Ref"
825 /* Standard. RFC8555, Section 6.5.1 */
826 #define MHD_HTTP_HEADER_REPLAY_NONCE "Replay-Nonce"
827 /* No category. RFC4229 */
828 #define MHD_HTTP_HEADER_SAFE "Safe"
829 /* Standard. RFC6638 */
830 #define MHD_HTTP_HEADER_SCHEDULE_REPLY "Schedule-Reply"
831 /* Standard. RFC6638 */
832 #define MHD_HTTP_HEADER_SCHEDULE_TAG "Schedule-Tag"
833 /* Standard. RFC8473 */
834 #define MHD_HTTP_HEADER_SEC_TOKEN_BINDING "Sec-Token-Binding"
835 /* Standard. RFC6455 */
836 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_ACCEPT "Sec-WebSocket-Accept"
837 /* Standard. RFC6455 */
838 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_EXTENSIONS "Sec-WebSocket-Extensions"
839 /* Standard. RFC6455 */
840 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY "Sec-WebSocket-Key"
841 /* Standard. RFC6455 */
842 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_PROTOCOL "Sec-WebSocket-Protocol"
843 /* Standard. RFC6455 */
844 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION "Sec-WebSocket-Version"
845 /* No category. RFC4229 */
846 #define MHD_HTTP_HEADER_SECURITY_SCHEME "Security-Scheme"
847 /* Standard. RFC6265 */
848 #define MHD_HTTP_HEADER_SET_COOKIE "Set-Cookie"
849 /* Obsoleted. RFC2965; RFC6265 */
850 #define MHD_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2"
851 /* No category. RFC4229 */
852 #define MHD_HTTP_HEADER_SETPROFILE "SetProfile"
853 /* Standard. RFC5023 */
854 #define MHD_HTTP_HEADER_SLUG "SLUG"
855 /* No category. RFC4229 */
856 #define MHD_HTTP_HEADER_SOAPACTION "SoapAction"
857 /* No category. RFC4229 */
858 #define MHD_HTTP_HEADER_STATUS_URI "Status-URI"
859 /* Standard. RFC6797 */
860 #define MHD_HTTP_HEADER_STRICT_TRANSPORT_SECURITY "Strict-Transport-Security"
861 /* Informational. RFC8594 */
862 #define MHD_HTTP_HEADER_SUNSET "Sunset"
863 /* No category. RFC4229 */
864 #define MHD_HTTP_HEADER_SURROGATE_CAPABILITY "Surrogate-Capability"
865 /* No category. RFC4229 */
866 #define MHD_HTTP_HEADER_SURROGATE_CONTROL "Surrogate-Control"
867 /* No category. RFC4229 */
868 #define MHD_HTTP_HEADER_TCN "TCN"
869 /* Standard. RFC4918 */
870 #define MHD_HTTP_HEADER_TIMEOUT "Timeout"
871 /* Standard. RFC8030, Section 5.4 */
872 #define MHD_HTTP_HEADER_TOPIC "Topic"
873 /* Standard. RFC8030, Section 5.2 */
874 #define MHD_HTTP_HEADER_TTL "TTL"
875 /* Standard. RFC8030, Section 5.3 */
876 #define MHD_HTTP_HEADER_URGENCY "Urgency"
877 /* No category. RFC4229 */
878 #define MHD_HTTP_HEADER_URI "URI"
879 /* No category. RFC4229 */
880 #define MHD_HTTP_HEADER_VARIANT_VARY "Variant-Vary"
881 /* No category. RFC4229 */
882 #define MHD_HTTP_HEADER_WANT_DIGEST "Want-Digest"
883 /* Standard. https://fetch.spec.whatwg.org/#x-content-type-options-header */
884 #define MHD_HTTP_HEADER_X_CONTENT_TYPE_OPTIONS "X-Content-Type-Options"
885 /* Informational. RFC7034 */
886 #define MHD_HTTP_HEADER_X_FRAME_OPTIONS "X-Frame-Options"
887 
888 /* Some provisional headers. */
889 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN \
890  "Access-Control-Allow-Origin"
891  /* end of group headers */
892 
899 #define MHD_HTTP_VERSION_1_0 "HTTP/1.0"
900 #define MHD_HTTP_VERSION_1_1 "HTTP/1.1"
901  /* end of group versions */
903 
912 /* Main HTTP methods. */
913 /* Not safe. Not idempotent. RFC7231, Section 4.3.6. */
914 #define MHD_HTTP_METHOD_CONNECT "CONNECT"
915 /* Not safe. Idempotent. RFC7231, Section 4.3.5. */
916 #define MHD_HTTP_METHOD_DELETE "DELETE"
917 /* Safe. Idempotent. RFC7231, Section 4.3.1. */
918 #define MHD_HTTP_METHOD_GET "GET"
919 /* Safe. Idempotent. RFC7231, Section 4.3.2. */
920 #define MHD_HTTP_METHOD_HEAD "HEAD"
921 /* Safe. Idempotent. RFC7231, Section 4.3.7. */
922 #define MHD_HTTP_METHOD_OPTIONS "OPTIONS"
923 /* Not safe. Not idempotent. RFC7231, Section 4.3.3. */
924 #define MHD_HTTP_METHOD_POST "POST"
925 /* Not safe. Idempotent. RFC7231, Section 4.3.4. */
926 #define MHD_HTTP_METHOD_PUT "PUT"
927 /* Safe. Idempotent. RFC7231, Section 4.3.8. */
928 #define MHD_HTTP_METHOD_TRACE "TRACE"
929 
930 /* Additional HTTP methods. */
931 /* Not safe. Idempotent. RFC3744, Section 8.1. */
932 #define MHD_HTTP_METHOD_ACL "ACL"
933 /* Not safe. Idempotent. RFC3253, Section 12.6. */
934 #define MHD_HTTP_METHOD_BASELINE_CONTROL "BASELINE-CONTROL"
935 /* Not safe. Idempotent. RFC5842, Section 4. */
936 #define MHD_HTTP_METHOD_BIND "BIND"
937 /* Not safe. Idempotent. RFC3253, Section 4.4, Section 9.4. */
938 #define MHD_HTTP_METHOD_CHECKIN "CHECKIN"
939 /* Not safe. Idempotent. RFC3253, Section 4.3, Section 8.8. */
940 #define MHD_HTTP_METHOD_CHECKOUT "CHECKOUT"
941 /* Not safe. Idempotent. RFC4918, Section 9.8. */
942 #define MHD_HTTP_METHOD_COPY "COPY"
943 /* Not safe. Idempotent. RFC3253, Section 8.2. */
944 #define MHD_HTTP_METHOD_LABEL "LABEL"
945 /* Not safe. Idempotent. RFC2068, Section 19.6.1.2. */
946 #define MHD_HTTP_METHOD_LINK "LINK"
947 /* Not safe. Not idempotent. RFC4918, Section 9.10. */
948 #define MHD_HTTP_METHOD_LOCK "LOCK"
949 /* Not safe. Idempotent. RFC3253, Section 11.2. */
950 #define MHD_HTTP_METHOD_MERGE "MERGE"
951 /* Not safe. Idempotent. RFC3253, Section 13.5. */
952 #define MHD_HTTP_METHOD_MKACTIVITY "MKACTIVITY"
953 /* Not safe. Idempotent. RFC4791, Section 5.3.1; RFC8144, Section 2.3. */
954 #define MHD_HTTP_METHOD_MKCALENDAR "MKCALENDAR"
955 /* Not safe. Idempotent. RFC4918, Section 9.3; RFC5689, Section 3; RFC8144, Section 2.3. */
956 #define MHD_HTTP_METHOD_MKCOL "MKCOL"
957 /* Not safe. Idempotent. RFC4437, Section 6. */
958 #define MHD_HTTP_METHOD_MKREDIRECTREF "MKREDIRECTREF"
959 /* Not safe. Idempotent. RFC3253, Section 6.3. */
960 #define MHD_HTTP_METHOD_MKWORKSPACE "MKWORKSPACE"
961 /* Not safe. Idempotent. RFC4918, Section 9.9. */
962 #define MHD_HTTP_METHOD_MOVE "MOVE"
963 /* Not safe. Idempotent. RFC3648, Section 7. */
964 #define MHD_HTTP_METHOD_ORDERPATCH "ORDERPATCH"
965 /* Not safe. Not idempotent. RFC5789, Section 2. */
966 #define MHD_HTTP_METHOD_PATCH "PATCH"
967 /* Safe. Idempotent. RFC7540, Section 3.5. */
968 #define MHD_HTTP_METHOD_PRI "PRI"
969 /* Safe. Idempotent. RFC4918, Section 9.1; RFC8144, Section 2.1. */
970 #define MHD_HTTP_METHOD_PROPFIND "PROPFIND"
971 /* Not safe. Idempotent. RFC4918, Section 9.2; RFC8144, Section 2.2. */
972 #define MHD_HTTP_METHOD_PROPPATCH "PROPPATCH"
973 /* Not safe. Idempotent. RFC5842, Section 6. */
974 #define MHD_HTTP_METHOD_REBIND "REBIND"
975 /* Safe. Idempotent. RFC3253, Section 3.6; RFC8144, Section 2.1. */
976 #define MHD_HTTP_METHOD_REPORT "REPORT"
977 /* Safe. Idempotent. RFC5323, Section 2. */
978 #define MHD_HTTP_METHOD_SEARCH "SEARCH"
979 /* Not safe. Idempotent. RFC5842, Section 5. */
980 #define MHD_HTTP_METHOD_UNBIND "UNBIND"
981 /* Not safe. Idempotent. RFC3253, Section 4.5. */
982 #define MHD_HTTP_METHOD_UNCHECKOUT "UNCHECKOUT"
983 /* Not safe. Idempotent. RFC2068, Section 19.6.1.3. */
984 #define MHD_HTTP_METHOD_UNLINK "UNLINK"
985 /* Not safe. Idempotent. RFC4918, Section 9.11. */
986 #define MHD_HTTP_METHOD_UNLOCK "UNLOCK"
987 /* Not safe. Idempotent. RFC3253, Section 7.1. */
988 #define MHD_HTTP_METHOD_UPDATE "UPDATE"
989 /* Not safe. Idempotent. RFC4437, Section 7. */
990 #define MHD_HTTP_METHOD_UPDATEREDIRECTREF "UPDATEREDIRECTREF"
991 /* Not safe. Idempotent. RFC3253, Section 3.5. */
992 #define MHD_HTTP_METHOD_VERSION_CONTROL "VERSION-CONTROL"
993  /* end of group methods */
995 
1001 #define MHD_HTTP_POST_ENCODING_FORM_URLENCODED \
1002  "application/x-www-form-urlencoded"
1003 #define MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data"
1004  /* end of group postenc */
1006 
1007 
1012 struct MHD_Daemon;
1013 
1022 struct MHD_Connection;
1023 
1028 struct MHD_Response;
1029 
1034 struct MHD_PostProcessor;
1035 
1036 
1050 {
1055 
1062 
1068 
1073 
1076 #if 0
1077  /* let's do this later once versions that define MHD_USE_TLS a more widely deployed. */
1078 #define MHD_USE_SSL \
1079  _MHD_DEPR_IN_MACRO ("Value MHD_USE_SSL is deprecated, use MHD_USE_TLS") \
1080  MHD_USE_TLS
1081 #endif
1082 
1088 
1099 
1102 #if 0 /* Will be marked for real deprecation later. */
1103 #define MHD_USE_SELECT_INTERNALLY \
1104  _MHD_DEPR_IN_MACRO ( \
1105  "Value MHD_USE_SELECT_INTERNALLY is deprecated, use MHD_USE_INTERNAL_POLLING_THREAD instead") \
1106  MHD_USE_INTERNAL_POLLING_THREAD
1107 #endif /* 0 */
1108 
1117 
1128 #if 0 /* Will be marked for real deprecation later. */
1129 #define MHD_USE_PEDANTIC_CHECKS \
1130  _MHD_DEPR_IN_MACRO ( \
1131  "Flag MHD_USE_PEDANTIC_CHECKS is deprecated, use option MHD_OPTION_STRICT_FOR_CLIENT instead") \
1132  32
1133 #endif /* 0 */
1134 
1144 
1150 
1153 #if 0 /* Will be marked for real deprecation later. */
1154 #define MHD_USE_POLL_INTERNALLY \
1155  _MHD_DEPR_IN_MACRO ( \
1156  "Value MHD_USE_POLL_INTERNALLY is deprecated, use MHD_USE_POLL_INTERNAL_THREAD instead") \
1157  MHD_USE_POLL_INTERNAL_THREAD
1158 #endif /* 0 */
1159 
1167 
1170 #if 0 /* Will be marked for real deprecation later. */
1171 #define MHD_SUPPRESS_DATE_NO_CLOCK \
1172  _MHD_DEPR_IN_MACRO ( \
1173  "Value MHD_SUPPRESS_DATE_NO_CLOCK is deprecated, use MHD_USE_SUPPRESS_DATE_NO_CLOCK instead") \
1174  MHD_USE_SUPPRESS_DATE_NO_CLOCK
1175 #endif /* 0 */
1176 
1185 
1194 
1197 #if 0 /* Will be marked for real deprecation later. */
1198 #define MHD_USE_EPOLL_LINUX_ONLY \
1199  _MHD_DEPR_IN_MACRO ( \
1200  "Value MHD_USE_EPOLL_LINUX_ONLY is deprecated, use MHD_USE_EPOLL") \
1201  MHD_USE_EPOLL
1202 #endif /* 0 */
1203 
1212 
1218 #if 0 /* Will be marked for real deprecation later. */
1219 #define MHD_USE_EPOLL_INTERNALLY \
1220  _MHD_DEPR_IN_MACRO ( \
1221  "Value MHD_USE_EPOLL_INTERNALLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \
1222  MHD_USE_EPOLL_INTERNAL_THREAD
1223 
1224 #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \
1225  _MHD_DEPR_IN_MACRO ( \
1226  "Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \
1227  MHD_USE_EPOLL_INTERNAL_THREAD
1228 #endif /* 0 */
1229 
1242  MHD_USE_ITC = 1024,
1243 
1246 #if 0 /* Will be marked for real deprecation later. */
1247 #define MHD_USE_PIPE_FOR_SHUTDOWN \
1248  _MHD_DEPR_IN_MACRO ( \
1249  "Value MHD_USE_PIPE_FOR_SHUTDOWN is deprecated, use MHD_USE_ITC") \
1250  MHD_USE_ITC
1251 #endif /* 0 */
1252 
1257 
1265 
1268 #if 0 /* Will be marked for real deprecation later. */
1269 #define MHD_USE_EPOLL_TURBO \
1270  _MHD_DEPR_IN_MACRO ( \
1271  "Value MHD_USE_EPOLL_TURBO is deprecated, use MHD_USE_TURBO") \
1272  MHD_USE_TURBO
1273 #endif /* 0 */
1274 
1280 
1283 #if 0 /* Will be marked for real deprecation later. */
1284 #define MHD_USE_SUSPEND_RESUME \
1285  _MHD_DEPR_IN_MACRO ( \
1286  "Value MHD_USE_SUSPEND_RESUME is deprecated, use MHD_ALLOW_SUSPEND_RESUME instead") \
1287  MHD_ALLOW_SUSPEND_RESUME
1288 #endif /* 0 */
1289 
1296 
1303 
1315  MHD_USE_AUTO = 65536,
1316 
1324 
1330 
1336 
1337 };
1338 
1339 
1348 typedef void
1349 (*MHD_LogCallback)(void *cls,
1350  const char *fm,
1351  va_list ap);
1352 
1353 
1366 typedef int
1368  const struct MHD_Connection *connection,
1369  const char *username,
1370  void **psk,
1371  size_t *psk_size);
1372 
1379 {
1380 
1386 
1395 
1401 
1408 
1422 
1434 
1442 
1474 
1482 
1490 
1497 
1503 
1511 
1526 
1536 
1557 
1579 
1590 
1597 
1603 
1610 
1616 
1632 
1641 
1648 
1657 
1666 
1677 
1685 
1701 
1709 
1720 
1731 
1742 
1751 };
1752 
1753 
1759 {
1763  MHD_DSC_SANE = 0
1764 
1765 };
1766 
1767 
1772 {
1777  enum MHD_OPTION option;
1778 
1784  intptr_t value;
1785 
1790  void *ptr_value;
1791 
1792 };
1793 
1794 
1800 {
1801 
1807 #define MHD_RESPONSE_HEADER_KIND \
1808  _MHD_DEPR_IN_MACRO ( \
1809  "Value MHD_RESPONSE_HEADER_KIND is deprecated and not used") \
1810  MHD_RESPONSE_HEADER_KIND
1811 
1816 
1822 
1832 
1837 
1841  MHD_FOOTER_KIND = 16
1842 };
1843 
1844 
1851 {
1852 
1858 
1866 
1874 
1881 
1891 
1899 
1900 };
1901 
1902 
1909 {
1910 
1916 
1922 
1923 };
1924 
1925 
1930 {
1931 
1935  int /* enum gnutls_cipher_algorithm */ cipher_algorithm;
1936 
1940  int /* enum gnutls_protocol */ protocol;
1941 
1945  int /* MHD_YES or MHD_NO */ suspended;
1946 
1952  unsigned int connection_timeout;
1953 
1958 
1962  size_t header_size;
1963 
1967  void * /* gnutls_session_t */ tls_session;
1968 
1972  void * /* gnutls_x509_crt_t */ client_cert;
1973 
1977  struct sockaddr *client_addr;
1978 
1984 
1990 };
1991 
1992 
1998 {
2002  const void *iov_base;
2003 
2007  size_t iov_len;
2008 };
2009 
2010 
2017 {
2024 
2031 
2040 
2046 
2054 
2060 
2068 
2078 
2084 
2090 
2096 };
2097 
2098 
2104 {
2109 
2114 
2120 
2129 
2138 
2146 
2154 };
2155 
2156 
2167 typedef void
2168 (*MHD_PanicCallback) (void *cls,
2169  const char *file,
2170  unsigned int line,
2171  const char *reason);
2172 
2181 typedef enum MHD_Result
2182 (*MHD_AcceptPolicyCallback)(void *cls,
2183  const struct sockaddr *addr,
2184  socklen_t addrlen);
2185 
2186 
2226 typedef enum MHD_Result
2227 (*MHD_AccessHandlerCallback)(void *cls,
2228  struct MHD_Connection *connection,
2229  const char *url,
2230  const char *method,
2231  const char *version,
2232  const char *upload_data,
2233  size_t *upload_data_size,
2234  void **con_cls);
2235 
2236 
2249 typedef void
2250 (*MHD_RequestCompletedCallback) (void *cls,
2251  struct MHD_Connection *connection,
2252  void **con_cls,
2253  enum MHD_RequestTerminationCode toe);
2254 
2255 
2275 typedef void
2276 (*MHD_NotifyConnectionCallback) (void *cls,
2277  struct MHD_Connection *connection,
2278  void **socket_context,
2280 
2281 
2297 typedef enum MHD_Result
2298 (*MHD_KeyValueIterator)(void *cls,
2299  enum MHD_ValueKind kind,
2300  const char *key,
2301  const char *value);
2302 
2303 
2322 typedef enum MHD_Result
2323 (*MHD_KeyValueIteratorN)(void *cls,
2324  enum MHD_ValueKind kind,
2325  const char *key,
2326  size_t key_size,
2327  const char *value,
2328  size_t value_size);
2329 
2330 
2375 typedef ssize_t
2376 (*MHD_ContentReaderCallback) (void *cls,
2377  uint64_t pos,
2378  char *buf,
2379  size_t max);
2380 
2381 
2391 typedef void
2392 (*MHD_ContentReaderFreeCallback) (void *cls);
2393 
2394 
2414 typedef enum MHD_Result
2415 (*MHD_PostDataIterator)(void *cls,
2416  enum MHD_ValueKind kind,
2417  const char *key,
2418  const char *filename,
2419  const char *content_type,
2420  const char *transfer_encoding,
2421  const char *data,
2422  uint64_t off,
2423  size_t size);
2424 
2425 /* **************** Daemon handling functions ***************** */
2426 
2448 _MHD_EXTERN struct MHD_Daemon *
2449 MHD_start_daemon_va (unsigned int flags,
2450  uint16_t port,
2452  MHD_AccessHandlerCallback dh, void *dh_cls,
2453  va_list ap);
2454 
2455 
2476 _MHD_EXTERN struct MHD_Daemon *
2477 MHD_start_daemon (unsigned int flags,
2478  uint16_t port,
2480  MHD_AccessHandlerCallback dh, void *dh_cls,
2481  ...);
2482 
2483 
2504 MHD_quiesce_daemon (struct MHD_Daemon *daemon);
2505 
2506 
2513 _MHD_EXTERN void
2514 MHD_stop_daemon (struct MHD_Daemon *daemon);
2515 
2516 
2545 MHD_add_connection (struct MHD_Daemon *daemon,
2546  MHD_socket client_socket,
2547  const struct sockaddr *addr,
2548  socklen_t addrlen);
2549 
2550 
2581 MHD_get_fdset (struct MHD_Daemon *daemon,
2582  fd_set *read_fd_set,
2583  fd_set *write_fd_set,
2584  fd_set *except_fd_set,
2585  MHD_socket *max_fd);
2586 
2587 
2621 MHD_get_fdset2 (struct MHD_Daemon *daemon,
2622  fd_set *read_fd_set,
2623  fd_set *write_fd_set,
2624  fd_set *except_fd_set,
2625  MHD_socket *max_fd,
2626  unsigned int fd_setsize);
2627 
2628 
2653 #define MHD_get_fdset(daemon,read_fd_set,write_fd_set,except_fd_set,max_fd) \
2654  MHD_get_fdset2 ((daemon),(read_fd_set),(write_fd_set),(except_fd_set), \
2655  (max_fd),FD_SETSIZE)
2656 
2657 
2677 MHD_get_timeout (struct MHD_Daemon *daemon,
2678  MHD_UNSIGNED_LONG_LONG *timeout);
2679 
2680 
2702 MHD_run (struct MHD_Daemon *daemon);
2703 
2704 
2734 MHD_run_wait (struct MHD_Daemon *daemon,
2735  int32_t millisec);
2736 
2737 
2761 MHD_run_from_select (struct MHD_Daemon *daemon,
2762  const fd_set *read_fd_set,
2763  const fd_set *write_fd_set,
2764  const fd_set *except_fd_set);
2765 
2766 
2767 /* **************** Connection handling functions ***************** */
2768 
2781 _MHD_EXTERN int
2782 MHD_get_connection_values (struct MHD_Connection *connection,
2783  enum MHD_ValueKind kind,
2784  MHD_KeyValueIterator iterator,
2785  void *iterator_cls);
2786 
2787 
2801 _MHD_EXTERN int
2802 MHD_get_connection_values_n (struct MHD_Connection *connection,
2803  enum MHD_ValueKind kind,
2804  MHD_KeyValueIteratorN iterator,
2805  void *iterator_cls);
2806 
2807 
2835 MHD_set_connection_value (struct MHD_Connection *connection,
2836  enum MHD_ValueKind kind,
2837  const char *key,
2838  const char *value);
2839 
2840 
2868 MHD_set_connection_value_n (struct MHD_Connection *connection,
2869  enum MHD_ValueKind kind,
2870  const char *key,
2871  size_t key_size,
2872  const char *value,
2873  size_t value_size);
2874 
2875 
2892 _MHD_EXTERN void
2893 MHD_set_panic_func (MHD_PanicCallback cb, void *cls);
2894 
2895 
2905 _MHD_EXTERN size_t
2906 MHD_http_unescape (char *val);
2907 
2908 
2919 _MHD_EXTERN const char *
2920 MHD_lookup_connection_value (struct MHD_Connection *connection,
2921  enum MHD_ValueKind kind,
2922  const char *key);
2923 
2924 
2945 MHD_lookup_connection_value_n (struct MHD_Connection *connection,
2946  enum MHD_ValueKind kind,
2947  const char *key,
2948  size_t key_size,
2949  const char **value_ptr,
2950  size_t *value_size_ptr);
2951 
2952 
2965 MHD_queue_response (struct MHD_Connection *connection,
2966  unsigned int status_code,
2967  struct MHD_Response *response);
2968 
2969 
2995 _MHD_EXTERN void
2996 MHD_suspend_connection (struct MHD_Connection *connection);
2997 
2998 
3013 _MHD_EXTERN void
3014 MHD_resume_connection (struct MHD_Connection *connection);
3015 
3016 
3017 /* **************** Response manipulation functions ***************** */
3018 
3019 
3024 {
3029 
3040 
3047 
3053 
3054 
3055 };
3056 
3057 
3062 {
3066  MHD_RO_END = 0
3067 };
3068 
3069 
3079 MHD_set_response_options (struct MHD_Response *response,
3080  enum MHD_ResponseFlags flags,
3081  ...);
3082 
3083 
3100 _MHD_EXTERN struct MHD_Response *
3101 MHD_create_response_from_callback (uint64_t size,
3102  size_t block_size,
3105 
3106 
3122  "MHD_create_response_from_data() is deprecated, use MHD_create_response_from_buffer()") \
3123  _MHD_EXTERN struct MHD_Response *
3124 MHD_create_response_from_data (size_t size,
3125  void *data,
3128 
3129 
3136 {
3137 
3145 
3153 
3162 
3163 };
3164 
3165 
3176 _MHD_EXTERN struct MHD_Response *
3177 MHD_create_response_from_buffer (size_t size,
3178  void *buffer,
3179  enum MHD_ResponseMemoryMode mode);
3180 
3181 
3193 _MHD_EXTERN struct MHD_Response *
3195  void *buffer,
3197  crfc);
3198 
3199 
3211 _MHD_EXTERN struct MHD_Response *
3212 MHD_create_response_from_fd (size_t size,
3213  int fd);
3214 
3215 
3227 _MHD_EXTERN struct MHD_Response *
3229 
3230 
3244 _MHD_EXTERN struct MHD_Response *
3245 MHD_create_response_from_fd64 (uint64_t size,
3246  int fd);
3247 
3248 
3266  "Function MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
3267  _MHD_EXTERN struct MHD_Response *
3269  int fd,
3270  off_t offset);
3271 
3272 #if ! defined(_MHD_NO_DEPR_IN_MACRO) || defined(_MHD_NO_DEPR_FUNC)
3273 /* Substitute MHD_create_response_from_fd_at_offset64() instead of MHD_create_response_from_fd_at_offset()
3274  to minimize potential problems with different off_t sizes */
3275 #define MHD_create_response_from_fd_at_offset(size,fd,offset) \
3276  _MHD_DEPR_IN_MACRO ( \
3277  "Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
3278  MHD_create_response_from_fd_at_offset64 ((size),(fd),(offset))
3279 #endif /* !_MHD_NO_DEPR_IN_MACRO || _MHD_NO_DEPR_FUNC */
3280 
3281 
3298 _MHD_EXTERN struct MHD_Response *
3300  int fd,
3301  uint64_t offset);
3302 
3303 
3319 _MHD_EXTERN struct MHD_Response *
3320 MHD_create_response_from_iovec (const struct MHD_IoVec *iov,
3321  unsigned int iovcnt,
3323  void *cls);
3324 
3325 
3333 {
3334 
3341 
3346 
3351 
3352 };
3353 
3354 
3360 struct MHD_UpgradeResponseHandle;
3361 
3362 
3376 MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh,
3377  enum MHD_UpgradeAction action,
3378  ...);
3379 
3380 
3428 typedef void
3429 (*MHD_UpgradeHandler)(void *cls,
3430  struct MHD_Connection *connection,
3431  void *con_cls,
3432  const char *extra_in,
3433  size_t extra_in_size,
3434  MHD_socket sock,
3435  struct MHD_UpgradeResponseHandle *urh);
3436 
3437 
3467 _MHD_EXTERN struct MHD_Response *
3469  void *upgrade_handler_cls);
3470 
3471 
3481 _MHD_EXTERN void
3482 MHD_destroy_response (struct MHD_Response *response);
3483 
3484 
3496 MHD_add_response_header (struct MHD_Response *response,
3497  const char *header,
3498  const char *content);
3499 
3500 
3511 MHD_add_response_footer (struct MHD_Response *response,
3512  const char *footer,
3513  const char *content);
3514 
3515 
3526 MHD_del_response_header (struct MHD_Response *response,
3527  const char *header,
3528  const char *content);
3529 
3530 
3541 _MHD_EXTERN int
3542 MHD_get_response_headers (struct MHD_Response *response,
3543  MHD_KeyValueIterator iterator,
3544  void *iterator_cls);
3545 
3546 
3555 _MHD_EXTERN const char *
3556 MHD_get_response_header (struct MHD_Response *response,
3557  const char *key);
3558 
3559 
3560 /* ********************** PostProcessor functions ********************** */
3561 
3587 _MHD_EXTERN struct MHD_PostProcessor *
3588 MHD_create_post_processor (struct MHD_Connection *connection,
3589  size_t buffer_size,
3590  MHD_PostDataIterator iter, void *iter_cls);
3591 
3592 
3607 MHD_post_process (struct MHD_PostProcessor *pp,
3608  const char *post_data,
3609  size_t post_data_len);
3610 
3611 
3623 MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
3624 
3625 
3626 /* ********************* Digest Authentication functions *************** */
3627 
3628 
3634 #define MHD_INVALID_NONCE -1
3635 
3636 
3645 _MHD_EXTERN char *
3646 MHD_digest_auth_get_username (struct MHD_Connection *connection);
3647 
3648 
3657 _MHD_EXTERN void
3658 MHD_free (void *ptr);
3659 
3660 
3665 {
3666 
3671 
3676 
3681 
3682 };
3683 
3684 
3700 _MHD_EXTERN int
3701 MHD_digest_auth_check2 (struct MHD_Connection *connection,
3702  const char *realm,
3703  const char *username,
3704  const char *password,
3705  unsigned int nonce_timeout,
3706  enum MHD_DigestAuthAlgorithm algo);
3707 
3708 
3727 _MHD_EXTERN int
3728 MHD_digest_auth_check (struct MHD_Connection *connection,
3729  const char *realm,
3730  const char *username,
3731  const char *password,
3732  unsigned int nonce_timeout);
3733 
3734 
3753 _MHD_EXTERN int
3754 MHD_digest_auth_check_digest2 (struct MHD_Connection *connection,
3755  const char *realm,
3756  const char *username,
3757  const uint8_t *digest,
3758  size_t digest_size,
3759  unsigned int nonce_timeout,
3760  enum MHD_DigestAuthAlgorithm algo);
3761 
3762 
3782 _MHD_EXTERN int
3783 MHD_digest_auth_check_digest (struct MHD_Connection *connection,
3784  const char *realm,
3785  const char *username,
3786  const uint8_t digest[MHD_MD5_DIGEST_SIZE],
3787  unsigned int nonce_timeout);
3788 
3789 
3807 MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
3808  const char *realm,
3809  const char *opaque,
3810  struct MHD_Response *response,
3811  int signal_stale,
3812  enum MHD_DigestAuthAlgorithm algo);
3813 
3814 
3833 MHD_queue_auth_fail_response (struct MHD_Connection *connection,
3834  const char *realm,
3835  const char *opaque,
3836  struct MHD_Response *response,
3837  int signal_stale);
3838 
3839 
3849 _MHD_EXTERN char *
3851  char**password);
3852 
3853 
3868  const char *realm,
3869  struct MHD_Response *response);
3870 
3871 /* ********************** generic query functions ********************** */
3872 
3873 
3884 _MHD_EXTERN const union MHD_ConnectionInfo *
3885 MHD_get_connection_info (struct MHD_Connection *connection,
3886  enum MHD_ConnectionInfoType info_type,
3887  ...);
3888 
3889 
3895 {
3896 
3905 
3906 };
3907 
3908 
3919 MHD_set_connection_option (struct MHD_Connection *connection,
3920  enum MHD_CONNECTION_OPTION option,
3921  ...);
3922 
3923 
3928 {
3933  size_t key_size;
3934 
3940 
3945 
3949  uint16_t port;
3950 
3955 
3959  unsigned int num_connections;
3960 
3967  enum MHD_FLAG flags;
3968 };
3969 
3970 
3982 _MHD_EXTERN const union MHD_DaemonInfo *
3983 MHD_get_daemon_info (struct MHD_Daemon *daemon,
3984  enum MHD_DaemonInfoType info_type,
3985  ...);
3986 
3987 
3994 _MHD_EXTERN const char*
3995 MHD_get_version (void);
3996 
3997 
4003 {
4009 
4019 
4025 
4031 
4039 
4045 
4052 
4059 
4065 
4072 
4079 
4087 
4095 
4102 
4112 
4118 
4125 
4138 
4144 
4151 
4158 
4163 
4169 };
4170 
4171 
4184 MHD_is_feature_supported (enum MHD_FEATURE feature);
4185 
4186 
4187 #if 0 /* keep Emacsens' auto-indent happy */
4188 {
4189 #endif
4190 #ifdef __cplusplus
4191 }
4192 #endif
4193 
4194 #endif
MHD_socket
int MHD_socket
Definition: microhttpd.h:193
MHD_USE_DEBUG
@ MHD_USE_DEBUG
Definition: microhttpd.h:1067
MHD_OptionItem::value
intptr_t value
Definition: microhttpd.h:1784
MHD_USE_NO_LISTEN_SOCKET
@ MHD_USE_NO_LISTEN_SOCKET
Definition: microhttpd.h:1184
MHD_get_daemon_info
_MHD_EXTERN const union MHD_DaemonInfo * MHD_get_daemon_info(struct MHD_Daemon *daemon, enum MHD_DaemonInfoType info_type,...)
Definition: daemon.c:7690
MHD_create_post_processor
_MHD_EXTERN struct MHD_PostProcessor * MHD_create_post_processor(struct MHD_Connection *connection, size_t buffer_size, MHD_PostDataIterator iter, void *iter_cls)
Definition: postprocessor.c:255
MHD_DAEMON_INFO_MAC_KEY_SIZE
@ MHD_DAEMON_INFO_MAC_KEY_SIZE
Definition: microhttpd.h:2113
MHD_ResponseMemoryMode
MHD_ResponseMemoryMode
Definition: microhttpd.h:3136
MHD_OPTION_CONNECTION_LIMIT
@ MHD_OPTION_CONNECTION_LIMIT
Definition: microhttpd.h:1400
MHD_OPTION_LISTEN_BACKLOG_SIZE
@ MHD_OPTION_LISTEN_BACKLOG_SIZE
Definition: microhttpd.h:1684
MHD_AccessHandlerCallback
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:2227
MHD_destroy_post_processor
_MHD_EXTERN enum MHD_Result MHD_destroy_post_processor(struct MHD_PostProcessor *pp)
Definition: postprocessor.c:1415
MHD_get_response_headers
_MHD_EXTERN int MHD_get_response_headers(struct MHD_Response *response, MHD_KeyValueIterator iterator, void *iterator_cls)
Definition: response.c:253
MHD_CONNECTION_INFO_PROTOCOL
@ MHD_CONNECTION_INFO_PROTOCOL
Definition: microhttpd.h:2030
MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN
@ MHD_REQUEST_TERMINATED_DAEMON_SHUTDOWN
Definition: microhttpd.h:1880
MHD_THREAD_NAMES
@ MHD_THREAD_NAMES
Definition: microhttpd.h:4117
MHD_USE_ERROR_LOG
@ MHD_USE_ERROR_LOG
Definition: microhttpd.h:1061
MHD_start_daemon
_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:5330
MHD_FEATURE_LARGE_FILE
@ MHD_FEATURE_LARGE_FILE
Definition: microhttpd.h:4111
MHD_OPTION_HTTPS_MEM_DHPARAMS
@ MHD_OPTION_HTTPS_MEM_DHPARAMS
Definition: microhttpd.h:1647
MHD_DaemonInfo::key_size
size_t key_size
Definition: microhttpd.h:3933
data
void * data
Definition: microhttpd.h:3125
MHD_ResponseOptions
MHD_ResponseOptions
Definition: microhttpd.h:3062
MHD_create_response_from_callback
_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:376
MHD_ContentReaderFreeCallback
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2392
MHD_DaemonInfo::flags
enum MHD_FLAG flags
Definition: microhttpd.h:3967
MHD_RF_HTTP_VERSION_1_0_ONLY
@ MHD_RF_HTTP_VERSION_1_0_ONLY
Definition: microhttpd.h:3039
MHD_Daemon::apc
MHD_AcceptPolicyCallback apc
Definition: internal.h:1552
MHD_USE_TURBO
@ MHD_USE_TURBO
Definition: microhttpd.h:1264
MHD_OPTION_END
@ MHD_OPTION_END
Definition: microhttpd.h:1385
MHD_CONNECTION_INFO_GNUTLS_SESSION
@ MHD_CONNECTION_INFO_GNUTLS_SESSION
Definition: microhttpd.h:2045
MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY
@ MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY
Definition: microhttpd.h:1216
MHD_UPGRADE_ACTION_CLOSE
@ MHD_UPGRADE_ACTION_CLOSE
Definition: microhttpd.h:3340
MHD_CONNECTION_OPTION_TIMEOUT
@ MHD_CONNECTION_OPTION_TIMEOUT
Definition: microhttpd.h:3904
MHD_Response::crfc
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:1606
MHD_PostDataIterator
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:2415
MHD_FEATURE_MESSAGES
@ MHD_FEATURE_MESSAGES
Definition: microhttpd.h:4008
MHD_Daemon::port
uint16_t port
Definition: internal.h:1611
MHD_REQUEST_TERMINATED_READ_ERROR
@ MHD_REQUEST_TERMINATED_READ_ERROR
Definition: microhttpd.h:1890
MHD_OPTION_HTTPS_KEY_PASSWORD
@ MHD_OPTION_HTTPS_KEY_PASSWORD
Definition: microhttpd.h:1665
MHD_UNSIGNED_LONG_LONG
#define MHD_UNSIGNED_LONG_LONG
Definition: microhttpd.h:296
MHD_YES
@ MHD_YES
Definition: microhttpd.h:148
MHD_ConnectionInfo::socket_context
void * socket_context
Definition: microhttpd.h:1989
MHD_ConnectionInfoType
MHD_ConnectionInfoType
Definition: microhttpd.h:2017
MHD_USE_IPv6
@ MHD_USE_IPv6
Definition: microhttpd.h:1116
MHD_DSC_SANE
@ MHD_DSC_SANE
Definition: microhttpd.h:1763
MHD_CONNECTION_INFO_CONNECTION_TIMEOUT
@ MHD_CONNECTION_INFO_CONNECTION_TIMEOUT
Definition: microhttpd.h:2089
MHD_OPTION_DIGEST_AUTH_RANDOM
@ MHD_OPTION_DIGEST_AUTH_RANDOM
Definition: microhttpd.h:1589
MHD_USE_SUSPEND_RESUME
@ MHD_USE_SUSPEND_RESUME
Definition: microhttpd.h:1282
MHD_DaemonInfo::num_connections
unsigned int num_connections
Definition: microhttpd.h:3959
MHD_FEATURE_UPGRADE
@ MHD_FEATURE_UPGRADE
Definition: microhttpd.h:4124
MHD_OPTION_PER_IP_CONNECTION_LIMIT
@ MHD_OPTION_PER_IP_CONNECTION_LIMIT
Definition: microhttpd.h:1433
MHD_FEATURE_SSL
@ MHD_FEATURE_SSL
Definition: microhttpd.h:4018
MHD_get_reason_phrase_for
_MHD_EXTERN const char * MHD_get_reason_phrase_for(unsigned int code)
Definition: reason_phrase.c:177
MHD_OPTION_NOTIFY_COMPLETED
@ MHD_OPTION_NOTIFY_COMPLETED
Definition: microhttpd.h:1421
MHD_DigestAuthAlgorithm
MHD_DigestAuthAlgorithm
Definition: microhttpd.h:3665
MHD_OPTION_SERVER_INSANITY
@ MHD_OPTION_SERVER_INSANITY
Definition: microhttpd.h:1730
MHD_get_fdset2
_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:1127
MHD_ConnectionInfo::client_cert
void * client_cert
Definition: microhttpd.h:1972
MHD_FLAG
MHD_FLAG
Flags for the struct MHD_Daemon.
Definition: microhttpd.h:1050
MHD_DAEMON_INFO_CURRENT_CONNECTIONS
@ MHD_DAEMON_INFO_CURRENT_CONNECTIONS
Definition: microhttpd.h:2137
MHD_NO
@ MHD_NO
Definition: microhttpd.h:143
MHD_REQUEST_TERMINATED_COMPLETED_OK
@ MHD_REQUEST_TERMINATED_COMPLETED_OK
Definition: microhttpd.h:1857
MHD_RF_NONE
@ MHD_RF_NONE
Definition: microhttpd.h:3028
MHD_create_response_from_fd64
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd64(uint64_t size, int fd)
Definition: response.c:726
MHD_FEATURE_HTTPS_CERT_CALLBACK
@ MHD_FEATURE_HTTPS_CERT_CALLBACK
Definition: microhttpd.h:4024
MHD_KeyValueIterator
enum MHD_Result(* MHD_KeyValueIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
Definition: microhttpd.h:2298
MHD_get_connection_values
_MHD_EXTERN int MHD_get_connection_values(struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIterator iterator, void *iterator_cls)
Definition: connection.c:246
MHD_OPTION_NONCE_NC_SIZE
@ MHD_OPTION_NONCE_NC_SIZE
Definition: microhttpd.h:1596
MHD_digest_auth_check
_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_set_panic_func
_MHD_EXTERN void MHD_set_panic_func(MHD_PanicCallback cb, void *cls)
Definition: panic.c:56
MHD_create_response_from_iovec
_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:864
MHD_ConnectionInfo::daemon
struct MHD_Daemon * daemon
Definition: microhttpd.h:1983
MHD_Response::crc
MHD_ContentReaderCallback crc
Definition: internal.h:1600
MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE
@ MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE
Definition: microhttpd.h:1640
MHD_set_connection_value_n
_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:399
MHD_IoVec::iov_base
const void * iov_base
Definition: microhttpd.h:2002
MHD_OPTION_LISTENING_ADDRESS_REUSE
@ MHD_OPTION_LISTENING_ADDRESS_REUSE
Definition: microhttpd.h:1656
MHD_OPTION_SIGPIPE_HANDLED_BY_APP
@ MHD_OPTION_SIGPIPE_HANDLED_BY_APP
Definition: microhttpd.h:1741
MHD_FEATURE_POSTPROCESSOR
@ MHD_FEATURE_POSTPROCESSOR
Definition: microhttpd.h:4094
MHD_DisableSanityCheck
MHD_DisableSanityCheck
Definition: microhttpd.h:1759
MHD_RequestCompletedCallback
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
Definition: microhttpd.h:2250
MHD_quiesce_daemon
_MHD_EXTERN MHD_socket MHD_quiesce_daemon(struct MHD_Daemon *daemon)
Definition: daemon.c:5375
MHD_OptionItem::option
enum MHD_OPTION option
Definition: microhttpd.h:1777
MHD_set_connection_option
_MHD_EXTERN enum MHD_Result MHD_set_connection_option(struct MHD_Connection *connection, enum MHD_CONNECTION_OPTION option,...)
Definition: connection.c:3969
MHD_KeyValueIteratorN
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:2323
MHD_ConnectionInfo::header_size
size_t header_size
Definition: microhttpd.h:1962
MHD_digest_auth_check_digest
_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:1318
MHD_USE_SSL
@ MHD_USE_SSL
Definition: microhttpd.h:1075
MHD_USE_INSECURE_TLS_EARLY_DATA
@ MHD_USE_INSECURE_TLS_EARLY_DATA
Definition: microhttpd.h:1335
MHD_ConnectionInfo::connection_timeout
unsigned int connection_timeout
Definition: microhttpd.h:1952
MHD_OptionItem
Definition: microhttpd.h:1772
MHD_FEATURE_AUTODETECT_BIND_PORT
@ MHD_FEATURE_AUTODETECT_BIND_PORT
Definition: microhttpd.h:4143
MHD_OptionItem::ptr_value
void * ptr_value
Definition: microhttpd.h:1790
MHD_post_process
_MHD_EXTERN enum MHD_Result MHD_post_process(struct MHD_PostProcessor *pp, const char *post_data, size_t post_data_len)
Definition: postprocessor.c:1387
MHD_suspend_connection
_MHD_EXTERN void MHD_suspend_connection(struct MHD_Connection *connection)
Definition: daemon.c:3136
MHD_RF_INSANITY_HEADER_CONTENT_LENGTH
@ MHD_RF_INSANITY_HEADER_CONTENT_LENGTH
Definition: microhttpd.h:3052
MHD_FEATURE
MHD_FEATURE
Definition: microhttpd.h:4003
MHD_FEATURE_TCP_FASTOPEN
@ MHD_FEATURE_TCP_FASTOPEN
Definition: microhttpd.h:4071
must_copy
void int int must_copy
Definition: microhttpd.h:3127
MHD_USE_AUTO_INTERNAL_THREAD
@ MHD_USE_AUTO_INTERNAL_THREAD
Definition: microhttpd.h:1323
MHD_OPTION_HTTPS_PRIORITIES
@ MHD_OPTION_HTTPS_PRIORITIES
Definition: microhttpd.h:1502
MHD_OPTION_THREAD_POOL_SIZE
@ MHD_OPTION_THREAD_POOL_SIZE
Definition: microhttpd.h:1535
MHD_MD5_DIGEST_SIZE
#define MHD_MD5_DIGEST_SIZE
Definition: microhttpd.h:320
MHD_FEATURE_RESPONSES_SHARED_FD
@ MHD_FEATURE_RESPONSES_SHARED_FD
Definition: microhttpd.h:4137
MHD_OPTION_GNUTLS_PSK_CRED_HANDLER
@ MHD_OPTION_GNUTLS_PSK_CRED_HANDLER
Definition: microhttpd.h:1708
MHD_RF_HTTP_VERSION_1_0_RESPONSE
@ MHD_RF_HTTP_VERSION_1_0_RESPONSE
Definition: microhttpd.h:3046
MHD_add_connection
_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:3370
MHD_CONNECTION_OPTION
MHD_CONNECTION_OPTION
Definition: microhttpd.h:3895
MHD_IoVec::iov_len
size_t iov_len
Definition: microhttpd.h:2007
MHD_AcceptPolicyCallback
enum MHD_Result(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:2182
MHD_CONNECTION_INFO_CIPHER_ALGO
@ MHD_CONNECTION_INFO_CIPHER_ALGO
Definition: microhttpd.h:2023
MHD_add_response_header
_MHD_EXTERN enum MHD_Result MHD_add_response_header(struct MHD_Response *response, const char *header, const char *content)
Definition: response.c:134
MHD_REQUEST_TERMINATED_CLIENT_ABORT
@ MHD_REQUEST_TERMINATED_CLIENT_ABORT
Definition: microhttpd.h:1898
must_free
void int must_free
Definition: microhttpd.h:3126
MHD_DAEMON_INFO_FLAGS
@ MHD_DAEMON_INFO_FLAGS
Definition: microhttpd.h:2145
MHD_Daemon::apc_cls
void * apc_cls
Definition: internal.h:1557
MHD_USE_EPOLL_TURBO
@ MHD_USE_EPOLL_TURBO
Definition: microhttpd.h:1267
MHD_digest_auth_get_username
_MHD_EXTERN char * MHD_digest_auth_get_username(struct MHD_Connection *connection)
Definition: digestauth.c:632
MHD_get_connection_info
_MHD_EXTERN const union MHD_ConnectionInfo * MHD_get_connection_info(struct MHD_Connection *connection, enum MHD_ConnectionInfoType info_type,...)
Definition: connection.c:3909
MHD_DaemonInfo::port
uint16_t port
Definition: microhttpd.h:3949
MHD_destroy_response
_MHD_EXTERN void MHD_destroy_response(struct MHD_Response *response)
Definition: response.c:1397
MHD_create_response_from_fd_at_offset
#define MHD_create_response_from_fd_at_offset(size, fd, offset)
Definition: microhttpd.h:3275
fd
int fd
Definition: microhttpd.h:3269
MHD_get_version
_MHD_EXTERN const char * MHD_get_version(void)
Definition: version.c:35
MHD_digest_auth_check_digest2
_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:1277
MHD_USE_AUTO
@ MHD_USE_AUTO
Definition: microhttpd.h:1315
MHD_get_connection_values_n
_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:285
MHD_digest_auth_check2
_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:1239
MHD_ContentReaderCallback
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2376
MHD_upgrade_action
_MHD_EXTERN enum MHD_Result MHD_upgrade_action(struct MHD_UpgradeResponseHandle *urh, enum MHD_UpgradeAction action,...)
MHD_OPTION_CONNECTION_MEMORY_INCREMENT
@ MHD_OPTION_CONNECTION_MEMORY_INCREMENT
Definition: microhttpd.h:1615
MHD_OPTION_HTTPS_CERT_CALLBACK2
@ MHD_OPTION_HTTPS_CERT_CALLBACK2
Definition: microhttpd.h:1719
MHD_ConnectionInfo::protocol
int protocol
Definition: microhttpd.h:1940
MHD_NotifyConnectionCallback
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:2276
MHD_FEATURE_AUTOSUPPRESS_SIGPIPE
@ MHD_FEATURE_AUTOSUPPRESS_SIGPIPE
Definition: microhttpd.h:4150
MHD_basic_auth_get_username_password
_MHD_EXTERN char * MHD_basic_auth_get_username_password(struct MHD_Connection *connection, char **password)
Definition: basicauth.c:47
MHD_OPTION_HTTPS_MEM_KEY
@ MHD_OPTION_HTTPS_MEM_KEY
Definition: microhttpd.h:1481
MHD_FEATURE_IPv6_ONLY
@ MHD_FEATURE_IPv6_ONLY
Definition: microhttpd.h:4038
MHD_DIGEST_ALG_AUTO
@ MHD_DIGEST_ALG_AUTO
Definition: microhttpd.h:3670
MHD_OPTION_LISTEN_SOCKET
@ MHD_OPTION_LISTEN_SOCKET
Definition: microhttpd.h:1510
MHD_create_response_from_data
struct MHD_Response * MHD_create_response_from_data(size_t size, void *data, int must_free, int must_copy)
Definition: response.c:750
MHD_create_response_from_fd_at_offset64
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd_at_offset64(uint64_t size, int fd, uint64_t offset)
Definition: response.c:631
MHD_OPTION_EXTERNAL_LOGGER
@ MHD_OPTION_EXTERNAL_LOGGER
Definition: microhttpd.h:1525
MHD_OPTION_UNESCAPE_CALLBACK
@ MHD_OPTION_UNESCAPE_CALLBACK
Definition: microhttpd.h:1578
MHD_get_fdset
#define MHD_get_fdset(daemon, read_fd_set, write_fd_set, except_fd_set, max_fd)
Definition: microhttpd.h:2653
MHD_DAEMON_INFO_LISTEN_FD
@ MHD_DAEMON_INFO_LISTEN_FD
Definition: microhttpd.h:2119
MHD_lookup_connection_value
_MHD_EXTERN const char * MHD_lookup_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key)
Definition: connection.c:475
MHD_USE_PIPE_FOR_SHUTDOWN
@ MHD_USE_PIPE_FOR_SHUTDOWN
Definition: microhttpd.h:1245
MHD_ConnectionInfo::suspended
int suspended
Definition: microhttpd.h:1945
MHD_USE_TLS
@ MHD_USE_TLS
Definition: microhttpd.h:1072
MHD_USE_EPOLL_INTERNAL_THREAD
@ MHD_USE_EPOLL_INTERNAL_THREAD
Definition: microhttpd.h:1210
MHD_CONNECTION_INFO_CONNECTION_SUSPENDED
@ MHD_CONNECTION_INFO_CONNECTION_SUSPENDED
Definition: microhttpd.h:2083
MHD_FEATURE_SENDFILE
@ MHD_FEATURE_SENDFILE
Definition: microhttpd.h:4157
MHD_PanicCallback
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:2168
MHD_USE_SUPPRESS_DATE_NO_CLOCK
@ MHD_USE_SUPPRESS_DATE_NO_CLOCK
Definition: microhttpd.h:1166
MHD_OPTION
MHD_OPTION
MHD options.
Definition: microhttpd.h:1379
MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET
@ MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET
Definition: microhttpd.h:4058
MHD_USE_EPOLL
@ MHD_USE_EPOLL
Definition: microhttpd.h:1193
MHD_DAEMON_INFO_KEY_SIZE
@ MHD_DAEMON_INFO_KEY_SIZE
Definition: microhttpd.h:2108
MHD_USE_ITC
@ MHD_USE_ITC
Definition: microhttpd.h:1242
MHD_USE_INTERNAL_POLLING_THREAD
@ MHD_USE_INTERNAL_POLLING_THREAD
Definition: microhttpd.h:1098
MHD_ALLOW_UPGRADE
@ MHD_ALLOW_UPGRADE
Definition: microhttpd.h:1302
MHD_FEATURE_TLS
@ MHD_FEATURE_TLS
Definition: microhttpd.h:4017
MHD_DaemonInfo::epoll_fd
int epoll_fd
Definition: microhttpd.h:3954
MHD_FEATURE_IPv6
@ MHD_FEATURE_IPv6
Definition: microhttpd.h:4030
MHD_lookup_connection_value_n
_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:512
MHD_stop_daemon
_MHD_EXTERN void MHD_stop_daemon(struct MHD_Daemon *daemon)
Definition: daemon.c:7508
MHD_CONNECTION_NOTIFY_STARTED
@ MHD_CONNECTION_NOTIFY_STARTED
Definition: microhttpd.h:1915
MHD_Connection::version
char * version
Definition: internal.h:840
MHD_USE_SELECT_INTERNALLY
@ MHD_USE_SELECT_INTERNALLY
Definition: microhttpd.h:1101
MHD_OPTION_CONNECTION_MEMORY_LIMIT
@ MHD_OPTION_CONNECTION_MEMORY_LIMIT
Definition: microhttpd.h:1394
MHD_Daemon
Definition: internal.h:1001
MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY
@ MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY
Definition: microhttpd.h:2127
MHD_COOKIE_KIND
@ MHD_COOKIE_KIND
Definition: microhttpd.h:1821
MHD_free
_MHD_EXTERN void MHD_free(void *ptr)
Definition: memorypool.c:89
_MHD_EXTERN
#define _MHD_EXTERN
Definition: microhttpd.h:183
MHD_DaemonInfoType
MHD_DaemonInfoType
Definition: microhttpd.h:2104
MHD_queue_response
_MHD_EXTERN enum MHD_Result MHD_queue_response(struct MHD_Connection *connection, unsigned int status_code, struct MHD_Response *response)
Definition: connection.c:4035
MHD_ConnectionInfo::cipher_algorithm
int cipher_algorithm
Definition: microhttpd.h:1935
MHD_queue_basic_auth_fail_response
_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_create_response_for_upgrade
_MHD_EXTERN struct MHD_Response * MHD_create_response_for_upgrade(MHD_UpgradeHandler upgrade_handler, void *upgrade_handler_cls)
MHD_USE_DUAL_STACK
@ MHD_USE_DUAL_STACK
Definition: microhttpd.h:1256
MHD_run
_MHD_EXTERN enum MHD_Result MHD_run(struct MHD_Daemon *daemon)
Definition: daemon.c:5096
MHD_CONNECTION_INFO_CONNECTION_FD
@ MHD_CONNECTION_INFO_CONNECTION_FD
Definition: microhttpd.h:2067
MHD_create_response_from_pipe
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_pipe(int fd)
Definition: response.c:675
MHD_UPGRADE_ACTION_CORK_OFF
@ MHD_UPGRADE_ACTION_CORK_OFF
Definition: microhttpd.h:3350
MHD_UpgradeHandler
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:3429
_MHD_DEPR_MACRO
#define _MHD_DEPR_MACRO(msg)
Definition: microhttpd.h:252
MHD_IoVec
Definition: microhttpd.h:1998
MHD_set_connection_value
_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:446
MHD_RESPMEM_PERSISTENT
@ MHD_RESPMEM_PERSISTENT
Definition: microhttpd.h:3144
MHD_USE_POLL_INTERNALLY
@ MHD_USE_POLL_INTERNALLY
Definition: microhttpd.h:1152
MHD_FEATURE_BASIC_AUTH
@ MHD_FEATURE_BASIC_AUTH
Definition: microhttpd.h:4078
MHD_RESPMEM_MUST_COPY
@ MHD_RESPMEM_MUST_COPY
Definition: microhttpd.h:3161
MHD_USE_PEDANTIC_CHECKS
@ MHD_USE_PEDANTIC_CHECKS
Definition: microhttpd.h:1127
MHD_USE_EPOLL_INTERNALLY
@ MHD_USE_EPOLL_INTERNALLY
Definition: microhttpd.h:1214
MHD_ALLOW_SUSPEND_RESUME
@ MHD_ALLOW_SUSPEND_RESUME
Definition: microhttpd.h:1279
MHD_create_response_from_fd
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd(size_t size, int fd)
Definition: response.c:703
MHD_NO_FLAG
@ MHD_NO_FLAG
Definition: microhttpd.h:1054
MHD_USE_EPOLL_LINUX_ONLY
@ MHD_USE_EPOLL_LINUX_ONLY
Definition: microhttpd.h:1196
MHD_OPTION_SOCK_ADDR
@ MHD_OPTION_SOCK_ADDR
Definition: microhttpd.h:1441
MHD_POSTDATA_KIND
@ MHD_POSTDATA_KIND
Definition: microhttpd.h:1831
MHD_FOOTER_KIND
@ MHD_FOOTER_KIND
Definition: microhttpd.h:1841
MHD_http_unescape
_MHD_EXTERN size_t MHD_http_unescape(char *val)
Definition: internal.c:142
MHD_USE_POLL
@ MHD_USE_POLL
Definition: microhttpd.h:1143
MHD_ConnectionNotificationCode
MHD_ConnectionNotificationCode
Definition: microhttpd.h:1909
MHD_USE_POLL_INTERNAL_THREAD
@ MHD_USE_POLL_INTERNAL_THREAD
Definition: microhttpd.h:1149
MHD_FEATURE_HTTPS_KEY_PASSWORD
@ MHD_FEATURE_HTTPS_KEY_PASSWORD
Definition: microhttpd.h:4101
MHD_create_response_from_buffer
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer(size_t size, void *buffer, enum MHD_ResponseMemoryMode mode)
Definition: response.c:810
MHD_FEATURE_EPOLL
@ MHD_FEATURE_EPOLL
Definition: microhttpd.h:4051
MHD_resume_connection
_MHD_EXTERN void MHD_resume_connection(struct MHD_Connection *connection)
Definition: daemon.c:3173
MHD_DIGEST_ALG_MD5
@ MHD_DIGEST_ALG_MD5
Definition: microhttpd.h:3675
MHD_ConnectionInfo::client_addr
struct sockaddr * client_addr
Definition: microhttpd.h:1977
MHD_queue_auth_fail_response2
_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:1350
MHD_DaemonInfo
Definition: microhttpd.h:3928
MHD_OPTION_HTTPS_CRED_TYPE
@ MHD_OPTION_HTTPS_CRED_TYPE
Definition: microhttpd.h:1496
MHD_DaemonInfo::listen_fd
MHD_socket listen_fd
Definition: microhttpd.h:3944
MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT
@ MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT
Definition: microhttpd.h:2053
MHD_LogCallback
void(* MHD_LogCallback)(void *cls, const char *fm, va_list ap)
Definition: microhttpd.h:1349
MHD_OPTION_ARRAY
@ MHD_OPTION_ARRAY
Definition: microhttpd.h:1556
MHD_CONNECTION_INFO_CLIENT_ADDRESS
@ MHD_CONNECTION_INFO_CLIENT_ADDRESS
Definition: microhttpd.h:2039
MHD_RequestTerminationCode
MHD_RequestTerminationCode
Definition: microhttpd.h:1851
MHD_DAEMON_INFO_EPOLL_FD
@ MHD_DAEMON_INFO_EPOLL_FD
Definition: microhttpd.h:2128
MHD_DAEMON_INFO_BIND_PORT
@ MHD_DAEMON_INFO_BIND_PORT
Definition: microhttpd.h:2153
MHD_queue_auth_fail_response
_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:1473
MHD_OPTION_HTTPS_MEM_TRUST
@ MHD_OPTION_HTTPS_MEM_TRUST
Definition: microhttpd.h:1609
MHD_FEATURE_SOCKETPAIR
@ MHD_FEATURE_SOCKETPAIR
Definition: microhttpd.h:4064
MHD_ResponseFlags
MHD_ResponseFlags
Definition: microhttpd.h:3024
MHD_ValueKind
MHD_ValueKind
Definition: microhttpd.h:1800
MHD_RO_END
@ MHD_RO_END
Definition: microhttpd.h:3066
MHD_REQUEST_TERMINATED_WITH_ERROR
@ MHD_REQUEST_TERMINATED_WITH_ERROR
Definition: microhttpd.h:1865
MHD_FEATURE_THREAD_NAMES
@ MHD_FEATURE_THREAD_NAMES
Definition: microhttpd.h:4116
MHD_run_from_select
_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:4024
MHD_HEADER_KIND
@ MHD_HEADER_KIND
Definition: microhttpd.h:1815
MHD_create_response_from_buffer_with_free_callback
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer_with_free_callback(size_t size, void *buffer, MHD_ContentReaderFreeCallback crfc)
Definition: response.c:832
MHD_start_daemon_va
_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:6262
MHD_SUPPRESS_DATE_NO_CLOCK
@ MHD_SUPPRESS_DATE_NO_CLOCK
Definition: microhttpd.h:1169
MHD_FEATURE_HTTPS_CERT_CALLBACK2
@ MHD_FEATURE_HTTPS_CERT_CALLBACK2
Definition: microhttpd.h:4168
MHD_CONNECTION_INFO_REQUEST_HEADER_SIZE
@ MHD_CONNECTION_INFO_REQUEST_HEADER_SIZE
Definition: microhttpd.h:2095
MHD_USE_THREAD_PER_CONNECTION
@ MHD_USE_THREAD_PER_CONNECTION
Definition: microhttpd.h:1087
MHD_Response
Definition: internal.h:1568
MHD_UPGRADE_ACTION_CORK_ON
@ MHD_UPGRADE_ACTION_CORK_ON
Definition: microhttpd.h:3345
MHD_USE_POST_HANDSHAKE_AUTH_SUPPORT
@ MHD_USE_POST_HANDSHAKE_AUTH_SUPPORT
Definition: microhttpd.h:1329
MHD_FEATURE_DIGEST_AUTH
@ MHD_FEATURE_DIGEST_AUTH
Definition: microhttpd.h:4086
MHD_OPTION_STRICT_FOR_CLIENT
@ MHD_OPTION_STRICT_FOR_CLIENT
Definition: microhttpd.h:1700
MHD_Response::crc_cls
void * crc_cls
Definition: internal.h:1594
MHD_RESPMEM_MUST_FREE
@ MHD_RESPMEM_MUST_FREE
Definition: microhttpd.h:3152
MHD_OPTION_URI_LOG_CALLBACK
@ MHD_OPTION_URI_LOG_CALLBACK
Definition: microhttpd.h:1473
MHD_Connection
Definition: internal.h:634
MHD_REQUEST_TERMINATED_TIMEOUT_REACHED
@ MHD_REQUEST_TERMINATED_TIMEOUT_REACHED
Definition: microhttpd.h:1873
MHD_RESPONSE_HEADER_KIND
#define MHD_RESPONSE_HEADER_KIND
Definition: microhttpd.h:1807
MHD_Result
MHD_Result
Definition: microhttpd.h:139
MHD_OPTION_THREAD_STACK_SIZE
@ MHD_OPTION_THREAD_STACK_SIZE
Definition: microhttpd.h:1602
MHD_Connection::url
const char * url
Definition: internal.h:834
MHD_DaemonInfo::mac_key_size
size_t mac_key_size
Definition: microhttpd.h:3939
MHD_get_response_header
_MHD_EXTERN const char * MHD_get_response_header(struct MHD_Response *response, const char *key)
Definition: response.c:285
MHD_DIGEST_ALG_SHA256
@ MHD_DIGEST_ALG_SHA256
Definition: microhttpd.h:3680
offset
int off_t offset
Definition: microhttpd.h:3270
_MHD_DEPR_FUNC
#define _MHD_DEPR_FUNC(msg)
Definition: microhttpd.h:283
MHD_OPTION_HTTPS_MEM_CERT
@ MHD_OPTION_HTTPS_MEM_CERT
Definition: microhttpd.h:1489
MHD_FEATURE_POLL
@ MHD_FEATURE_POLL
Definition: microhttpd.h:4044
MHD_PskServerCredentialsCallback
int(* MHD_PskServerCredentialsCallback)(void *cls, const struct MHD_Connection *connection, const char *username, void **psk, size_t *psk_size)
Definition: microhttpd.h:1367
MHD_Connection::method
char * method
Definition: internal.h:828
MHD_ConnectionInfo::tls_session
void * tls_session
Definition: microhttpd.h:1967
MHD_del_response_header
_MHD_EXTERN enum MHD_Result MHD_del_response_header(struct MHD_Response *response, const char *header, const char *content)
Definition: response.c:199
MHD_OPTION_CONNECTION_TIMEOUT
@ MHD_OPTION_CONNECTION_TIMEOUT
Definition: microhttpd.h:1407
MHD_CONNECTION_INFO_DAEMON
@ MHD_CONNECTION_INFO_DAEMON
Definition: microhttpd.h:2059
MHD_Connection::socket_context
void * socket_context
Definition: internal.h:694
MHD_ConnectionInfo
Definition: microhttpd.h:1930
MHD_USE_TCP_FASTOPEN
@ MHD_USE_TCP_FASTOPEN
Definition: microhttpd.h:1295
MHD_run_wait
_MHD_EXTERN enum MHD_Result MHD_run_wait(struct MHD_Daemon *daemon, int32_t millisec)
Definition: daemon.c:5136
MHD_get_timeout
_MHD_EXTERN enum MHD_Result MHD_get_timeout(struct MHD_Daemon *daemon, MHD_UNSIGNED_LONG_LONG *timeout)
Definition: daemon.c:3794
MHD_OPTION_HTTPS_CERT_CALLBACK
@ MHD_OPTION_HTTPS_CERT_CALLBACK
Definition: microhttpd.h:1631
MHD_UpgradeAction
MHD_UpgradeAction
Definition: microhttpd.h:3333
MHD_OPTION_NOTIFY_CONNECTION
@ MHD_OPTION_NOTIFY_CONNECTION
Definition: microhttpd.h:1676
MHD_CONNECTION_NOTIFY_CLOSED
@ MHD_CONNECTION_NOTIFY_CLOSED
Definition: microhttpd.h:1921
MHD_is_feature_supported
_MHD_EXTERN enum MHD_Result MHD_is_feature_supported(enum MHD_FEATURE feature)
Definition: daemon.c:7805
MHD_set_response_options
_MHD_EXTERN enum MHD_Result MHD_set_response_options(struct MHD_Response *response, enum MHD_ResponseFlags flags,...)
Definition: response.c:417
MHD_add_response_footer
_MHD_EXTERN enum MHD_Result MHD_add_response_footer(struct MHD_Response *response, const char *footer, const char *content)
Definition: response.c:178
MHD_ConnectionInfo::connect_fd
MHD_socket connect_fd
Definition: microhttpd.h:1957
MHD_FEATURE_THREADS
@ MHD_FEATURE_THREADS
Definition: microhttpd.h:4162
MHD_OPTION_TLS_NO_ALPN
@ MHD_OPTION_TLS_NO_ALPN
Definition: microhttpd.h:1750
MHD_GET_ARGUMENT_KIND
@ MHD_GET_ARGUMENT_KIND
Definition: microhttpd.h:1836
MHD_CONNECTION_INFO_SOCKET_CONTEXT
@ MHD_CONNECTION_INFO_SOCKET_CONTEXT
Definition: microhttpd.h:2077