GNU libmicrohttpd  0.9.62
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
microhttpd.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2006-2018 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 /* While we generally would like users to use a configure-driven
91  build process which detects which headers are present and
92  hence works on any platform, we use "standard" includes here
93  to build out-of-the-box for beginning users on common systems.
94 
95  If generic headers don't work on your platform, include headers
96  which define 'va_list', 'size_t', 'ssize_t', 'intptr_t',
97  'uint16_t', 'uint32_t', 'uint64_t', 'off_t', 'struct sockaddr',
98  'socklen_t', 'fd_set' and "#define MHD_PLATFORM_H" before
99  including "microhttpd.h". Then the following "standard"
100  includes won't be used (which might be a good idea, especially
101  on platforms where they do not exist).
102  */
103 #ifndef MHD_PLATFORM_H
104 #include <stdarg.h>
105 #include <stdint.h>
106 #include <sys/types.h>
107 #if defined(_WIN32) && !defined(__CYGWIN__)
108 #include <ws2tcpip.h>
109 #if defined(_MSC_FULL_VER) && !defined (_SSIZE_T_DEFINED)
110 #define _SSIZE_T_DEFINED
111 typedef intptr_t ssize_t;
112 #endif /* !_SSIZE_T_DEFINED */
113 #else
114 #include <unistd.h>
115 #include <sys/time.h>
116 #include <sys/socket.h>
117 #endif
118 #endif
119 
120 #if defined(__CYGWIN__) && !defined(_SYS_TYPES_FD_SET)
121 /* Do not define __USE_W32_SOCKETS under Cygwin! */
122 #error Cygwin with winsock fd_set is not supported
123 #endif
124 
129 #define MHD_VERSION 0x00096200
130 
134 #define MHD_YES 1
135 
139 #define MHD_NO 0
140 
144 #define MHD_INVALID_NONCE -1
145 
150 #ifdef UINT64_MAX
151 #define MHD_SIZE_UNKNOWN UINT64_MAX
152 #else
153 #define MHD_SIZE_UNKNOWN ((uint64_t) -1LL)
154 #endif
155 
156 #ifdef SIZE_MAX
157 #define MHD_CONTENT_READER_END_OF_STREAM SIZE_MAX
158 #define MHD_CONTENT_READER_END_WITH_ERROR (SIZE_MAX - 1)
159 #else
160 #define MHD_CONTENT_READER_END_OF_STREAM ((size_t) -1LL)
161 #define MHD_CONTENT_READER_END_WITH_ERROR (((size_t) -1LL) - 1)
162 #endif
163 
164 #ifndef _MHD_EXTERN
165 #if defined(_WIN32) && defined(MHD_W32LIB)
166 #define _MHD_EXTERN extern
167 #elif defined (_WIN32) && defined(MHD_W32DLL)
168 /* Define MHD_W32DLL when using MHD as W32 .DLL to speed up linker a little */
169 #define _MHD_EXTERN __declspec(dllimport)
170 #else
171 #define _MHD_EXTERN extern
172 #endif
173 #endif
174 
175 #ifndef MHD_SOCKET_DEFINED
176 
179 #if !defined(_WIN32) || defined(_SYS_TYPES_FD_SET)
180 #define MHD_POSIX_SOCKETS 1
181 typedef int MHD_socket;
182 #define MHD_INVALID_SOCKET (-1)
183 #else /* !defined(_WIN32) || defined(_SYS_TYPES_FD_SET) */
184 #define MHD_WINSOCK_SOCKETS 1
185 #include <winsock2.h>
186 typedef SOCKET MHD_socket;
187 #define MHD_INVALID_SOCKET (INVALID_SOCKET)
188 #endif /* !defined(_WIN32) || defined(_SYS_TYPES_FD_SET) */
189 #define MHD_SOCKET_DEFINED 1
190 #endif /* MHD_SOCKET_DEFINED */
191 
195 #ifdef MHD_NO_DEPRECATION
196 #define _MHD_DEPR_MACRO(msg)
197 #define _MHD_NO_DEPR_IN_MACRO 1
198 #define _MHD_DEPR_IN_MACRO(msg)
199 #define _MHD_NO_DEPR_FUNC 1
200 #define _MHD_DEPR_FUNC(msg)
201 #endif /* MHD_NO_DEPRECATION */
202 
203 #ifndef _MHD_DEPR_MACRO
204 #if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1500
205 /* VS 2008 or later */
206 /* Stringify macros */
207 #define _MHD_INSTRMACRO(a) #a
208 #define _MHD_STRMACRO(a) _MHD_INSTRMACRO(a)
209 /* deprecation message */
210 #define _MHD_DEPR_MACRO(msg) __pragma(message(__FILE__ "(" _MHD_STRMACRO(__LINE__)"): warning: " msg))
211 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
212 #elif defined(__clang__) || defined (__GNUC_PATCHLEVEL__)
213 /* clang or GCC since 3.0 */
214 #define _MHD_GCC_PRAG(x) _Pragma (#x)
215 #if (defined(__clang__) && (__clang_major__+0 >= 5 || \
216  (!defined(__apple_build_version__) && (__clang_major__+0 > 3 || (__clang_major__+0 == 3 && __clang_minor__ >= 3))))) || \
217  __GNUC__+0 > 4 || (__GNUC__+0 == 4 && __GNUC_MINOR__+0 >= 8)
218 /* clang >= 3.3 (or XCode's clang >= 5.0) or
219  GCC >= 4.8 */
220 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(GCC warning msg)
221 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
222 #else /* older clang or GCC */
223 /* clang < 3.3, XCode's clang < 5.0, 3.0 <= GCC < 4.8 */
224 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG(message msg)
225 #if (defined(__clang__) && (__clang_major__+0 > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 9))) /* FIXME: clang >= 2.9, earlier versions not tested */
226 /* clang handles inline pragmas better than GCC */
227 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO(msg)
228 #endif /* clang >= 2.9 */
229 #endif /* older clang or GCC */
230 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */
231 #endif /* clang || GCC >= 3.0 */
232 #endif /* !_MHD_DEPR_MACRO */
233 
234 #ifndef _MHD_DEPR_MACRO
235 #define _MHD_DEPR_MACRO(msg)
236 #endif /* !_MHD_DEPR_MACRO */
237 
238 #ifndef _MHD_DEPR_IN_MACRO
239 #define _MHD_NO_DEPR_IN_MACRO 1
240 #define _MHD_DEPR_IN_MACRO(msg)
241 #endif /* !_MHD_DEPR_IN_MACRO */
242 
243 #ifndef _MHD_DEPR_FUNC
244 #if defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1400
245 /* VS 2005 or later */
246 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated(msg))
247 #elif defined(_MSC_FULL_VER) && _MSC_VER+0 >= 1310
248 /* VS .NET 2003 deprecation do not support custom messages */
249 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated)
250 #elif (__GNUC__+0 >= 5) || (defined (__clang__) && \
251  (__clang_major__+0 > 2 || (__clang_major__+0 == 2 && __clang_minor__ >= 9))) /* FIXME: earlier versions not tested */
252 /* GCC >= 5.0 or clang >= 2.9 */
253 #define _MHD_DEPR_FUNC(msg) __attribute__((deprecated(msg)))
254 #elif defined (__clang__) || __GNUC__+0 > 3 || (__GNUC__+0 == 3 && __GNUC_MINOR__+0 >= 1)
255 /* 3.1 <= GCC < 5.0 or clang < 2.9 */
256 /* old GCC-style deprecation do not support custom messages */
257 #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__))
258 /* #elif defined(SOMEMACRO) */ /* add compiler-specific macros here if required */
259 #endif /* clang < 2.9 || GCC >= 3.1 */
260 #endif /* !_MHD_DEPR_FUNC */
261 
262 #ifndef _MHD_DEPR_FUNC
263 #define _MHD_NO_DEPR_FUNC 1
264 #define _MHD_DEPR_FUNC(msg)
265 #endif /* !_MHD_DEPR_FUNC */
266 
272 #ifndef MHD_LONG_LONG
273 
276 #define MHD_LONG_LONG long long
277 #define MHD_UNSIGNED_LONG_LONG unsigned long long
278 #else /* MHD_LONG_LONG */
279 _MHD_DEPR_MACRO("Macro MHD_LONG_LONG is deprecated, use MHD_UNSIGNED_LONG_LONG")
280 #endif
281 
285 #ifndef MHD_LONG_LONG_PRINTF
286 
289 #define MHD_LONG_LONG_PRINTF "ll"
290 #define MHD_UNSIGNED_LONG_LONG_PRINTF "%llu"
291 #else /* MHD_LONG_LONG_PRINTF */
292 _MHD_DEPR_MACRO("Macro MHD_LONG_LONG_PRINTF is deprecated, use MHD_UNSIGNED_LONG_LONG_PRINTF")
293 #endif
294 
295 
299 #define MHD_MD5_DIGEST_SIZE 16
300 
301 
307 /* See http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml */
308 
309 #define MHD_HTTP_CONTINUE 100
310 #define MHD_HTTP_SWITCHING_PROTOCOLS 101
311 #define MHD_HTTP_PROCESSING 102
312 
313 #define MHD_HTTP_OK 200
314 #define MHD_HTTP_CREATED 201
315 #define MHD_HTTP_ACCEPTED 202
316 #define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203
317 #define MHD_HTTP_NO_CONTENT 204
318 #define MHD_HTTP_RESET_CONTENT 205
319 #define MHD_HTTP_PARTIAL_CONTENT 206
320 #define MHD_HTTP_MULTI_STATUS 207
321 #define MHD_HTTP_ALREADY_REPORTED 208
322 
323 #define MHD_HTTP_IM_USED 226
324 
325 #define MHD_HTTP_MULTIPLE_CHOICES 300
326 #define MHD_HTTP_MOVED_PERMANENTLY 301
327 #define MHD_HTTP_FOUND 302
328 #define MHD_HTTP_SEE_OTHER 303
329 #define MHD_HTTP_NOT_MODIFIED 304
330 #define MHD_HTTP_USE_PROXY 305
331 #define MHD_HTTP_SWITCH_PROXY 306
332 #define MHD_HTTP_TEMPORARY_REDIRECT 307
333 #define MHD_HTTP_PERMANENT_REDIRECT 308
334 
335 #define MHD_HTTP_BAD_REQUEST 400
336 #define MHD_HTTP_UNAUTHORIZED 401
337 #define MHD_HTTP_PAYMENT_REQUIRED 402
338 #define MHD_HTTP_FORBIDDEN 403
339 #define MHD_HTTP_NOT_FOUND 404
340 #define MHD_HTTP_METHOD_NOT_ALLOWED 405
341 #define MHD_HTTP_NOT_ACCEPTABLE 406
342 
343 #define MHD_HTTP_METHOD_NOT_ACCEPTABLE \
344  _MHD_DEPR_IN_MACRO("Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") 406
345 #define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
346 #define MHD_HTTP_REQUEST_TIMEOUT 408
347 #define MHD_HTTP_CONFLICT 409
348 #define MHD_HTTP_GONE 410
349 #define MHD_HTTP_LENGTH_REQUIRED 411
350 #define MHD_HTTP_PRECONDITION_FAILED 412
351 #define MHD_HTTP_PAYLOAD_TOO_LARGE 413
352 
353 #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \
354  _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_PAYLOAD_TOO_LARGE") 413
355 #define MHD_HTTP_URI_TOO_LONG 414
356 
357 #define MHD_HTTP_REQUEST_URI_TOO_LONG \
358  _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUEST_URI_TOO_LONG is deprecated, use MHD_HTTP_URI_TOO_LONG") 414
359 #define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415
360 #define MHD_HTTP_RANGE_NOT_SATISFIABLE 416
361 
362 #define MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE \
363  _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE is deprecated, use MHD_HTTP_RANGE_NOT_SATISFIABLE") 416
364 #define MHD_HTTP_EXPECTATION_FAILED 417
365 
366 #define MHD_HTTP_MISDIRECTED_REQUEST 421
367 #define MHD_HTTP_UNPROCESSABLE_ENTITY 422
368 #define MHD_HTTP_LOCKED 423
369 #define MHD_HTTP_FAILED_DEPENDENCY 424
370 #define MHD_HTTP_UNORDERED_COLLECTION 425
371 #define MHD_HTTP_UPGRADE_REQUIRED 426
372 
373 #define MHD_HTTP_PRECONDITION_REQUIRED 428
374 #define MHD_HTTP_TOO_MANY_REQUESTS 429
375 #define MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
376 
377 #define MHD_HTTP_NO_RESPONSE 444
378 
379 #define MHD_HTTP_RETRY_WITH 449
380 #define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
381 #define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
382 
383 #define MHD_HTTP_INTERNAL_SERVER_ERROR 500
384 #define MHD_HTTP_NOT_IMPLEMENTED 501
385 #define MHD_HTTP_BAD_GATEWAY 502
386 #define MHD_HTTP_SERVICE_UNAVAILABLE 503
387 #define MHD_HTTP_GATEWAY_TIMEOUT 504
388 #define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
389 #define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506
390 #define MHD_HTTP_INSUFFICIENT_STORAGE 507
391 #define MHD_HTTP_LOOP_DETECTED 508
392 #define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
393 #define MHD_HTTP_NOT_EXTENDED 510
394 #define MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
395  /* end of group httpcode */
397 
404 _MHD_EXTERN const char *
405 MHD_get_reason_phrase_for (unsigned int code);
406 
407 
414 #define MHD_ICY_FLAG ((uint32_t)(((uint32_t)1) << 31))
415 
424 /* Main HTTP headers. */
425 /* Standard. RFC7231, Section 5.3.2 */
426 #define MHD_HTTP_HEADER_ACCEPT "Accept"
427 /* Standard. RFC7231, Section 5.3.3 */
428 #define MHD_HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"
429 /* Standard. RFC7231, Section 5.3.4; RFC7694, Section 3 */
430 #define MHD_HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding"
431 /* Standard. RFC7231, Section 5.3.5 */
432 #define MHD_HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"
433 /* Standard. RFC7233, Section 2.3 */
434 #define MHD_HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges"
435 /* Standard. RFC7234, Section 5.1 */
436 #define MHD_HTTP_HEADER_AGE "Age"
437 /* Standard. RFC7231, Section 7.4.1 */
438 #define MHD_HTTP_HEADER_ALLOW "Allow"
439 /* Standard. RFC7235, Section 4.2 */
440 #define MHD_HTTP_HEADER_AUTHORIZATION "Authorization"
441 /* Standard. RFC7234, Section 5.2 */
442 #define MHD_HTTP_HEADER_CACHE_CONTROL "Cache-Control"
443 /* Reserved. RFC7230, Section 8.1 */
444 #define MHD_HTTP_HEADER_CLOSE "Close"
445 /* Standard. RFC7230, Section 6.1 */
446 #define MHD_HTTP_HEADER_CONNECTION "Connection"
447 /* Standard. RFC7231, Section 3.1.2.2 */
448 #define MHD_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"
449 /* Standard. RFC7231, Section 3.1.3.2 */
450 #define MHD_HTTP_HEADER_CONTENT_LANGUAGE "Content-Language"
451 /* Standard. RFC7230, Section 3.3.2 */
452 #define MHD_HTTP_HEADER_CONTENT_LENGTH "Content-Length"
453 /* Standard. RFC7231, Section 3.1.4.2 */
454 #define MHD_HTTP_HEADER_CONTENT_LOCATION "Content-Location"
455 /* Standard. RFC7233, Section 4.2 */
456 #define MHD_HTTP_HEADER_CONTENT_RANGE "Content-Range"
457 /* Standard. RFC7231, Section 3.1.1.5 */
458 #define MHD_HTTP_HEADER_CONTENT_TYPE "Content-Type"
459 /* Standard. RFC7231, Section 7.1.1.2 */
460 #define MHD_HTTP_HEADER_DATE "Date"
461 /* Standard. RFC7232, Section 2.3 */
462 #define MHD_HTTP_HEADER_ETAG "ETag"
463 /* Standard. RFC7231, Section 5.1.1 */
464 #define MHD_HTTP_HEADER_EXPECT "Expect"
465 /* Standard. RFC7234, Section 5.3 */
466 #define MHD_HTTP_HEADER_EXPIRES "Expires"
467 /* Standard. RFC7231, Section 5.5.1 */
468 #define MHD_HTTP_HEADER_FROM "From"
469 /* Standard. RFC7230, Section 5.4 */
470 #define MHD_HTTP_HEADER_HOST "Host"
471 /* Standard. RFC7232, Section 3.1 */
472 #define MHD_HTTP_HEADER_IF_MATCH "If-Match"
473 /* Standard. RFC7232, Section 3.3 */
474 #define MHD_HTTP_HEADER_IF_MODIFIED_SINCE "If-Modified-Since"
475 /* Standard. RFC7232, Section 3.2 */
476 #define MHD_HTTP_HEADER_IF_NONE_MATCH "If-None-Match"
477 /* Standard. RFC7233, Section 3.2 */
478 #define MHD_HTTP_HEADER_IF_RANGE "If-Range"
479 /* Standard. RFC7232, Section 3.4 */
480 #define MHD_HTTP_HEADER_IF_UNMODIFIED_SINCE "If-Unmodified-Since"
481 /* Standard. RFC7232, Section 2.2 */
482 #define MHD_HTTP_HEADER_LAST_MODIFIED "Last-Modified"
483 /* Standard. RFC7231, Section 7.1.2 */
484 #define MHD_HTTP_HEADER_LOCATION "Location"
485 /* Standard. RFC7231, Section 5.1.2 */
486 #define MHD_HTTP_HEADER_MAX_FORWARDS "Max-Forwards"
487 /* Standard. RFC7231, Appendix A.1 */
488 #define MHD_HTTP_HEADER_MIME_VERSION "MIME-Version"
489 /* Standard. RFC7234, Section 5.4 */
490 #define MHD_HTTP_HEADER_PRAGMA "Pragma"
491 /* Standard. RFC7235, Section 4.3 */
492 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate"
493 /* Standard. RFC7235, Section 4.4 */
494 #define MHD_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization"
495 /* Standard. RFC7233, Section 3.1 */
496 #define MHD_HTTP_HEADER_RANGE "Range"
497 /* Standard. RFC7231, Section 5.5.2 */
498 #define MHD_HTTP_HEADER_REFERER "Referer"
499 /* Standard. RFC7231, Section 7.1.3 */
500 #define MHD_HTTP_HEADER_RETRY_AFTER "Retry-After"
501 /* Standard. RFC7231, Section 7.4.2 */
502 #define MHD_HTTP_HEADER_SERVER "Server"
503 /* Standard. RFC7230, Section 4.3 */
504 #define MHD_HTTP_HEADER_TE "TE"
505 /* Standard. RFC7230, Section 4.4 */
506 #define MHD_HTTP_HEADER_TRAILER "Trailer"
507 /* Standard. RFC7230, Section 3.3.1 */
508 #define MHD_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
509 /* Standard. RFC7230, Section 6.7 */
510 #define MHD_HTTP_HEADER_UPGRADE "Upgrade"
511 /* Standard. RFC7231, Section 5.5.3 */
512 #define MHD_HTTP_HEADER_USER_AGENT "User-Agent"
513 /* Standard. RFC7231, Section 7.1.4 */
514 #define MHD_HTTP_HEADER_VARY "Vary"
515 /* Standard. RFC7230, Section 5.7.1 */
516 #define MHD_HTTP_HEADER_VIA "Via"
517 /* Standard. RFC7235, Section 4.1 */
518 #define MHD_HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate"
519 /* Standard. RFC7234, Section 5.5 */
520 #define MHD_HTTP_HEADER_WARNING "Warning"
521 
522 /* Additional HTTP headers. */
523 /* No category. RFC4229 */
524 #define MHD_HTTP_HEADER_A_IM "A-IM"
525 /* No category. RFC4229 */
526 #define MHD_HTTP_HEADER_ACCEPT_ADDITIONS "Accept-Additions"
527 /* Informational. RFC7089 */
528 #define MHD_HTTP_HEADER_ACCEPT_DATETIME "Accept-Datetime"
529 /* No category. RFC4229 */
530 #define MHD_HTTP_HEADER_ACCEPT_FEATURES "Accept-Features"
531 /* No category. RFC5789 */
532 #define MHD_HTTP_HEADER_ACCEPT_PATCH "Accept-Patch"
533 /* Standard. RFC7639, Section 2 */
534 #define MHD_HTTP_HEADER_ALPN "ALPN"
535 /* Standard. RFC7838 */
536 #define MHD_HTTP_HEADER_ALT_SVC "Alt-Svc"
537 /* Standard. RFC7838 */
538 #define MHD_HTTP_HEADER_ALT_USED "Alt-Used"
539 /* No category. RFC4229 */
540 #define MHD_HTTP_HEADER_ALTERNATES "Alternates"
541 /* No category. RFC4437 */
542 #define MHD_HTTP_HEADER_APPLY_TO_REDIRECT_REF "Apply-To-Redirect-Ref"
543 /* Experimental. RFC8053, Section 4 */
544 #define MHD_HTTP_HEADER_AUTHENTICATION_CONTROL "Authentication-Control"
545 /* Standard. RFC7615, Section 3 */
546 #define MHD_HTTP_HEADER_AUTHENTICATION_INFO "Authentication-Info"
547 /* No category. RFC4229 */
548 #define MHD_HTTP_HEADER_C_EXT "C-Ext"
549 /* No category. RFC4229 */
550 #define MHD_HTTP_HEADER_C_MAN "C-Man"
551 /* No category. RFC4229 */
552 #define MHD_HTTP_HEADER_C_OPT "C-Opt"
553 /* No category. RFC4229 */
554 #define MHD_HTTP_HEADER_C_PEP "C-PEP"
555 /* No category. RFC4229 */
556 #define MHD_HTTP_HEADER_C_PEP_INFO "C-PEP-Info"
557 /* Standard. RFC7809, Section 7.1 */
558 #define MHD_HTTP_HEADER_CALDAV_TIMEZONES "CalDAV-Timezones"
559 /* Obsoleted. RFC2068; RFC2616 */
560 #define MHD_HTTP_HEADER_CONTENT_BASE "Content-Base"
561 /* Standard. RFC6266 */
562 #define MHD_HTTP_HEADER_CONTENT_DISPOSITION "Content-Disposition"
563 /* No category. RFC4229 */
564 #define MHD_HTTP_HEADER_CONTENT_ID "Content-ID"
565 /* No category. RFC4229 */
566 #define MHD_HTTP_HEADER_CONTENT_MD5 "Content-MD5"
567 /* No category. RFC4229 */
568 #define MHD_HTTP_HEADER_CONTENT_SCRIPT_TYPE "Content-Script-Type"
569 /* No category. RFC4229 */
570 #define MHD_HTTP_HEADER_CONTENT_STYLE_TYPE "Content-Style-Type"
571 /* No category. RFC4229 */
572 #define MHD_HTTP_HEADER_CONTENT_VERSION "Content-Version"
573 /* Standard. RFC6265 */
574 #define MHD_HTTP_HEADER_COOKIE "Cookie"
575 /* Obsoleted. RFC2965; RFC6265 */
576 #define MHD_HTTP_HEADER_COOKIE2 "Cookie2"
577 /* Standard. RFC5323 */
578 #define MHD_HTTP_HEADER_DASL "DASL"
579 /* Standard. RFC4918 */
580 #define MHD_HTTP_HEADER_DAV "DAV"
581 /* No category. RFC4229 */
582 #define MHD_HTTP_HEADER_DEFAULT_STYLE "Default-Style"
583 /* No category. RFC4229 */
584 #define MHD_HTTP_HEADER_DELTA_BASE "Delta-Base"
585 /* Standard. RFC4918 */
586 #define MHD_HTTP_HEADER_DEPTH "Depth"
587 /* No category. RFC4229 */
588 #define MHD_HTTP_HEADER_DERIVED_FROM "Derived-From"
589 /* Standard. RFC4918 */
590 #define MHD_HTTP_HEADER_DESTINATION "Destination"
591 /* No category. RFC4229 */
592 #define MHD_HTTP_HEADER_DIFFERENTIAL_ID "Differential-ID"
593 /* No category. RFC4229 */
594 #define MHD_HTTP_HEADER_DIGEST "Digest"
595 /* No category. RFC4229 */
596 #define MHD_HTTP_HEADER_EXT "Ext"
597 /* Standard. RFC7239 */
598 #define MHD_HTTP_HEADER_FORWARDED "Forwarded"
599 /* No category. RFC4229 */
600 #define MHD_HTTP_HEADER_GETPROFILE "GetProfile"
601 /* Experimental. RFC7486, Section 6.1.1 */
602 #define MHD_HTTP_HEADER_HOBAREG "Hobareg"
603 /* Standard. RFC7540, Section 3.2.1 */
604 #define MHD_HTTP_HEADER_HTTP2_SETTINGS "HTTP2-Settings"
605 /* No category. RFC4229 */
606 #define MHD_HTTP_HEADER_IM "IM"
607 /* Standard. RFC4918 */
608 #define MHD_HTTP_HEADER_IF "If"
609 /* Standard. RFC6638 */
610 #define MHD_HTTP_HEADER_IF_SCHEDULE_TAG_MATCH "If-Schedule-Tag-Match"
611 /* No category. RFC4229 */
612 #define MHD_HTTP_HEADER_KEEP_ALIVE "Keep-Alive"
613 /* No category. RFC4229 */
614 #define MHD_HTTP_HEADER_LABEL "Label"
615 /* No category. RFC5988 */
616 #define MHD_HTTP_HEADER_LINK "Link"
617 /* Standard. RFC4918 */
618 #define MHD_HTTP_HEADER_LOCK_TOKEN "Lock-Token"
619 /* No category. RFC4229 */
620 #define MHD_HTTP_HEADER_MAN "Man"
621 /* Informational. RFC7089 */
622 #define MHD_HTTP_HEADER_MEMENTO_DATETIME "Memento-Datetime"
623 /* No category. RFC4229 */
624 #define MHD_HTTP_HEADER_METER "Meter"
625 /* No category. RFC4229 */
626 #define MHD_HTTP_HEADER_NEGOTIATE "Negotiate"
627 /* No category. RFC4229 */
628 #define MHD_HTTP_HEADER_OPT "Opt"
629 /* Experimental. RFC8053, Section 3 */
630 #define MHD_HTTP_HEADER_OPTIONAL_WWW_AUTHENTICATE "Optional-WWW-Authenticate"
631 /* Standard. RFC4229 */
632 #define MHD_HTTP_HEADER_ORDERING_TYPE "Ordering-Type"
633 /* Standard. RFC6454 */
634 #define MHD_HTTP_HEADER_ORIGIN "Origin"
635 /* Standard. RFC4918 */
636 #define MHD_HTTP_HEADER_OVERWRITE "Overwrite"
637 /* No category. RFC4229 */
638 #define MHD_HTTP_HEADER_P3P "P3P"
639 /* No category. RFC4229 */
640 #define MHD_HTTP_HEADER_PEP "PEP"
641 /* No category. RFC4229 */
642 #define MHD_HTTP_HEADER_PICS_LABEL "PICS-Label"
643 /* No category. RFC4229 */
644 #define MHD_HTTP_HEADER_PEP_INFO "Pep-Info"
645 /* Standard. RFC4229 */
646 #define MHD_HTTP_HEADER_POSITION "Position"
647 /* Standard. RFC7240 */
648 #define MHD_HTTP_HEADER_PREFER "Prefer"
649 /* Standard. RFC7240 */
650 #define MHD_HTTP_HEADER_PREFERENCE_APPLIED "Preference-Applied"
651 /* No category. RFC4229 */
652 #define MHD_HTTP_HEADER_PROFILEOBJECT "ProfileObject"
653 /* No category. RFC4229 */
654 #define MHD_HTTP_HEADER_PROTOCOL "Protocol"
655 /* No category. RFC4229 */
656 #define MHD_HTTP_HEADER_PROTOCOL_INFO "Protocol-Info"
657 /* No category. RFC4229 */
658 #define MHD_HTTP_HEADER_PROTOCOL_QUERY "Protocol-Query"
659 /* No category. RFC4229 */
660 #define MHD_HTTP_HEADER_PROTOCOL_REQUEST "Protocol-Request"
661 /* Standard. RFC7615, Section 4 */
662 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATION_INFO "Proxy-Authentication-Info"
663 /* No category. RFC4229 */
664 #define MHD_HTTP_HEADER_PROXY_FEATURES "Proxy-Features"
665 /* No category. RFC4229 */
666 #define MHD_HTTP_HEADER_PROXY_INSTRUCTION "Proxy-Instruction"
667 /* No category. RFC4229 */
668 #define MHD_HTTP_HEADER_PUBLIC "Public"
669 /* Standard. RFC7469 */
670 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS "Public-Key-Pins"
671 /* Standard. RFC7469 */
672 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS_REPORT_ONLY "Public-Key-Pins-Report-Only"
673 /* No category. RFC4437 */
674 #define MHD_HTTP_HEADER_REDIRECT_REF "Redirect-Ref"
675 /* No category. RFC4229 */
676 #define MHD_HTTP_HEADER_SAFE "Safe"
677 /* Standard. RFC6638 */
678 #define MHD_HTTP_HEADER_SCHEDULE_REPLY "Schedule-Reply"
679 /* Standard. RFC6638 */
680 #define MHD_HTTP_HEADER_SCHEDULE_TAG "Schedule-Tag"
681 /* Standard. RFC6455 */
682 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_ACCEPT "Sec-WebSocket-Accept"
683 /* Standard. RFC6455 */
684 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_EXTENSIONS "Sec-WebSocket-Extensions"
685 /* Standard. RFC6455 */
686 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY "Sec-WebSocket-Key"
687 /* Standard. RFC6455 */
688 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_PROTOCOL "Sec-WebSocket-Protocol"
689 /* Standard. RFC6455 */
690 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION "Sec-WebSocket-Version"
691 /* No category. RFC4229 */
692 #define MHD_HTTP_HEADER_SECURITY_SCHEME "Security-Scheme"
693 /* Standard. RFC6265 */
694 #define MHD_HTTP_HEADER_SET_COOKIE "Set-Cookie"
695 /* Obsoleted. RFC2965; RFC6265 */
696 #define MHD_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2"
697 /* No category. RFC4229 */
698 #define MHD_HTTP_HEADER_SETPROFILE "SetProfile"
699 /* Standard. RFC5023 */
700 #define MHD_HTTP_HEADER_SLUG "SLUG"
701 /* No category. RFC4229 */
702 #define MHD_HTTP_HEADER_SOAPACTION "SoapAction"
703 /* No category. RFC4229 */
704 #define MHD_HTTP_HEADER_STATUS_URI "Status-URI"
705 /* Standard. RFC6797 */
706 #define MHD_HTTP_HEADER_STRICT_TRANSPORT_SECURITY "Strict-Transport-Security"
707 /* No category. RFC4229 */
708 #define MHD_HTTP_HEADER_SURROGATE_CAPABILITY "Surrogate-Capability"
709 /* No category. RFC4229 */
710 #define MHD_HTTP_HEADER_SURROGATE_CONTROL "Surrogate-Control"
711 /* No category. RFC4229 */
712 #define MHD_HTTP_HEADER_TCN "TCN"
713 /* Standard. RFC4918 */
714 #define MHD_HTTP_HEADER_TIMEOUT "Timeout"
715 /* Standard. RFC8030, Section 5.4 */
716 #define MHD_HTTP_HEADER_TOPIC "Topic"
717 /* Standard. RFC8030, Section 5.2 */
718 #define MHD_HTTP_HEADER_TTL "TTL"
719 /* Standard. RFC8030, Section 5.3 */
720 #define MHD_HTTP_HEADER_URGENCY "Urgency"
721 /* No category. RFC4229 */
722 #define MHD_HTTP_HEADER_URI "URI"
723 /* No category. RFC4229 */
724 #define MHD_HTTP_HEADER_VARIANT_VARY "Variant-Vary"
725 /* No category. RFC4229 */
726 #define MHD_HTTP_HEADER_WANT_DIGEST "Want-Digest"
727 /* Informational. RFC7034 */
728 #define MHD_HTTP_HEADER_X_FRAME_OPTIONS "X-Frame-Options"
729 
730 /* Some provisional headers. */
731 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN "Access-Control-Allow-Origin"
732  /* end of group headers */
733 
740 #define MHD_HTTP_VERSION_1_0 "HTTP/1.0"
741 #define MHD_HTTP_VERSION_1_1 "HTTP/1.1"
742  /* end of group versions */
744 
752 /* Main HTTP methods. */
753 /* Not safe. Not idempotent. RFC7231, Section 4.3.6. */
754 #define MHD_HTTP_METHOD_CONNECT "CONNECT"
755 /* Not safe. Idempotent. RFC7231, Section 4.3.5. */
756 #define MHD_HTTP_METHOD_DELETE "DELETE"
757 /* Safe. Idempotent. RFC7231, Section 4.3.1. */
758 #define MHD_HTTP_METHOD_GET "GET"
759 /* Safe. Idempotent. RFC7231, Section 4.3.2. */
760 #define MHD_HTTP_METHOD_HEAD "HEAD"
761 /* Safe. Idempotent. RFC7231, Section 4.3.7. */
762 #define MHD_HTTP_METHOD_OPTIONS "OPTIONS"
763 /* Not safe. Not idempotent. RFC7231, Section 4.3.3. */
764 #define MHD_HTTP_METHOD_POST "POST"
765 /* Not safe. Idempotent. RFC7231, Section 4.3.4. */
766 #define MHD_HTTP_METHOD_PUT "PUT"
767 /* Safe. Idempotent. RFC7231, Section 4.3.8. */
768 #define MHD_HTTP_METHOD_TRACE "TRACE"
769 
770 /* Additional HTTP methods. */
771 /* Not safe. Idempotent. RFC3744, Section 8.1. */
772 #define MHD_HTTP_METHOD_ACL "ACL"
773 /* Not safe. Idempotent. RFC3253, Section 12.6. */
774 #define MHD_HTTP_METHOD_BASELINE_CONTROL "BASELINE-CONTROL"
775 /* Not safe. Idempotent. RFC5842, Section 4. */
776 #define MHD_HTTP_METHOD_BIND "BIND"
777 /* Not safe. Idempotent. RFC3253, Section 4.4, Section 9.4. */
778 #define MHD_HTTP_METHOD_CHECKIN "CHECKIN"
779 /* Not safe. Idempotent. RFC3253, Section 4.3, Section 8.8. */
780 #define MHD_HTTP_METHOD_CHECKOUT "CHECKOUT"
781 /* Not safe. Idempotent. RFC4918, Section 9.8. */
782 #define MHD_HTTP_METHOD_COPY "COPY"
783 /* Not safe. Idempotent. RFC3253, Section 8.2. */
784 #define MHD_HTTP_METHOD_LABEL "LABEL"
785 /* Not safe. Idempotent. RFC2068, Section 19.6.1.2. */
786 #define MHD_HTTP_METHOD_LINK "LINK"
787 /* Not safe. Not idempotent. RFC4918, Section 9.10. */
788 #define MHD_HTTP_METHOD_LOCK "LOCK"
789 /* Not safe. Idempotent. RFC3253, Section 11.2. */
790 #define MHD_HTTP_METHOD_MERGE "MERGE"
791 /* Not safe. Idempotent. RFC3253, Section 13.5. */
792 #define MHD_HTTP_METHOD_MKACTIVITY "MKACTIVITY"
793 /* Not safe. Idempotent. RFC4791, Section 5.3.1. */
794 #define MHD_HTTP_METHOD_MKCALENDAR "MKCALENDAR"
795 /* Not safe. Idempotent. RFC4918, Section 9.3. */
796 #define MHD_HTTP_METHOD_MKCOL "MKCOL"
797 /* Not safe. Idempotent. RFC4437, Section 6. */
798 #define MHD_HTTP_METHOD_MKREDIRECTREF "MKREDIRECTREF"
799 /* Not safe. Idempotent. RFC3253, Section 6.3. */
800 #define MHD_HTTP_METHOD_MKWORKSPACE "MKWORKSPACE"
801 /* Not safe. Idempotent. RFC4918, Section 9.9. */
802 #define MHD_HTTP_METHOD_MOVE "MOVE"
803 /* Not safe. Idempotent. RFC3648, Section 7. */
804 #define MHD_HTTP_METHOD_ORDERPATCH "ORDERPATCH"
805 /* Not safe. Not idempotent. RFC5789, Section 2. */
806 #define MHD_HTTP_METHOD_PATCH "PATCH"
807 /* Safe. Idempotent. RFC7540, Section 3.5. */
808 #define MHD_HTTP_METHOD_PRI "PRI"
809 /* Safe. Idempotent. RFC4918, Section 9.1. */
810 #define MHD_HTTP_METHOD_PROPFIND "PROPFIND"
811 /* Not safe. Idempotent. RFC4918, Section 9.2. */
812 #define MHD_HTTP_METHOD_PROPPATCH "PROPPATCH"
813 /* Not safe. Idempotent. RFC5842, Section 6. */
814 #define MHD_HTTP_METHOD_REBIND "REBIND"
815 /* Safe. Idempotent. RFC3253, Section 3.6. */
816 #define MHD_HTTP_METHOD_REPORT "REPORT"
817 /* Safe. Idempotent. RFC5323, Section 2. */
818 #define MHD_HTTP_METHOD_SEARCH "SEARCH"
819 /* Not safe. Idempotent. RFC5842, Section 5. */
820 #define MHD_HTTP_METHOD_UNBIND "UNBIND"
821 /* Not safe. Idempotent. RFC3253, Section 4.5. */
822 #define MHD_HTTP_METHOD_UNCHECKOUT "UNCHECKOUT"
823 /* Not safe. Idempotent. RFC2068, Section 19.6.1.3. */
824 #define MHD_HTTP_METHOD_UNLINK "UNLINK"
825 /* Not safe. Idempotent. RFC4918, Section 9.11. */
826 #define MHD_HTTP_METHOD_UNLOCK "UNLOCK"
827 /* Not safe. Idempotent. RFC3253, Section 7.1. */
828 #define MHD_HTTP_METHOD_UPDATE "UPDATE"
829 /* Not safe. Idempotent. RFC4437, Section 7. */
830 #define MHD_HTTP_METHOD_UPDATEREDIRECTREF "UPDATEREDIRECTREF"
831 /* Not safe. Idempotent. RFC3253, Section 3.5. */
832 #define MHD_HTTP_METHOD_VERSION_CONTROL "VERSION-CONTROL"
833  /* end of group methods */
835 
841 #define MHD_HTTP_POST_ENCODING_FORM_URLENCODED "application/x-www-form-urlencoded"
842 #define MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data"
843  /* end of group postenc */
845 
846 
851 struct MHD_Daemon;
852 
861 struct MHD_Connection;
862 
867 struct MHD_Response;
868 
873 struct MHD_PostProcessor;
874 
875 
889 {
894 
901 
907 
912 
915 #if 0
916  /* let's do this later once versions that define MHD_USE_TLS a more widely deployed. */
917 #define MHD_USE_SSL \
918  _MHD_DEPR_IN_MACRO("Value MHD_USE_SSL is deprecated, use MHD_USE_TLS") \
919  MHD_USE_TLS
920 #endif
921 
927 
938 
941 #if 0 /* Will be marked for real deprecation later. */
942 #define MHD_USE_SELECT_INTERNALLY \
943  _MHD_DEPR_IN_MACRO("Value MHD_USE_SELECT_INTERNALLY is deprecated, use MHD_USE_INTERNAL_POLLING_THREAD instead") \
944  MHD_USE_INTERNAL_POLLING_THREAD
945 #endif /* 0 */
946 
955 
966 #if 0 /* Will be marked for real deprecation later. */
967 #define MHD_USE_PEDANTIC_CHECKS \
968  _MHD_DEPR_IN_MACRO("Flag MHD_USE_PEDANTIC_CHECKS is deprecated, use option MHD_OPTION_STRICT_FOR_CLIENT instead") \
969  32
970 #endif /* 0 */
971 
981 
987 
990 #if 0 /* Will be marked for real deprecation later. */
991 #define MHD_USE_POLL_INTERNALLY \
992  _MHD_DEPR_IN_MACRO("Value MHD_USE_POLL_INTERNALLY is deprecated, use MHD_USE_POLL_INTERNAL_THREAD instead") \
993  MHD_USE_POLL_INTERNAL_THREAD
994 #endif /* 0 */
995 
1003 
1006 #if 0 /* Will be marked for real deprecation later. */
1007 #define MHD_SUPPRESS_DATE_NO_CLOCK \
1008  _MHD_DEPR_IN_MACRO("Value MHD_SUPPRESS_DATE_NO_CLOCK is deprecated, use MHD_USE_SUPPRESS_DATE_NO_CLOCK instead") \
1009  MHD_USE_SUPPRESS_DATE_NO_CLOCK
1010 #endif /* 0 */
1011 
1020 
1029 
1032 #if 0 /* Will be marked for real deprecation later. */
1033 #define MHD_USE_EPOLL_LINUX_ONLY \
1034  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_LINUX_ONLY is deprecated, use MHD_USE_EPOLL") \
1035  MHD_USE_EPOLL
1036 #endif /* 0 */
1037 
1045 
1050 #if 0 /* Will be marked for real deprecation later. */
1051 #define MHD_USE_EPOLL_INTERNALLY \
1052  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \
1053  MHD_USE_EPOLL_INTERNAL_THREAD
1054 
1055 #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \
1056  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \
1057  MHD_USE_EPOLL_INTERNAL_THREAD
1058 #endif /* 0 */
1059 
1072  MHD_USE_ITC = 1024,
1073 
1076 #if 0 /* Will be marked for real deprecation later. */
1077 #define MHD_USE_PIPE_FOR_SHUTDOWN \
1078  _MHD_DEPR_IN_MACRO("Value MHD_USE_PIPE_FOR_SHUTDOWN is deprecated, use MHD_USE_ITC") \
1079  MHD_USE_ITC
1080 #endif /* 0 */
1081 
1086 
1094 
1097 #if 0 /* Will be marked for real deprecation later. */
1098 #define MHD_USE_EPOLL_TURBO \
1099  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_TURBO is deprecated, use MHD_USE_TURBO") \
1100  MHD_USE_TURBO
1101 #endif /* 0 */
1102 
1108 
1111 #if 0 /* Will be marked for real deprecation later. */
1112 #define MHD_USE_SUSPEND_RESUME \
1113  _MHD_DEPR_IN_MACRO("Value MHD_USE_SUSPEND_RESUME is deprecated, use MHD_ALLOW_SUSPEND_RESUME instead") \
1114  MHD_ALLOW_SUSPEND_RESUME
1115 #endif /* 0 */
1116 
1123 
1130 
1142  MHD_USE_AUTO = 65536,
1143 
1151 
1152 };
1153 
1154 
1163 typedef void
1164 (*MHD_LogCallback)(void *cls,
1165  const char *fm,
1166  va_list ap);
1167 
1168 
1181 typedef int
1183  const struct MHD_Connection *connection,
1184  const char *username,
1185  void **psk,
1186  size_t *psk_size);
1187 
1194 {
1195 
1201 
1210 
1216 
1223 
1237 
1249 
1257 
1289 
1297 
1305 
1312 
1318 
1326 
1339 
1349 
1370 
1390 
1401 
1408 
1414 
1421 
1427 
1443 
1452 
1459 
1468 
1477 
1488 
1496 
1512 
1520 };
1521 
1522 
1527 {
1533 
1539  intptr_t value;
1540 
1545  void *ptr_value;
1546 
1547 };
1548 
1549 
1555 {
1556 
1562 #define MHD_RESPONSE_HEADER_KIND \
1563  _MHD_DEPR_IN_MACRO("Value MHD_RESPONSE_HEADER_KIND is deprecated and not used") \
1564  MHD_RESPONSE_HEADER_KIND
1565 
1570 
1576 
1586 
1591 
1596 };
1597 
1598 
1605 {
1606 
1612 
1620 
1628 
1635 
1645 
1653 
1654 };
1655 
1656 
1663 {
1664 
1670 
1676 
1677 };
1678 
1679 
1684 {
1685 
1689  int /* enum gnutls_cipher_algorithm */ cipher_algorithm;
1690 
1694  int /* enum gnutls_protocol */ protocol;
1695 
1699  int /* MHD_YES or MHD_NO */ suspended;
1700 
1706  unsigned int connection_timeout;
1707 
1712 
1716  size_t header_size;
1717 
1721  void * /* gnutls_session_t */ tls_session;
1722 
1726  void * /* gnutls_x509_crt_t */ client_cert;
1727 
1731  struct sockaddr *client_addr;
1732 
1738 
1744 };
1745 
1746 
1753 {
1760 
1767 
1776 
1782 
1790 
1796 
1803 
1813 
1819 
1825 
1831 };
1832 
1833 
1839 {
1844 
1849 
1855 
1864 
1873 
1881 
1889 };
1890 
1891 
1902 typedef void
1903 (*MHD_PanicCallback) (void *cls,
1904  const char *file,
1905  unsigned int line,
1906  const char *reason);
1907 
1916 typedef int
1918  const struct sockaddr *addr,
1919  socklen_t addrlen);
1920 
1921 
1961 typedef int
1963  struct MHD_Connection *connection,
1964  const char *url,
1965  const char *method,
1966  const char *version,
1967  const char *upload_data,
1968  size_t *upload_data_size,
1969  void **con_cls);
1970 
1971 
1984 typedef void
1986  struct MHD_Connection *connection,
1987  void **con_cls,
1988  enum MHD_RequestTerminationCode toe);
1989 
1990 
2010 typedef void
2012  struct MHD_Connection *connection,
2013  void **socket_context,
2015 
2016 
2032 typedef int
2033 (*MHD_KeyValueIterator) (void *cls,
2034  enum MHD_ValueKind kind,
2035  const char *key,
2036  const char *value);
2037 
2038 
2083 typedef ssize_t
2085  uint64_t pos,
2086  char *buf,
2087  size_t max);
2088 
2089 
2099 typedef void
2101 
2102 
2122 typedef int
2123 (*MHD_PostDataIterator) (void *cls,
2124  enum MHD_ValueKind kind,
2125  const char *key,
2126  const char *filename,
2127  const char *content_type,
2128  const char *transfer_encoding,
2129  const char *data,
2130  uint64_t off,
2131  size_t size);
2132 
2133 /* **************** Daemon handling functions ***************** */
2134 
2156 _MHD_EXTERN struct MHD_Daemon *
2157 MHD_start_daemon_va (unsigned int flags,
2158  uint16_t port,
2160  MHD_AccessHandlerCallback dh, void *dh_cls,
2161  va_list ap);
2162 
2163 
2184 _MHD_EXTERN struct MHD_Daemon *
2185 MHD_start_daemon (unsigned int flags,
2186  uint16_t port,
2188  MHD_AccessHandlerCallback dh, void *dh_cls,
2189  ...);
2190 
2191 
2213 
2214 
2221 _MHD_EXTERN void
2223 
2224 
2252 _MHD_EXTERN int
2254  MHD_socket client_socket,
2255  const struct sockaddr *addr,
2256  socklen_t addrlen);
2257 
2258 
2288 _MHD_EXTERN int
2290  fd_set *read_fd_set,
2291  fd_set *write_fd_set,
2292  fd_set *except_fd_set,
2293  MHD_socket *max_fd);
2294 
2295 
2328 _MHD_EXTERN int
2330  fd_set *read_fd_set,
2331  fd_set *write_fd_set,
2332  fd_set *except_fd_set,
2333  MHD_socket *max_fd,
2334  unsigned int fd_setsize);
2335 
2336 
2361 #define MHD_get_fdset(daemon,read_fd_set,write_fd_set,except_fd_set,max_fd) \
2362  MHD_get_fdset2((daemon),(read_fd_set),(write_fd_set),(except_fd_set),(max_fd),FD_SETSIZE)
2363 
2364 
2383 _MHD_EXTERN int
2385  MHD_UNSIGNED_LONG_LONG *timeout);
2386 
2387 
2408 _MHD_EXTERN int
2409 MHD_run (struct MHD_Daemon *daemon);
2410 
2411 
2434 _MHD_EXTERN int
2436  const fd_set *read_fd_set,
2437  const fd_set *write_fd_set,
2438  const fd_set *except_fd_set);
2439 
2440 
2441 
2442 
2443 /* **************** Connection handling functions ***************** */
2444 
2456 _MHD_EXTERN int
2457 MHD_get_connection_values (struct MHD_Connection *connection,
2458  enum MHD_ValueKind kind,
2459  MHD_KeyValueIterator iterator,
2460  void *iterator_cls);
2461 
2462 
2489 _MHD_EXTERN int
2490 MHD_set_connection_value (struct MHD_Connection *connection,
2491  enum MHD_ValueKind kind,
2492  const char *key,
2493  const char *value);
2494 
2495 
2512 _MHD_EXTERN void
2513 MHD_set_panic_func (MHD_PanicCallback cb, void *cls);
2514 
2515 
2525 _MHD_EXTERN size_t
2526 MHD_http_unescape (char *val);
2527 
2528 
2539 _MHD_EXTERN const char *
2540 MHD_lookup_connection_value (struct MHD_Connection *connection,
2541  enum MHD_ValueKind kind,
2542  const char *key);
2543 
2544 
2556 _MHD_EXTERN int
2557 MHD_queue_response (struct MHD_Connection *connection,
2558  unsigned int status_code,
2559  struct MHD_Response *response);
2560 
2561 
2587 _MHD_EXTERN void
2588 MHD_suspend_connection (struct MHD_Connection *connection);
2589 
2590 
2605 _MHD_EXTERN void
2606 MHD_resume_connection (struct MHD_Connection *connection);
2607 
2608 
2609 /* **************** Response manipulation functions ***************** */
2610 
2611 
2616 {
2621 
2632 
2639 
2640 };
2641 
2642 
2647 {
2652 };
2653 
2654 
2663 _MHD_EXTERN int
2664 MHD_set_response_options (struct MHD_Response *response,
2665  enum MHD_ResponseFlags flags,
2666  ...);
2667 
2668 
2685 _MHD_EXTERN struct MHD_Response *
2686 MHD_create_response_from_callback (uint64_t size,
2687  size_t block_size,
2690 
2691 
2706 _MHD_DEPR_FUNC("MHD_create_response_from_data() is deprecated, use MHD_create_response_from_buffer()") \
2707 _MHD_EXTERN struct MHD_Response *
2708 MHD_create_response_from_data (size_t size,
2709  void *data,
2710  int must_free,
2711  int must_copy);
2712 
2713 
2720 {
2721 
2729 
2737 
2746 
2747 };
2748 
2749 
2760 _MHD_EXTERN struct MHD_Response *
2761 MHD_create_response_from_buffer (size_t size,
2762  void *buffer,
2763  enum MHD_ResponseMemoryMode mode);
2764 
2765 
2766 
2767 
2778 _MHD_EXTERN struct MHD_Response *
2780  void *buffer,
2782 
2783 
2795 _MHD_EXTERN struct MHD_Response *
2796 MHD_create_response_from_fd (size_t size,
2797  int fd);
2798 
2799 
2813 _MHD_EXTERN struct MHD_Response *
2814 MHD_create_response_from_fd64 (uint64_t size,
2815  int fd);
2816 
2817 
2834 _MHD_DEPR_FUNC("Function MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
2835 _MHD_EXTERN struct MHD_Response *
2837  int fd,
2838  off_t offset);
2839 
2840 #if !defined(_MHD_NO_DEPR_IN_MACRO) || defined(_MHD_NO_DEPR_FUNC)
2841 /* Substitute MHD_create_response_from_fd_at_offset64() instead of MHD_create_response_from_fd_at_offset()
2842  to minimize potential problems with different off_t sizes */
2843 #define MHD_create_response_from_fd_at_offset(size,fd,offset) \
2844  _MHD_DEPR_IN_MACRO("Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
2845  MHD_create_response_from_fd_at_offset64((size),(fd),(offset))
2846 #endif /* !_MHD_NO_DEPR_IN_MACRO || _MHD_NO_DEPR_FUNC */
2847 
2848 
2865 _MHD_EXTERN struct MHD_Response *
2867  int fd,
2868  uint64_t offset);
2869 
2870 
2878 {
2879 
2886 
2887 };
2888 
2889 
2895 struct MHD_UpgradeResponseHandle;
2896 
2897 
2910 _MHD_EXTERN int
2911 MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh,
2912  enum MHD_UpgradeAction action,
2913  ...);
2914 
2915 
2963 typedef void
2964 (*MHD_UpgradeHandler)(void *cls,
2965  struct MHD_Connection *connection,
2966  void *con_cls,
2967  const char *extra_in,
2968  size_t extra_in_size,
2969  MHD_socket sock,
2970  struct MHD_UpgradeResponseHandle *urh);
2971 
2972 
3002 _MHD_EXTERN struct MHD_Response *
3004  void *upgrade_handler_cls);
3005 
3006 
3016 _MHD_EXTERN void
3017 MHD_destroy_response (struct MHD_Response *response);
3018 
3019 
3030 _MHD_EXTERN int
3031 MHD_add_response_header (struct MHD_Response *response,
3032  const char *header,
3033  const char *content);
3034 
3035 
3045 _MHD_EXTERN int
3046 MHD_add_response_footer (struct MHD_Response *response,
3047  const char *footer,
3048  const char *content);
3049 
3050 
3060 _MHD_EXTERN int
3061 MHD_del_response_header (struct MHD_Response *response,
3062  const char *header,
3063  const char *content);
3064 
3065 
3076 _MHD_EXTERN int
3077 MHD_get_response_headers (struct MHD_Response *response,
3078  MHD_KeyValueIterator iterator, void *iterator_cls);
3079 
3080 
3089 _MHD_EXTERN const char *
3090 MHD_get_response_header (struct MHD_Response *response,
3091  const char *key);
3092 
3093 
3094 /* ********************** PostProcessor functions ********************** */
3095 
3121 _MHD_EXTERN struct MHD_PostProcessor *
3122 MHD_create_post_processor (struct MHD_Connection *connection,
3123  size_t buffer_size,
3124  MHD_PostDataIterator iter, void *iter_cls);
3125 
3126 
3140 _MHD_EXTERN int
3141 MHD_post_process (struct MHD_PostProcessor *pp,
3142  const char *post_data, size_t post_data_len);
3143 
3144 
3155 _MHD_EXTERN int
3156 MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
3157 
3158 
3159 /* ********************* Digest Authentication functions *************** */
3160 
3161 
3167 #define MHD_INVALID_NONCE -1
3168 
3169 
3178 _MHD_EXTERN char *
3179 MHD_digest_auth_get_username (struct MHD_Connection *connection);
3180 
3181 
3190 _MHD_EXTERN void
3191 MHD_free (void *ptr);
3192 
3193 
3198 
3203 
3208 
3213 
3214 };
3215 
3216 
3231 _MHD_EXTERN int
3232 MHD_digest_auth_check2 (struct MHD_Connection *connection,
3233  const char *realm,
3234  const char *username,
3235  const char *password,
3236  unsigned int nonce_timeout,
3237  enum MHD_DigestAuthAlgorithm algo);
3238 
3239 
3258 _MHD_EXTERN int
3259 MHD_digest_auth_check (struct MHD_Connection *connection,
3260  const char *realm,
3261  const char *username,
3262  const char *password,
3263  unsigned int nonce_timeout);
3264 
3265 
3283 _MHD_EXTERN int
3284 MHD_digest_auth_check_digest2 (struct MHD_Connection *connection,
3285  const char *realm,
3286  const char *username,
3287  const uint8_t *digest,
3288  size_t digest_size,
3289  unsigned int nonce_timeout,
3290  enum MHD_DigestAuthAlgorithm algo);
3291 
3292 
3311 _MHD_EXTERN int
3312 MHD_digest_auth_check_digest (struct MHD_Connection *connection,
3313  const char *realm,
3314  const char *username,
3315  const uint8_t digest[MHD_MD5_DIGEST_SIZE],
3316  unsigned int nonce_timeout);
3317 
3318 
3334 _MHD_EXTERN int
3335 MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
3336  const char *realm,
3337  const char *opaque,
3338  struct MHD_Response *response,
3339  int signal_stale,
3340  enum MHD_DigestAuthAlgorithm algo);
3341 
3342 
3360 _MHD_EXTERN int
3361 MHD_queue_auth_fail_response (struct MHD_Connection *connection,
3362  const char *realm,
3363  const char *opaque,
3364  struct MHD_Response *response,
3365  int signal_stale);
3366 
3367 
3377 _MHD_EXTERN char *
3379  char** password);
3380 
3381 
3394 _MHD_EXTERN int
3396  const char *realm,
3397  struct MHD_Response *response);
3398 
3399 /* ********************** generic query functions ********************** */
3400 
3401 
3412 _MHD_EXTERN const union MHD_ConnectionInfo *
3413 MHD_get_connection_info (struct MHD_Connection *connection,
3414  enum MHD_ConnectionInfoType info_type,
3415  ...);
3416 
3417 
3423 {
3424 
3433 
3434 };
3435 
3436 
3446 _MHD_EXTERN int
3447 MHD_set_connection_option (struct MHD_Connection *connection,
3448  enum MHD_CONNECTION_OPTION option,
3449  ...);
3450 
3451 
3456 {
3461  size_t key_size;
3462 
3468 
3473 
3477  uint16_t port;
3478 
3483 
3487  unsigned int num_connections;
3488 
3496 };
3497 
3498 
3510 _MHD_EXTERN const union MHD_DaemonInfo *
3512  enum MHD_DaemonInfoType info_type,
3513  ...);
3514 
3515 
3522 _MHD_EXTERN const char*
3523 MHD_get_version (void);
3524 
3525 
3531 {
3537 
3547 
3553 
3559 
3567 
3573 
3580 
3587 
3593 
3600 
3607 
3615 
3623 
3630 
3640 
3646 
3653 
3666 
3672 
3679 
3686 
3691 };
3692 
3693 
3705 _MHD_EXTERN int
3706 MHD_is_feature_supported (enum MHD_FEATURE feature);
3707 
3708 
3709 #if 0 /* keep Emacsens' auto-indent happy */
3710 {
3711 #endif
3712 #ifdef __cplusplus
3713 }
3714 #endif
3715 
3716 #endif
#define _MHD_DEPR_FUNC(msg)
Definition: microhttpd.h:264
int(* MHD_KeyValueIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
Definition: microhttpd.h:2033
_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:5459
_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:338
_MHD_EXTERN const char * MHD_get_version(void)
Definition: version.c:35
size_t mac_key_size
Definition: microhttpd.h:3467
_MHD_EXTERN const char * MHD_lookup_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key)
Definition: connection.c:797
_MHD_EXTERN union MHD_DaemonInfo * MHD_get_daemon_info(struct MHD_Daemon *daemon, enum MHD_DaemonInfoType info_type,...)
Definition: daemon.c:6707
MHD_socket listen_fd
Definition: microhttpd.h:3472
void * data
Definition: microhttpd.h:2709
_MHD_EXTERN int MHD_add_response_header(struct MHD_Response *response, const char *header, const char *content)
Definition: response.c:118
void int int must_copy
Definition: microhttpd.h:2709
MHD_mutex_lock_chk_ & daemon
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:1603
_MHD_EXTERN int MHD_get_timeout(struct MHD_Daemon *daemon, MHD_UNSIGNED_LONG_LONG *timeout)
Definition: daemon.c:3288
char * version
Definition: internal.h:708
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2100
_MHD_EXTERN int MHD_add_connection(struct MHD_Daemon *daemon, MHD_socket client_socket, const struct sockaddr *addr, socklen_t addrlen)
Definition: daemon.c:2997
_MHD_EXTERN int MHD_queue_basic_auth_fail_response(struct MHD_Connection *connection, const char *realm, struct MHD_Response *response)
Definition: basicauth.c:120
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd64(uint64_t size, int fd)
Definition: response.c:617
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
Definition: microhttpd.h:1985
MHD_RequestTerminationCode
Definition: microhttpd.h:1604
int(* 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:2123
_MHD_EXTERN int MHD_destroy_post_processor(struct MHD_PostProcessor *pp)
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:2011
MHD_socket connect_fd
Definition: microhttpd.h:1711
int MHD_socket
Definition: microhttpd.h:181
_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:1102
_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:4661
intptr_t value
Definition: microhttpd.h:1539
MHD_ConnectionNotificationCode
Definition: microhttpd.h:1662
_MHD_EXTERN int 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:1285
_MHD_EXTERN void MHD_set_panic_func(MHD_PanicCallback cb, void *cls)
Definition: panic.c:56
#define MHD_UNSIGNED_LONG_LONG
Definition: microhttpd.h:277
_MHD_EXTERN struct MHD_PostProcessor * MHD_create_post_processor(struct MHD_Connection *connection, size_t buffer_size, MHD_PostDataIterator iter, void *iter_cls)
MHD_ResponseOptions
Definition: microhttpd.h:2646
void * socket_context
Definition: internal.h:691
#define MHD_MD5_DIGEST_SIZE
Definition: microhttpd.h:299
int(* MHD_PskServerCredentialsCallback)(void *cls, const struct MHD_Connection *connection, const char *username, void **psk, size_t *psk_size)
Definition: microhttpd.h:1182
MHD_CONNECTION_OPTION
Definition: microhttpd.h:3422
_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:1253
_MHD_EXTERN char * MHD_basic_auth_get_username_password(struct MHD_Connection *connection, char **password)
Definition: basicauth.c:47
void * crc_cls
Definition: internal.h:1591
_MHD_EXTERN union MHD_ConnectionInfo * MHD_get_connection_info(struct MHD_Connection *connection, enum MHD_ConnectionInfoType info_type,...)
Definition: connection.c:3905
int fd
Definition: microhttpd.h:2837
_MHD_EXTERN void MHD_stop_daemon(struct MHD_Daemon *daemon)
Definition: daemon.c:6543
const char * url
Definition: internal.h:702
_MHD_EXTERN int 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:1399
_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:1176
_MHD_EXTERN int MHD_add_response_footer(struct MHD_Response *response, const char *footer, const char *content)
Definition: response.c:160
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd_at_offset64(uint64_t size, int fd, uint64_t offset)
Definition: response.c:552
char * method
Definition: internal.h:696
#define _MHD_EXTERN
Definition: microhttpd.h:171
_MHD_EXTERN int 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:3482
MHD_DigestAuthAlgorithm
Definition: microhttpd.h:3197
_MHD_EXTERN char * MHD_digest_auth_get_username(struct MHD_Connection *connection)
Definition: digestauth.c:590
_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:1213
_MHD_EXTERN void MHD_destroy_response(struct MHD_Response *response)
Definition: response.c:1127
_MHD_EXTERN void MHD_suspend_connection(struct MHD_Connection *connection)
Definition: daemon.c:2781
int(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:1917
_MHD_EXTERN int MHD_set_connection_option(struct MHD_Connection *connection, enum MHD_CONNECTION_OPTION option,...)
Definition: connection.c:3962
void int must_free
Definition: microhttpd.h:2709
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2084
uint16_t port
Definition: internal.h:1582
struct MHD_Response * MHD_create_response_from_data(size_t size, void *data, int must_free, int must_copy)
Definition: response.c:641
MHD_ValueKind
Definition: microhttpd.h:1554
struct MHD_Daemon * daemon
Definition: microhttpd.h:1737
_MHD_EXTERN int MHD_post_process(struct MHD_PostProcessor *pp, const char *post_data, size_t post_data_len)
#define MHD_create_response_from_fd_at_offset(size, fd, offset)
Definition: microhttpd.h:2843
MHD_FEATURE
Definition: microhttpd.h:3530
MHD_ConnectionInfoType
Definition: microhttpd.h:1752
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd(size_t size, int fd)
Definition: response.c:594
_MHD_EXTERN int MHD_upgrade_action(struct MHD_UpgradeResponseHandle *urh, enum MHD_UpgradeAction action,...)
int off_t offset
Definition: microhttpd.h:2837
_MHD_EXTERN int MHD_queue_response(struct MHD_Connection *connection, unsigned int status_code, struct MHD_Response *response)
Definition: connection.c:4028
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer(size_t size, void *buffer, enum MHD_ResponseMemoryMode mode)
Definition: response.c:699
unsigned int connection_timeout
Definition: microhttpd.h:1706
MHD_AcceptPolicyCallback apc
Definition: internal.h:1344
uint16_t port
Definition: microhttpd.h:3477
_MHD_EXTERN struct MHD_Response * MHD_create_response_for_upgrade(MHD_UpgradeHandler upgrade_handler, void *upgrade_handler_cls)
void * ptr_value
Definition: microhttpd.h:1545
_MHD_EXTERN void MHD_free(void *ptr)
Definition: memorypool.c:89
_MHD_EXTERN int MHD_set_response_options(struct MHD_Response *response, enum MHD_ResponseFlags flags,...)
Definition: response.c:378
_MHD_EXTERN int MHD_get_connection_values(struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIterator iterator, void *iterator_cls)
Definition: connection.c:703
_MHD_EXTERN int MHD_run(struct MHD_Daemon *daemon)
Definition: daemon.c:4507
MHD_OPTION
MHD options.
Definition: microhttpd.h:1193
enum MHD_FLAG flags
Definition: microhttpd.h:3495
void * apc_cls
Definition: internal.h:1349
#define MHD_get_fdset(daemon, read_fd_set, write_fd_set, except_fd_set, max_fd)
Definition: microhttpd.h:2361
MHD_ContentReaderCallback crc
Definition: internal.h:1597
MHD_UpgradeAction
Definition: microhttpd.h:2877
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer_with_free_callback(size_t size, void *buffer, MHD_ContentReaderFreeCallback crfc)
Definition: response.c:721
MHD_DaemonInfoType
Definition: microhttpd.h:1838
_MHD_EXTERN int MHD_is_feature_supported(enum MHD_FEATURE feature)
Definition: daemon.c:6822
struct sockaddr * client_addr
Definition: microhttpd.h:1731
int(* 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:1962
_MHD_EXTERN int MHD_del_response_header(struct MHD_Response *response, const char *header, const char *content)
Definition: response.c:181
#define _MHD_DEPR_MACRO(msg)
Definition: microhttpd.h:235
_MHD_EXTERN int 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:1053
MHD_ResponseFlags
Definition: microhttpd.h:2615
_MHD_EXTERN const char * MHD_get_response_header(struct MHD_Response *response, const char *key)
Definition: response.c:259
_MHD_EXTERN MHD_socket MHD_quiesce_daemon(struct MHD_Daemon *daemon)
Definition: daemon.c:4706
unsigned int num_connections
Definition: microhttpd.h:3487
_MHD_EXTERN size_t MHD_http_unescape(char *val)
Definition: internal.c:138
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:2964
_MHD_EXTERN const char * MHD_get_reason_phrase_for(unsigned int code)
enum MHD_OPTION option
Definition: microhttpd.h:1532
_MHD_EXTERN int MHD_set_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, const char *value)
Definition: connection.c:755
MHD_FLAG
Flags for the struct MHD_Daemon.
Definition: microhttpd.h:888
#define MHD_RESPONSE_HEADER_KIND
Definition: microhttpd.h:1562
_MHD_EXTERN int MHD_get_response_headers(struct MHD_Response *response, MHD_KeyValueIterator iterator, void *iterator_cls)
Definition: response.c:227
void(* MHD_LogCallback)(void *cls, const char *fm, va_list ap)
Definition: microhttpd.h:1164
MHD_ResponseMemoryMode
Definition: microhttpd.h:2719
_MHD_EXTERN void MHD_resume_connection(struct MHD_Connection *connection)
Definition: daemon.c:2810
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:1903