GNU libmicrohttpd  0.9.29
microhttpd.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrohttpd
3  Copyright (C) 2006-2017 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 0x00095400
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 __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 (__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 
301 /* See http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml */
302 
303 #define MHD_HTTP_CONTINUE 100
304 #define MHD_HTTP_SWITCHING_PROTOCOLS 101
305 #define MHD_HTTP_PROCESSING 102
306 
307 #define MHD_HTTP_OK 200
308 #define MHD_HTTP_CREATED 201
309 #define MHD_HTTP_ACCEPTED 202
310 #define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203
311 #define MHD_HTTP_NO_CONTENT 204
312 #define MHD_HTTP_RESET_CONTENT 205
313 #define MHD_HTTP_PARTIAL_CONTENT 206
314 #define MHD_HTTP_MULTI_STATUS 207
315 #define MHD_HTTP_ALREADY_REPORTED 208
316 
317 #define MHD_HTTP_IM_USED 226
318 
319 #define MHD_HTTP_MULTIPLE_CHOICES 300
320 #define MHD_HTTP_MOVED_PERMANENTLY 301
321 #define MHD_HTTP_FOUND 302
322 #define MHD_HTTP_SEE_OTHER 303
323 #define MHD_HTTP_NOT_MODIFIED 304
324 #define MHD_HTTP_USE_PROXY 305
325 #define MHD_HTTP_SWITCH_PROXY 306
326 #define MHD_HTTP_TEMPORARY_REDIRECT 307
327 #define MHD_HTTP_PERMANENT_REDIRECT 308
328 
329 #define MHD_HTTP_BAD_REQUEST 400
330 #define MHD_HTTP_UNAUTHORIZED 401
331 #define MHD_HTTP_PAYMENT_REQUIRED 402
332 #define MHD_HTTP_FORBIDDEN 403
333 #define MHD_HTTP_NOT_FOUND 404
334 #define MHD_HTTP_METHOD_NOT_ALLOWED 405
335 #define MHD_HTTP_NOT_ACCEPTABLE 406
336 
337 #define MHD_HTTP_METHOD_NOT_ACCEPTABLE \
338  _MHD_DEPR_IN_MACRO("Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE") 406
339 #define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
340 #define MHD_HTTP_REQUEST_TIMEOUT 408
341 #define MHD_HTTP_CONFLICT 409
342 #define MHD_HTTP_GONE 410
343 #define MHD_HTTP_LENGTH_REQUIRED 411
344 #define MHD_HTTP_PRECONDITION_FAILED 412
345 #define MHD_HTTP_PAYLOAD_TOO_LARGE 413
346 
347 #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE \
348  _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_PAYLOAD_TOO_LARGE") 413
349 #define MHD_HTTP_URI_TOO_LONG 414
350 
351 #define MHD_HTTP_REQUEST_URI_TOO_LONG \
352  _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUEST_URI_TOO_LONG is deprecated, use MHD_HTTP_URI_TOO_LONG") 414
353 #define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415
354 #define MHD_HTTP_RANGE_NOT_SATISFIABLE 416
355 
356 #define MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE \
357  _MHD_DEPR_IN_MACRO("Value MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE is deprecated, use MHD_HTTP_RANGE_NOT_SATISFIABLE") 416
358 #define MHD_HTTP_EXPECTATION_FAILED 417
359 
360 #define MHD_HTTP_MISDIRECTED_REQUEST 421
361 #define MHD_HTTP_UNPROCESSABLE_ENTITY 422
362 #define MHD_HTTP_LOCKED 423
363 #define MHD_HTTP_FAILED_DEPENDENCY 424
364 #define MHD_HTTP_UNORDERED_COLLECTION 425
365 #define MHD_HTTP_UPGRADE_REQUIRED 426
366 
367 #define MHD_HTTP_PRECONDITION_REQUIRED 428
368 #define MHD_HTTP_TOO_MANY_REQUESTS 429
369 #define MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
370 
371 #define MHD_HTTP_NO_RESPONSE 444
372 
373 #define MHD_HTTP_RETRY_WITH 449
374 #define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
375 #define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
376 
377 #define MHD_HTTP_INTERNAL_SERVER_ERROR 500
378 #define MHD_HTTP_NOT_IMPLEMENTED 501
379 #define MHD_HTTP_BAD_GATEWAY 502
380 #define MHD_HTTP_SERVICE_UNAVAILABLE 503
381 #define MHD_HTTP_GATEWAY_TIMEOUT 504
382 #define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
383 #define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506
384 #define MHD_HTTP_INSUFFICIENT_STORAGE 507
385 #define MHD_HTTP_LOOP_DETECTED 508
386 #define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
387 #define MHD_HTTP_NOT_EXTENDED 510
388 #define MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
389  /* end of group httpcode */
391 
398 _MHD_EXTERN const char *
399 MHD_get_reason_phrase_for (unsigned int code);
400 
401 
408 #define MHD_ICY_FLAG ((uint32_t)(((uint32_t)1) << 31))
409 
418 /* Main HTTP headers. */
419 /* Standard. RFC7231, Section 5.3.2 */
420 #define MHD_HTTP_HEADER_ACCEPT "Accept"
421 /* Standard. RFC7231, Section 5.3.3 */
422 #define MHD_HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset"
423 /* Standard. RFC7231, Section 5.3.4; RFC7694, Section 3 */
424 #define MHD_HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding"
425 /* Standard. RFC7231, Section 5.3.5 */
426 #define MHD_HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language"
427 /* Standard. RFC7233, Section 2.3 */
428 #define MHD_HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges"
429 /* Standard. RFC7234, Section 5.1 */
430 #define MHD_HTTP_HEADER_AGE "Age"
431 /* Standard. RFC7231, Section 7.4.1 */
432 #define MHD_HTTP_HEADER_ALLOW "Allow"
433 /* Standard. RFC7235, Section 4.2 */
434 #define MHD_HTTP_HEADER_AUTHORIZATION "Authorization"
435 /* Standard. RFC7234, Section 5.2 */
436 #define MHD_HTTP_HEADER_CACHE_CONTROL "Cache-Control"
437 /* Reserved. RFC7230, Section 8.1 */
438 #define MHD_HTTP_HEADER_CLOSE "Close"
439 /* Standard. RFC7230, Section 6.1 */
440 #define MHD_HTTP_HEADER_CONNECTION "Connection"
441 /* Standard. RFC7231, Section 3.1.2.2 */
442 #define MHD_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding"
443 /* Standard. RFC7231, Section 3.1.3.2 */
444 #define MHD_HTTP_HEADER_CONTENT_LANGUAGE "Content-Language"
445 /* Standard. RFC7230, Section 3.3.2 */
446 #define MHD_HTTP_HEADER_CONTENT_LENGTH "Content-Length"
447 /* Standard. RFC7231, Section 3.1.4.2 */
448 #define MHD_HTTP_HEADER_CONTENT_LOCATION "Content-Location"
449 /* Standard. RFC7233, Section 4.2 */
450 #define MHD_HTTP_HEADER_CONTENT_RANGE "Content-Range"
451 /* Standard. RFC7231, Section 3.1.1.5 */
452 #define MHD_HTTP_HEADER_CONTENT_TYPE "Content-Type"
453 /* Standard. RFC7231, Section 7.1.1.2 */
454 #define MHD_HTTP_HEADER_DATE "Date"
455 /* Standard. RFC7232, Section 2.3 */
456 #define MHD_HTTP_HEADER_ETAG "ETag"
457 /* Standard. RFC7231, Section 5.1.1 */
458 #define MHD_HTTP_HEADER_EXPECT "Expect"
459 /* Standard. RFC7234, Section 5.3 */
460 #define MHD_HTTP_HEADER_EXPIRES "Expires"
461 /* Standard. RFC7231, Section 5.5.1 */
462 #define MHD_HTTP_HEADER_FROM "From"
463 /* Standard. RFC7230, Section 5.4 */
464 #define MHD_HTTP_HEADER_HOST "Host"
465 /* Standard. RFC7232, Section 3.1 */
466 #define MHD_HTTP_HEADER_IF_MATCH "If-Match"
467 /* Standard. RFC7232, Section 3.3 */
468 #define MHD_HTTP_HEADER_IF_MODIFIED_SINCE "If-Modified-Since"
469 /* Standard. RFC7232, Section 3.2 */
470 #define MHD_HTTP_HEADER_IF_NONE_MATCH "If-None-Match"
471 /* Standard. RFC7233, Section 3.2 */
472 #define MHD_HTTP_HEADER_IF_RANGE "If-Range"
473 /* Standard. RFC7232, Section 3.4 */
474 #define MHD_HTTP_HEADER_IF_UNMODIFIED_SINCE "If-Unmodified-Since"
475 /* Standard. RFC7232, Section 2.2 */
476 #define MHD_HTTP_HEADER_LAST_MODIFIED "Last-Modified"
477 /* Standard. RFC7231, Section 7.1.2 */
478 #define MHD_HTTP_HEADER_LOCATION "Location"
479 /* Standard. RFC7231, Section 5.1.2 */
480 #define MHD_HTTP_HEADER_MAX_FORWARDS "Max-Forwards"
481 /* Standard. RFC7231, Appendix A.1 */
482 #define MHD_HTTP_HEADER_MIME_VERSION "MIME-Version"
483 /* Standard. RFC7234, Section 5.4 */
484 #define MHD_HTTP_HEADER_PRAGMA "Pragma"
485 /* Standard. RFC7235, Section 4.3 */
486 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate"
487 /* Standard. RFC7235, Section 4.4 */
488 #define MHD_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization"
489 /* Standard. RFC7233, Section 3.1 */
490 #define MHD_HTTP_HEADER_RANGE "Range"
491 /* Standard. RFC7231, Section 5.5.2 */
492 #define MHD_HTTP_HEADER_REFERER "Referer"
493 /* Standard. RFC7231, Section 7.1.3 */
494 #define MHD_HTTP_HEADER_RETRY_AFTER "Retry-After"
495 /* Standard. RFC7231, Section 7.4.2 */
496 #define MHD_HTTP_HEADER_SERVER "Server"
497 /* Standard. RFC7230, Section 4.3 */
498 #define MHD_HTTP_HEADER_TE "TE"
499 /* Standard. RFC7230, Section 4.4 */
500 #define MHD_HTTP_HEADER_TRAILER "Trailer"
501 /* Standard. RFC7230, Section 3.3.1 */
502 #define MHD_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding"
503 /* Standard. RFC7230, Section 6.7 */
504 #define MHD_HTTP_HEADER_UPGRADE "Upgrade"
505 /* Standard. RFC7231, Section 5.5.3 */
506 #define MHD_HTTP_HEADER_USER_AGENT "User-Agent"
507 /* Standard. RFC7231, Section 7.1.4 */
508 #define MHD_HTTP_HEADER_VARY "Vary"
509 /* Standard. RFC7230, Section 5.7.1 */
510 #define MHD_HTTP_HEADER_VIA "Via"
511 /* Standard. RFC7235, Section 4.1 */
512 #define MHD_HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate"
513 /* Standard. RFC7234, Section 5.5 */
514 #define MHD_HTTP_HEADER_WARNING "Warning"
515 
516 /* Additional HTTP headers. */
517 /* No category. RFC4229 */
518 #define MHD_HTTP_HEADER_A_IM "A-IM"
519 /* No category. RFC4229 */
520 #define MHD_HTTP_HEADER_ACCEPT_ADDITIONS "Accept-Additions"
521 /* Informational. RFC7089 */
522 #define MHD_HTTP_HEADER_ACCEPT_DATETIME "Accept-Datetime"
523 /* No category. RFC4229 */
524 #define MHD_HTTP_HEADER_ACCEPT_FEATURES "Accept-Features"
525 /* No category. RFC5789 */
526 #define MHD_HTTP_HEADER_ACCEPT_PATCH "Accept-Patch"
527 /* Standard. RFC7639, Section 2 */
528 #define MHD_HTTP_HEADER_ALPN "ALPN"
529 /* Standard. RFC7838 */
530 #define MHD_HTTP_HEADER_ALT_SVC "Alt-Svc"
531 /* Standard. RFC7838 */
532 #define MHD_HTTP_HEADER_ALT_USED "Alt-Used"
533 /* No category. RFC4229 */
534 #define MHD_HTTP_HEADER_ALTERNATES "Alternates"
535 /* No category. RFC4437 */
536 #define MHD_HTTP_HEADER_APPLY_TO_REDIRECT_REF "Apply-To-Redirect-Ref"
537 /* Experimental. RFC8053, Section 4 */
538 #define MHD_HTTP_HEADER_AUTHENTICATION_CONTROL "Authentication-Control"
539 /* Standard. RFC7615, Section 3 */
540 #define MHD_HTTP_HEADER_AUTHENTICATION_INFO "Authentication-Info"
541 /* No category. RFC4229 */
542 #define MHD_HTTP_HEADER_C_EXT "C-Ext"
543 /* No category. RFC4229 */
544 #define MHD_HTTP_HEADER_C_MAN "C-Man"
545 /* No category. RFC4229 */
546 #define MHD_HTTP_HEADER_C_OPT "C-Opt"
547 /* No category. RFC4229 */
548 #define MHD_HTTP_HEADER_C_PEP "C-PEP"
549 /* No category. RFC4229 */
550 #define MHD_HTTP_HEADER_C_PEP_INFO "C-PEP-Info"
551 /* Standard. RFC7809, Section 7.1 */
552 #define MHD_HTTP_HEADER_CALDAV_TIMEZONES "CalDAV-Timezones"
553 /* Obsoleted. RFC2068; RFC2616 */
554 #define MHD_HTTP_HEADER_CONTENT_BASE "Content-Base"
555 /* Standard. RFC6266 */
556 #define MHD_HTTP_HEADER_CONTENT_DISPOSITION "Content-Disposition"
557 /* No category. RFC4229 */
558 #define MHD_HTTP_HEADER_CONTENT_ID "Content-ID"
559 /* No category. RFC4229 */
560 #define MHD_HTTP_HEADER_CONTENT_MD5 "Content-MD5"
561 /* No category. RFC4229 */
562 #define MHD_HTTP_HEADER_CONTENT_SCRIPT_TYPE "Content-Script-Type"
563 /* No category. RFC4229 */
564 #define MHD_HTTP_HEADER_CONTENT_STYLE_TYPE "Content-Style-Type"
565 /* No category. RFC4229 */
566 #define MHD_HTTP_HEADER_CONTENT_VERSION "Content-Version"
567 /* Standard. RFC6265 */
568 #define MHD_HTTP_HEADER_COOKIE "Cookie"
569 /* Obsoleted. RFC2965; RFC6265 */
570 #define MHD_HTTP_HEADER_COOKIE2 "Cookie2"
571 /* Standard. RFC5323 */
572 #define MHD_HTTP_HEADER_DASL "DASL"
573 /* Standard. RFC4918 */
574 #define MHD_HTTP_HEADER_DAV "DAV"
575 /* No category. RFC4229 */
576 #define MHD_HTTP_HEADER_DEFAULT_STYLE "Default-Style"
577 /* No category. RFC4229 */
578 #define MHD_HTTP_HEADER_DELTA_BASE "Delta-Base"
579 /* Standard. RFC4918 */
580 #define MHD_HTTP_HEADER_DEPTH "Depth"
581 /* No category. RFC4229 */
582 #define MHD_HTTP_HEADER_DERIVED_FROM "Derived-From"
583 /* Standard. RFC4918 */
584 #define MHD_HTTP_HEADER_DESTINATION "Destination"
585 /* No category. RFC4229 */
586 #define MHD_HTTP_HEADER_DIFFERENTIAL_ID "Differential-ID"
587 /* No category. RFC4229 */
588 #define MHD_HTTP_HEADER_DIGEST "Digest"
589 /* No category. RFC4229 */
590 #define MHD_HTTP_HEADER_EXT "Ext"
591 /* Standard. RFC7239 */
592 #define MHD_HTTP_HEADER_FORWARDED "Forwarded"
593 /* No category. RFC4229 */
594 #define MHD_HTTP_HEADER_GETPROFILE "GetProfile"
595 /* Experimental. RFC7486, Section 6.1.1 */
596 #define MHD_HTTP_HEADER_HOBAREG "Hobareg"
597 /* Standard. RFC7540, Section 3.2.1 */
598 #define MHD_HTTP_HEADER_HTTP2_SETTINGS "HTTP2-Settings"
599 /* No category. RFC4229 */
600 #define MHD_HTTP_HEADER_IM "IM"
601 /* Standard. RFC4918 */
602 #define MHD_HTTP_HEADER_IF "If"
603 /* Standard. RFC6638 */
604 #define MHD_HTTP_HEADER_IF_SCHEDULE_TAG_MATCH "If-Schedule-Tag-Match"
605 /* No category. RFC4229 */
606 #define MHD_HTTP_HEADER_KEEP_ALIVE "Keep-Alive"
607 /* No category. RFC4229 */
608 #define MHD_HTTP_HEADER_LABEL "Label"
609 /* No category. RFC5988 */
610 #define MHD_HTTP_HEADER_LINK "Link"
611 /* Standard. RFC4918 */
612 #define MHD_HTTP_HEADER_LOCK_TOKEN "Lock-Token"
613 /* No category. RFC4229 */
614 #define MHD_HTTP_HEADER_MAN "Man"
615 /* Informational. RFC7089 */
616 #define MHD_HTTP_HEADER_MEMENTO_DATETIME "Memento-Datetime"
617 /* No category. RFC4229 */
618 #define MHD_HTTP_HEADER_METER "Meter"
619 /* No category. RFC4229 */
620 #define MHD_HTTP_HEADER_NEGOTIATE "Negotiate"
621 /* No category. RFC4229 */
622 #define MHD_HTTP_HEADER_OPT "Opt"
623 /* Experimental. RFC8053, Section 3 */
624 #define MHD_HTTP_HEADER_OPTIONAL_WWW_AUTHENTICATE "Optional-WWW-Authenticate"
625 /* Standard. RFC4229 */
626 #define MHD_HTTP_HEADER_ORDERING_TYPE "Ordering-Type"
627 /* Standard. RFC6454 */
628 #define MHD_HTTP_HEADER_ORIGIN "Origin"
629 /* Standard. RFC4918 */
630 #define MHD_HTTP_HEADER_OVERWRITE "Overwrite"
631 /* No category. RFC4229 */
632 #define MHD_HTTP_HEADER_P3P "P3P"
633 /* No category. RFC4229 */
634 #define MHD_HTTP_HEADER_PEP "PEP"
635 /* No category. RFC4229 */
636 #define MHD_HTTP_HEADER_PICS_LABEL "PICS-Label"
637 /* No category. RFC4229 */
638 #define MHD_HTTP_HEADER_PEP_INFO "Pep-Info"
639 /* Standard. RFC4229 */
640 #define MHD_HTTP_HEADER_POSITION "Position"
641 /* Standard. RFC7240 */
642 #define MHD_HTTP_HEADER_PREFER "Prefer"
643 /* Standard. RFC7240 */
644 #define MHD_HTTP_HEADER_PREFERENCE_APPLIED "Preference-Applied"
645 /* No category. RFC4229 */
646 #define MHD_HTTP_HEADER_PROFILEOBJECT "ProfileObject"
647 /* No category. RFC4229 */
648 #define MHD_HTTP_HEADER_PROTOCOL "Protocol"
649 /* No category. RFC4229 */
650 #define MHD_HTTP_HEADER_PROTOCOL_INFO "Protocol-Info"
651 /* No category. RFC4229 */
652 #define MHD_HTTP_HEADER_PROTOCOL_QUERY "Protocol-Query"
653 /* No category. RFC4229 */
654 #define MHD_HTTP_HEADER_PROTOCOL_REQUEST "Protocol-Request"
655 /* Standard. RFC7615, Section 4 */
656 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATION_INFO "Proxy-Authentication-Info"
657 /* No category. RFC4229 */
658 #define MHD_HTTP_HEADER_PROXY_FEATURES "Proxy-Features"
659 /* No category. RFC4229 */
660 #define MHD_HTTP_HEADER_PROXY_INSTRUCTION "Proxy-Instruction"
661 /* No category. RFC4229 */
662 #define MHD_HTTP_HEADER_PUBLIC "Public"
663 /* Standard. RFC7469 */
664 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS "Public-Key-Pins"
665 /* Standard. RFC7469 */
666 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS_REPORT_ONLY "Public-Key-Pins-Report-Only"
667 /* No category. RFC4437 */
668 #define MHD_HTTP_HEADER_REDIRECT_REF "Redirect-Ref"
669 /* No category. RFC4229 */
670 #define MHD_HTTP_HEADER_SAFE "Safe"
671 /* Standard. RFC6638 */
672 #define MHD_HTTP_HEADER_SCHEDULE_REPLY "Schedule-Reply"
673 /* Standard. RFC6638 */
674 #define MHD_HTTP_HEADER_SCHEDULE_TAG "Schedule-Tag"
675 /* Standard. RFC6455 */
676 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_ACCEPT "Sec-WebSocket-Accept"
677 /* Standard. RFC6455 */
678 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_EXTENSIONS "Sec-WebSocket-Extensions"
679 /* Standard. RFC6455 */
680 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY "Sec-WebSocket-Key"
681 /* Standard. RFC6455 */
682 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_PROTOCOL "Sec-WebSocket-Protocol"
683 /* Standard. RFC6455 */
684 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION "Sec-WebSocket-Version"
685 /* No category. RFC4229 */
686 #define MHD_HTTP_HEADER_SECURITY_SCHEME "Security-Scheme"
687 /* Standard. RFC6265 */
688 #define MHD_HTTP_HEADER_SET_COOKIE "Set-Cookie"
689 /* Obsoleted. RFC2965; RFC6265 */
690 #define MHD_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2"
691 /* No category. RFC4229 */
692 #define MHD_HTTP_HEADER_SETPROFILE "SetProfile"
693 /* Standard. RFC5023 */
694 #define MHD_HTTP_HEADER_SLUG "SLUG"
695 /* No category. RFC4229 */
696 #define MHD_HTTP_HEADER_SOAPACTION "SoapAction"
697 /* No category. RFC4229 */
698 #define MHD_HTTP_HEADER_STATUS_URI "Status-URI"
699 /* Standard. RFC6797 */
700 #define MHD_HTTP_HEADER_STRICT_TRANSPORT_SECURITY "Strict-Transport-Security"
701 /* No category. RFC4229 */
702 #define MHD_HTTP_HEADER_SURROGATE_CAPABILITY "Surrogate-Capability"
703 /* No category. RFC4229 */
704 #define MHD_HTTP_HEADER_SURROGATE_CONTROL "Surrogate-Control"
705 /* No category. RFC4229 */
706 #define MHD_HTTP_HEADER_TCN "TCN"
707 /* Standard. RFC4918 */
708 #define MHD_HTTP_HEADER_TIMEOUT "Timeout"
709 /* Standard. RFC8030, Section 5.4 */
710 #define MHD_HTTP_HEADER_TOPIC "Topic"
711 /* Standard. RFC8030, Section 5.2 */
712 #define MHD_HTTP_HEADER_TTL "TTL"
713 /* Standard. RFC8030, Section 5.3 */
714 #define MHD_HTTP_HEADER_URGENCY "Urgency"
715 /* No category. RFC4229 */
716 #define MHD_HTTP_HEADER_URI "URI"
717 /* No category. RFC4229 */
718 #define MHD_HTTP_HEADER_VARIANT_VARY "Variant-Vary"
719 /* No category. RFC4229 */
720 #define MHD_HTTP_HEADER_WANT_DIGEST "Want-Digest"
721 /* Informational. RFC7034 */
722 #define MHD_HTTP_HEADER_X_FRAME_OPTIONS "X-Frame-Options"
723 
724 /* Some provisional headers. */
725 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN "Access-Control-Allow-Origin"
726  /* end of group headers */
727 
734 #define MHD_HTTP_VERSION_1_0 "HTTP/1.0"
735 #define MHD_HTTP_VERSION_1_1 "HTTP/1.1"
736  /* end of group versions */
738 
746 /* Main HTTP methods. */
747 /* Not safe. Not idempotent. RFC7231, Section 4.3.6. */
748 #define MHD_HTTP_METHOD_CONNECT "CONNECT"
749 /* Not safe. Idempotent. RFC7231, Section 4.3.5. */
750 #define MHD_HTTP_METHOD_DELETE "DELETE"
751 /* Safe. Idempotent. RFC7231, Section 4.3.1. */
752 #define MHD_HTTP_METHOD_GET "GET"
753 /* Safe. Idempotent. RFC7231, Section 4.3.2. */
754 #define MHD_HTTP_METHOD_HEAD "HEAD"
755 /* Safe. Idempotent. RFC7231, Section 4.3.7. */
756 #define MHD_HTTP_METHOD_OPTIONS "OPTIONS"
757 /* Not safe. Not idempotent. RFC7231, Section 4.3.3. */
758 #define MHD_HTTP_METHOD_POST "POST"
759 /* Not safe. Idempotent. RFC7231, Section 4.3.4. */
760 #define MHD_HTTP_METHOD_PUT "PUT"
761 /* Safe. Idempotent. RFC7231, Section 4.3.8. */
762 #define MHD_HTTP_METHOD_TRACE "TRACE"
763 
764 /* Additional HTTP methods. */
765 /* Not safe. Idempotent. RFC3744, Section 8.1. */
766 #define MHD_HTTP_METHOD_ACL "ACL"
767 /* Not safe. Idempotent. RFC3253, Section 12.6. */
768 #define MHD_HTTP_METHOD_BASELINE_CONTROL "BASELINE-CONTROL"
769 /* Not safe. Idempotent. RFC5842, Section 4. */
770 #define MHD_HTTP_METHOD_BIND "BIND"
771 /* Not safe. Idempotent. RFC3253, Section 4.4, Section 9.4. */
772 #define MHD_HTTP_METHOD_CHECKIN "CHECKIN"
773 /* Not safe. Idempotent. RFC3253, Section 4.3, Section 8.8. */
774 #define MHD_HTTP_METHOD_CHECKOUT "CHECKOUT"
775 /* Not safe. Idempotent. RFC4918, Section 9.8. */
776 #define MHD_HTTP_METHOD_COPY "COPY"
777 /* Not safe. Idempotent. RFC3253, Section 8.2. */
778 #define MHD_HTTP_METHOD_LABEL "LABEL"
779 /* Not safe. Idempotent. RFC2068, Section 19.6.1.2. */
780 #define MHD_HTTP_METHOD_LINK "LINK"
781 /* Not safe. Not idempotent. RFC4918, Section 9.10. */
782 #define MHD_HTTP_METHOD_LOCK "LOCK"
783 /* Not safe. Idempotent. RFC3253, Section 11.2. */
784 #define MHD_HTTP_METHOD_MERGE "MERGE"
785 /* Not safe. Idempotent. RFC3253, Section 13.5. */
786 #define MHD_HTTP_METHOD_MKACTIVITY "MKACTIVITY"
787 /* Not safe. Idempotent. RFC4791, Section 5.3.1. */
788 #define MHD_HTTP_METHOD_MKCALENDAR "MKCALENDAR"
789 /* Not safe. Idempotent. RFC4918, Section 9.3. */
790 #define MHD_HTTP_METHOD_MKCOL "MKCOL"
791 /* Not safe. Idempotent. RFC4437, Section 6. */
792 #define MHD_HTTP_METHOD_MKREDIRECTREF "MKREDIRECTREF"
793 /* Not safe. Idempotent. RFC3253, Section 6.3. */
794 #define MHD_HTTP_METHOD_MKWORKSPACE "MKWORKSPACE"
795 /* Not safe. Idempotent. RFC4918, Section 9.9. */
796 #define MHD_HTTP_METHOD_MOVE "MOVE"
797 /* Not safe. Idempotent. RFC3648, Section 7. */
798 #define MHD_HTTP_METHOD_ORDERPATCH "ORDERPATCH"
799 /* Not safe. Not idempotent. RFC5789, Section 2. */
800 #define MHD_HTTP_METHOD_PATCH "PATCH"
801 /* Safe. Idempotent. RFC7540, Section 3.5. */
802 #define MHD_HTTP_METHOD_PRI "PRI"
803 /* Safe. Idempotent. RFC4918, Section 9.1. */
804 #define MHD_HTTP_METHOD_PROPFIND "PROPFIND"
805 /* Not safe. Idempotent. RFC4918, Section 9.2. */
806 #define MHD_HTTP_METHOD_PROPPATCH "PROPPATCH"
807 /* Not safe. Idempotent. RFC5842, Section 6. */
808 #define MHD_HTTP_METHOD_REBIND "REBIND"
809 /* Safe. Idempotent. RFC3253, Section 3.6. */
810 #define MHD_HTTP_METHOD_REPORT "REPORT"
811 /* Safe. Idempotent. RFC5323, Section 2. */
812 #define MHD_HTTP_METHOD_SEARCH "SEARCH"
813 /* Not safe. Idempotent. RFC5842, Section 5. */
814 #define MHD_HTTP_METHOD_UNBIND "UNBIND"
815 /* Not safe. Idempotent. RFC3253, Section 4.5. */
816 #define MHD_HTTP_METHOD_UNCHECKOUT "UNCHECKOUT"
817 /* Not safe. Idempotent. RFC2068, Section 19.6.1.3. */
818 #define MHD_HTTP_METHOD_UNLINK "UNLINK"
819 /* Not safe. Idempotent. RFC4918, Section 9.11. */
820 #define MHD_HTTP_METHOD_UNLOCK "UNLOCK"
821 /* Not safe. Idempotent. RFC3253, Section 7.1. */
822 #define MHD_HTTP_METHOD_UPDATE "UPDATE"
823 /* Not safe. Idempotent. RFC4437, Section 7. */
824 #define MHD_HTTP_METHOD_UPDATEREDIRECTREF "UPDATEREDIRECTREF"
825 /* Not safe. Idempotent. RFC3253, Section 3.5. */
826 #define MHD_HTTP_METHOD_VERSION_CONTROL "VERSION-CONTROL"
827  /* end of group methods */
829 
835 #define MHD_HTTP_POST_ENCODING_FORM_URLENCODED "application/x-www-form-urlencoded"
836 #define MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data"
837  /* end of group postenc */
839 
840 
845 struct MHD_Daemon;
846 
855 struct MHD_Connection;
856 
861 struct MHD_Response;
862 
867 struct MHD_PostProcessor;
868 
869 
883 {
888 
895 
901 
906 
909 #if 0
910  /* let's do this later once versions that define MHD_USE_TLS a more widely deployed. */
911 #define MHD_USE_SSL \
912  _MHD_DEPR_IN_MACRO("Value MHD_USE_SSL is deprecated, use MHD_USE_TLS") \
913  MHD_USE_TLS
914 #endif
915 
921 
932 
935 #if 0 /* Will be marked for real deprecation later. */
936 #define MHD_USE_SELECT_INTERNALLY \
937  _MHD_DEPR_IN_MACRO("Value MHD_USE_SELECT_INTERNALLY is deprecated, use MHD_USE_INTERNAL_POLLING_THREAD instead") \
938  MHD_USE_INTERNAL_POLLING_THREAD
939 #endif /* 0 */
940 
949 
960 #if 0 /* Will be marked for real deprecation later. */
961 #define MHD_USE_PEDANTIC_CHECKS \
962  _MHD_DEPR_IN_MACRO("Flag MHD_USE_PEDANTIC_CHECKS is deprecated, use option MHD_OPTION_STRICT_FOR_CLIENT instead") \
963  32
964 #endif /* 0 */
965 
975 
981 
984 #if 0 /* Will be marked for real deprecation later. */
985 #define MHD_USE_POLL_INTERNALLY \
986  _MHD_DEPR_IN_MACRO("Value MHD_USE_POLL_INTERNALLY is deprecated, use MHD_USE_POLL_INTERNAL_THREAD instead") \
987  MHD_USE_POLL_INTERNAL_THREAD
988 #endif /* 0 */
989 
997 
1000 #if 0 /* Will be marked for real deprecation later. */
1001 #define MHD_SUPPRESS_DATE_NO_CLOCK \
1002  _MHD_DEPR_IN_MACRO("Value MHD_SUPPRESS_DATE_NO_CLOCK is deprecated, use MHD_USE_SUPPRESS_DATE_NO_CLOCK instead") \
1003  MHD_USE_SUPPRESS_DATE_NO_CLOCK
1004 #endif /* 0 */
1005 
1014 
1023 
1026 #if 0 /* Will be marked for real deprecation later. */
1027 #define MHD_USE_EPOLL_LINUX_ONLY \
1028  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_LINUX_ONLY is deprecated, use MHD_USE_EPOLL") \
1029  MHD_USE_EPOLL
1030 #endif /* 0 */
1031 
1039 
1044 #if 0 /* Will be marked for real deprecation later. */
1045 #define MHD_USE_EPOLL_INTERNALLY \
1046  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \
1047  MHD_USE_EPOLL_INTERNAL_THREAD
1048 
1049 #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \
1050  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \
1051  MHD_USE_EPOLL_INTERNAL_THREAD
1052 #endif /* 0 */
1053 
1066  MHD_USE_ITC = 1024,
1067 
1070 #if 0 /* Will be marked for real deprecation later. */
1071 #define MHD_USE_PIPE_FOR_SHUTDOWN \
1072  _MHD_DEPR_IN_MACRO("Value MHD_USE_PIPE_FOR_SHUTDOWN is deprecated, use MHD_USE_ITC") \
1073  MHD_USE_ITC
1074 #endif /* 0 */
1075 
1080 
1088 
1091 #if 0 /* Will be marked for real deprecation later. */
1092 #define MHD_USE_EPOLL_TURBO \
1093  _MHD_DEPR_IN_MACRO("Value MHD_USE_EPOLL_TURBO is deprecated, use MHD_USE_TURBO") \
1094  MHD_USE_TURBO
1095 #endif /* 0 */
1096 
1102 
1105 #if 0 /* Will be marked for real deprecation later. */
1106 #define MHD_USE_SUSPEND_RESUME \
1107  _MHD_DEPR_IN_MACRO("Value MHD_USE_SUSPEND_RESUME is deprecated, use MHD_ALLOW_SUSPEND_RESUME instead") \
1108  MHD_ALLOW_SUSPEND_RESUME
1109 #endif /* 0 */
1110 
1117 
1124 
1136  MHD_USE_AUTO = 65536,
1137 
1145 
1146 };
1147 
1148 
1157 typedef void
1158 (*MHD_LogCallback)(void *cls,
1159  const char *fm,
1160  va_list ap);
1161 
1162 
1169 {
1170 
1176 
1185 
1191 
1198 
1212 
1224 
1232 
1264 
1272 
1280 
1287 
1293 
1301 
1314 
1324 
1345 
1365 
1376 
1383 
1389 
1396 
1402 
1418 
1427 
1434 
1443 
1452 
1463 
1471 
1490 };
1491 
1492 
1497 {
1503 
1509  intptr_t value;
1510 
1515  void *ptr_value;
1516 
1517 };
1518 
1519 
1525 {
1526 
1531 
1536 
1542 
1552 
1557 
1562 };
1563 
1564 
1571 {
1572 
1578 
1586 
1594 
1601 
1611 
1619 
1620 };
1621 
1622 
1629 {
1630 
1636 
1642 
1643 };
1644 
1645 
1650 {
1651 
1655  int /* enum gnutls_cipher_algorithm */ cipher_algorithm;
1656 
1660  int /* enum gnutls_protocol */ protocol;
1661 
1665  int /* MHD_YES or MHD_NO */ suspended;
1666 
1672  unsigned int connection_timeout;
1673 
1678 
1682  size_t header_size;
1683 
1687  void * /* gnutls_session_t */ tls_session;
1688 
1692  void * /* gnutls_x509_crt_t */ client_cert;
1693 
1697  struct sockaddr *client_addr;
1698 
1704 
1710 };
1711 
1712 
1719 {
1726 
1733 
1742 
1748 
1756 
1762 
1769 
1779 
1785 
1791 
1797 };
1798 
1799 
1805 {
1810 
1815 
1821 
1828 
1837 
1845 };
1846 
1847 
1858 typedef void
1859 (*MHD_PanicCallback) (void *cls,
1860  const char *file,
1861  unsigned int line,
1862  const char *reason);
1863 
1872 typedef int
1874  const struct sockaddr *addr,
1875  socklen_t addrlen);
1876 
1877 
1917 typedef int
1919  struct MHD_Connection *connection,
1920  const char *url,
1921  const char *method,
1922  const char *version,
1923  const char *upload_data,
1924  size_t *upload_data_size,
1925  void **con_cls);
1926 
1927 
1940 typedef void
1942  struct MHD_Connection *connection,
1943  void **con_cls,
1944  enum MHD_RequestTerminationCode toe);
1945 
1965 typedef void
1967  struct MHD_Connection *connection,
1968  void **socket_context,
1970 
1971 
1987 typedef int
1988 (*MHD_KeyValueIterator) (void *cls,
1989  enum MHD_ValueKind kind,
1990  const char *key,
1991  const char *value);
1992 
1993 
2038 typedef ssize_t
2040  uint64_t pos,
2041  char *buf,
2042  size_t max);
2043 
2044 
2054 typedef void
2056 
2057 
2077 typedef int
2078 (*MHD_PostDataIterator) (void *cls,
2079  enum MHD_ValueKind kind,
2080  const char *key,
2081  const char *filename,
2082  const char *content_type,
2083  const char *transfer_encoding,
2084  const char *data,
2085  uint64_t off,
2086  size_t size);
2087 
2088 /* **************** Daemon handling functions ***************** */
2089 
2107 _MHD_EXTERN struct MHD_Daemon *
2108 MHD_start_daemon_va (unsigned int flags,
2109  uint16_t port,
2111  MHD_AccessHandlerCallback dh, void *dh_cls,
2112  va_list ap);
2113 
2114 
2131 _MHD_EXTERN struct MHD_Daemon *
2132 MHD_start_daemon (unsigned int flags,
2133  uint16_t port,
2135  MHD_AccessHandlerCallback dh, void *dh_cls,
2136  ...);
2137 
2138 
2159 MHD_quiesce_daemon (struct MHD_Daemon *daemon);
2160 
2161 
2168 _MHD_EXTERN void
2169 MHD_stop_daemon (struct MHD_Daemon *daemon);
2170 
2171 
2201 _MHD_EXTERN int
2202 MHD_add_connection (struct MHD_Daemon *daemon,
2203  MHD_socket client_socket,
2204  const struct sockaddr *addr,
2205  socklen_t addrlen);
2206 
2207 
2235 _MHD_EXTERN int
2236 MHD_get_fdset (struct MHD_Daemon *daemon,
2237  fd_set *read_fd_set,
2238  fd_set *write_fd_set,
2239  fd_set *except_fd_set,
2240  MHD_socket *max_fd);
2241 
2242 
2273 _MHD_EXTERN int
2274 MHD_get_fdset2 (struct MHD_Daemon *daemon,
2275  fd_set *read_fd_set,
2276  fd_set *write_fd_set,
2277  fd_set *except_fd_set,
2278  MHD_socket *max_fd,
2279  unsigned int fd_setsize);
2280 
2281 
2304 #define MHD_get_fdset(daemon,read_fd_set,write_fd_set,except_fd_set,max_fd) \
2305  MHD_get_fdset2((daemon),(read_fd_set),(write_fd_set),(except_fd_set),(max_fd),FD_SETSIZE)
2306 
2307 
2322 _MHD_EXTERN int
2323 MHD_get_timeout (struct MHD_Daemon *daemon,
2324  MHD_UNSIGNED_LONG_LONG *timeout);
2325 
2326 
2346 _MHD_EXTERN int
2347 MHD_run (struct MHD_Daemon *daemon);
2348 
2349 
2372 _MHD_EXTERN int
2373 MHD_run_from_select (struct MHD_Daemon *daemon,
2374  const fd_set *read_fd_set,
2375  const fd_set *write_fd_set,
2376  const fd_set *except_fd_set);
2377 
2378 
2379 
2380 
2381 /* **************** Connection handling functions ***************** */
2382 
2394 _MHD_EXTERN int
2395 MHD_get_connection_values (struct MHD_Connection *connection,
2396  enum MHD_ValueKind kind,
2397  MHD_KeyValueIterator iterator,
2398  void *iterator_cls);
2399 
2400 
2427 _MHD_EXTERN int
2428 MHD_set_connection_value (struct MHD_Connection *connection,
2429  enum MHD_ValueKind kind,
2430  const char *key,
2431  const char *value);
2432 
2433 
2450 _MHD_EXTERN void
2451 MHD_set_panic_func (MHD_PanicCallback cb, void *cls);
2452 
2453 
2463 _MHD_EXTERN size_t
2464 MHD_http_unescape (char *val);
2465 
2466 
2477 _MHD_EXTERN const char *
2478 MHD_lookup_connection_value (struct MHD_Connection *connection,
2479  enum MHD_ValueKind kind,
2480  const char *key);
2481 
2482 
2494 _MHD_EXTERN int
2495 MHD_queue_response (struct MHD_Connection *connection,
2496  unsigned int status_code,
2497  struct MHD_Response *response);
2498 
2499 
2525 _MHD_EXTERN void
2526 MHD_suspend_connection (struct MHD_Connection *connection);
2527 
2528 
2543 _MHD_EXTERN void
2544 MHD_resume_connection (struct MHD_Connection *connection);
2545 
2546 
2547 /* **************** Response manipulation functions ***************** */
2548 
2549 
2553 enum MHD_ResponseFlags
2554 {
2558  MHD_RF_NONE = 0,
2559 
2565  MHD_RF_HTTP_VERSION_1_0_ONLY = 1
2566 
2567 };
2568 
2569 
2573 enum MHD_ResponseOptions
2574 {
2578  MHD_RO_END = 0
2579 };
2580 
2581 
2590 _MHD_EXTERN int
2591 MHD_set_response_options (struct MHD_Response *response,
2592  enum MHD_ResponseFlags flags,
2593  ...);
2594 
2595 
2612 _MHD_EXTERN struct MHD_Response *
2613 MHD_create_response_from_callback (uint64_t size,
2614  size_t block_size,
2617 
2618 
2633 _MHD_DEPR_FUNC("MHD_create_response_from_data() is deprecated, use MHD_create_response_from_buffer()") \
2634 _MHD_EXTERN struct MHD_Response *
2635 MHD_create_response_from_data (size_t size,
2636  void *data,
2637  int must_free,
2638  int must_copy);
2639 
2640 
2646 enum MHD_ResponseMemoryMode
2647 {
2648 
2655  MHD_RESPMEM_PERSISTENT,
2656 
2663  MHD_RESPMEM_MUST_FREE,
2664 
2672  MHD_RESPMEM_MUST_COPY
2673 
2674 };
2675 
2676 
2687 _MHD_EXTERN struct MHD_Response *
2688 MHD_create_response_from_buffer (size_t size,
2689  void *buffer,
2690  enum MHD_ResponseMemoryMode mode);
2691 
2692 
2704 _MHD_EXTERN struct MHD_Response *
2705 MHD_create_response_from_fd (size_t size,
2706  int fd);
2707 
2708 
2722 _MHD_EXTERN struct MHD_Response *
2723 MHD_create_response_from_fd64 (uint64_t size,
2724  int fd);
2725 
2726 
2743 _MHD_DEPR_FUNC("Function MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
2744 _MHD_EXTERN struct MHD_Response *
2746  int fd,
2747  off_t offset);
2748 
2749 #if !defined(_MHD_NO_DEPR_IN_MACRO) || defined(_MHD_NO_DEPR_FUNC)
2750 /* Substitute MHD_create_response_from_fd_at_offset64() instead of MHD_create_response_from_fd_at_offset()
2751  to minimize potential problems with different off_t sizes */
2752 #define MHD_create_response_from_fd_at_offset(size,fd,offset) \
2753  _MHD_DEPR_IN_MACRO("Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \
2754  MHD_create_response_from_fd_at_offset64((size),(fd),(offset))
2755 #endif /* !_MHD_NO_DEPR_IN_MACRO || _MHD_NO_DEPR_FUNC */
2756 
2757 
2774 _MHD_EXTERN struct MHD_Response *
2776  int fd,
2777  uint64_t offset);
2778 
2779 
2786 enum MHD_UpgradeAction
2787 {
2788 
2794  MHD_UPGRADE_ACTION_CLOSE = 0
2795 
2796 };
2797 
2798 
2804 struct MHD_UpgradeResponseHandle;
2805 
2806 
2819 _MHD_EXTERN int
2820 MHD_upgrade_action (struct MHD_UpgradeResponseHandle *urh,
2821  enum MHD_UpgradeAction action,
2822  ...);
2823 
2824 
2869 typedef void
2870 (*MHD_UpgradeHandler)(void *cls,
2871  struct MHD_Connection *connection,
2872  void *con_cls,
2873  const char *extra_in,
2874  size_t extra_in_size,
2875  MHD_socket sock,
2876  struct MHD_UpgradeResponseHandle *urh);
2877 
2878 
2908 _MHD_EXTERN struct MHD_Response *
2909 MHD_create_response_for_upgrade (MHD_UpgradeHandler upgrade_handler,
2910  void *upgrade_handler_cls);
2911 
2912 
2922 _MHD_EXTERN void
2923 MHD_destroy_response (struct MHD_Response *response);
2924 
2925 
2936 _MHD_EXTERN int
2937 MHD_add_response_header (struct MHD_Response *response,
2938  const char *header,
2939  const char *content);
2940 
2941 
2951 _MHD_EXTERN int
2952 MHD_add_response_footer (struct MHD_Response *response,
2953  const char *footer,
2954  const char *content);
2955 
2956 
2966 _MHD_EXTERN int
2967 MHD_del_response_header (struct MHD_Response *response,
2968  const char *header,
2969  const char *content);
2970 
2971 
2982 _MHD_EXTERN int
2983 MHD_get_response_headers (struct MHD_Response *response,
2984  MHD_KeyValueIterator iterator, void *iterator_cls);
2985 
2986 
2995 _MHD_EXTERN const char *
2996 MHD_get_response_header (struct MHD_Response *response,
2997  const char *key);
2998 
2999 
3000 /* ********************** PostProcessor functions ********************** */
3001 
3027 _MHD_EXTERN struct MHD_PostProcessor *
3028 MHD_create_post_processor (struct MHD_Connection *connection,
3029  size_t buffer_size,
3030  MHD_PostDataIterator iter, void *iter_cls);
3031 
3032 
3046 _MHD_EXTERN int
3047 MHD_post_process (struct MHD_PostProcessor *pp,
3048  const char *post_data, size_t post_data_len);
3049 
3050 
3061 _MHD_EXTERN int
3062 MHD_destroy_post_processor (struct MHD_PostProcessor *pp);
3063 
3064 
3065 /* ********************* Digest Authentication functions *************** */
3066 
3067 
3073 #define MHD_INVALID_NONCE -1
3074 
3075 
3084 _MHD_EXTERN char *
3085 MHD_digest_auth_get_username (struct MHD_Connection *connection);
3086 
3087 
3101 _MHD_EXTERN int
3102 MHD_digest_auth_check (struct MHD_Connection *connection,
3103  const char *realm,
3104  const char *username,
3105  const char *password,
3106  unsigned int nonce_timeout);
3107 
3108 
3123 _MHD_EXTERN int
3124 MHD_queue_auth_fail_response (struct MHD_Connection *connection,
3125  const char *realm,
3126  const char *opaque,
3127  struct MHD_Response *response,
3128  int signal_stale);
3129 
3130 
3140 _MHD_EXTERN char *
3142  char** password);
3143 
3144 
3157 _MHD_EXTERN int
3159  const char *realm,
3160  struct MHD_Response *response);
3161 
3162 /* ********************** generic query functions ********************** */
3163 
3164 
3175 _MHD_EXTERN const union MHD_ConnectionInfo *
3176 MHD_get_connection_info (struct MHD_Connection *connection,
3177  enum MHD_ConnectionInfoType info_type,
3178  ...);
3179 
3180 
3185 enum MHD_CONNECTION_OPTION
3186 {
3187 
3195  MHD_CONNECTION_OPTION_TIMEOUT
3196 
3197 };
3198 
3199 
3209 _MHD_EXTERN int
3210 MHD_set_connection_option (struct MHD_Connection *connection,
3211  enum MHD_CONNECTION_OPTION option,
3212  ...);
3213 
3214 
3218 union MHD_DaemonInfo
3219 {
3224  size_t key_size;
3225 
3230  size_t mac_key_size;
3231 
3235  MHD_socket listen_fd;
3236 
3240  int epoll_fd;
3241 
3245  unsigned int num_connections;
3246 
3253  enum MHD_FLAG flags;
3254 };
3255 
3256 
3268 _MHD_EXTERN const union MHD_DaemonInfo *
3269 MHD_get_daemon_info (struct MHD_Daemon *daemon,
3270  enum MHD_DaemonInfoType info_type,
3271  ...);
3272 
3273 
3280 _MHD_EXTERN const char*
3281 MHD_get_version (void);
3282 
3283 
3288 enum MHD_FEATURE
3289 {
3294  MHD_FEATURE_MESSAGES = 1,
3295 
3303  MHD_FEATURE_TLS = 2,
3304  MHD_FEATURE_SSL = 2,
3305 
3310  MHD_FEATURE_HTTPS_CERT_CALLBACK = 3,
3311 
3316  MHD_FEATURE_IPv6 = 4,
3317 
3324  MHD_FEATURE_IPv6_ONLY = 5,
3325 
3330  MHD_FEATURE_POLL = 6,
3331 
3337  MHD_FEATURE_EPOLL = 7,
3338 
3344  MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET = 8,
3345 
3350  MHD_FEATURE_SOCKETPAIR = 9,
3351 
3357  MHD_FEATURE_TCP_FASTOPEN = 10,
3358 
3364  MHD_FEATURE_BASIC_AUTH = 11,
3365 
3372  MHD_FEATURE_DIGEST_AUTH = 12,
3373 
3380  MHD_FEATURE_POSTPROCESSOR = 13,
3381 
3387  MHD_FEATURE_HTTPS_KEY_PASSWORD = 14,
3388 
3397  MHD_FEATURE_LARGE_FILE = 15,
3398 
3402  MHD_FEATURE_THREAD_NAMES = 16,
3403  MHD_THREAD_NAMES = 16,
3404 
3410  MHD_FEATURE_UPGRADE = 17,
3411 
3423  MHD_FEATURE_RESPONSES_SHARED_FD = 18
3424 };
3425 
3426 
3438 _MHD_EXTERN int
3439 MHD_is_feature_supported (enum MHD_FEATURE feature);
3440 
3441 
3442 #if 0 /* keep Emacsens' auto-indent happy */
3443 {
3444 #endif
3445 #ifdef __cplusplus
3446 }
3447 #endif
3448 
3449 #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:1988
int MHD_set_response_options(struct MHD_Response *response, enum MHD_ResponseFlags flags,...)
Definition: response.c:305
_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:5335
void * socket_context
Definition: internal.h:659
int MHD_add_response_header(struct MHD_Response *response, const char *header, const char *content)
Definition: response.c:117
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd64(uint64_t size, int fd)
Definition: response.c:544
MHD_ContentReaderFreeCallback crfc
Definition: internal.h:315
int MHD_get_timeout(struct MHD_Daemon *daemon, MHD_UNSIGNED_LONG_LONG *timeout)
Definition: daemon.c:3238
void(* MHD_ContentReaderFreeCallback)(void *cls)
Definition: microhttpd.h:2055
char * version
Definition: internal.h:676
_MHD_EXTERN int MHD_add_connection(struct MHD_Daemon *daemon, MHD_socket client_socket, const struct sockaddr *addr, socklen_t addrlen)
Definition: daemon.c:2964
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:2078
const char * MHD_get_response_header(struct MHD_Response *response, const char *key)
Definition: response.c:235
int MHD_queue_basic_auth_fail_response(struct MHD_Connection *connection, const char *realm, struct MHD_Response *response)
Definition: basicauth.c:120
MHD_RequestTerminationCode
Definition: microhttpd.h:1570
int MHD_destroy_post_processor(struct MHD_PostProcessor *pp)
MHD_socket connect_fd
Definition: microhttpd.h:1677
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:672
int MHD_socket
Definition: microhttpd.h:181
void MHD_suspend_connection(struct MHD_Connection *connection)
Definition: daemon.c:2731
_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:4597
intptr_t value
Definition: microhttpd.h:1509
MHD_ConnectionNotificationCode
Definition: microhttpd.h:1628
void MHD_set_panic_func(MHD_PanicCallback cb, void *cls)
Definition: daemon.c:6496
#define MHD_UNSIGNED_LONG_LONG
Definition: microhttpd.h:277
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microhttpd.h:1859
void(* MHD_LogCallback)(void *cls, const char *fm, va_list ap)
Definition: microhttpd.h:1158
char * MHD_basic_auth_get_username_password(struct MHD_Connection *connection, char **password)
Definition: basicauth.c:47
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:267
struct MHD_Response * MHD_create_response_from_buffer(size_t size, void *buffer, enum MHD_ResponseMemoryMode mode)
Definition: response.c:622
_MHD_EXTERN void MHD_stop_daemon(struct MHD_Daemon *daemon)
Definition: daemon.c:6290
const char * url
Definition: internal.h:670
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:946
int MHD_add_response_footer(struct MHD_Response *response, const char *footer, const char *content)
Definition: response.c:138
char * method
Definition: internal.h:664
#define _MHD_EXTERN
Definition: microhttpd.h:171
struct MHD_PostProcessor * MHD_create_post_processor(struct MHD_Connection *connection, size_t buffer_size, MHD_PostDataIterator iter, void *iter_cls)
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:3446
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
Definition: microhttpd.h:2039
void MHD_destroy_response(struct MHD_Response *response)
Definition: response.c:1020
int MHD_set_connection_option(struct MHD_Connection *connection, enum MHD_CONNECTION_OPTION option,...)
Definition: connection.c:3429
const char * MHD_lookup_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key)
Definition: connection.c:450
uint16_t port
Definition: internal.h:1547
struct MHD_Response * MHD_create_response_from_data(size_t size, void *data, int must_free, int must_copy)
Definition: response.c:568
MHD_ValueKind
Definition: microhttpd.h:1524
const union MHD_ConnectionInfo * MHD_get_connection_info(struct MHD_Connection *connection, enum MHD_ConnectionInfoType info_type,...)
Definition: connection.c:3372
struct MHD_Daemon * daemon
Definition: microhttpd.h:1703
int MHD_post_process(struct MHD_PostProcessor *pp, const char *post_data, size_t post_data_len)
MHD_ConnectionInfoType
Definition: microhttpd.h:1718
int MHD_queue_response(struct MHD_Connection *connection, unsigned int status_code, struct MHD_Response *response)
Definition: connection.c:3492
unsigned int connection_timeout
Definition: microhttpd.h:1672
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd_at_offset64(uint64_t size, int fd, uint64_t offset)
Definition: response.c:479
MHD_AcceptPolicyCallback apc
Definition: internal.h:1314
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:1918
char * MHD_digest_auth_get_username(struct MHD_Connection *connection)
Definition: digestauth.c:467
const union MHD_DaemonInfo * MHD_get_daemon_info(struct MHD_Daemon *daemon, enum MHD_DaemonInfoType info_type,...)
Definition: daemon.c:6434
int MHD_get_fdset(struct MHD_Daemon *daemon, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, MHD_socket *max_fd)
Definition: daemon.c:678
void * ptr_value
Definition: microhttpd.h:1515
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **con_cls, enum MHD_RequestTerminationCode toe)
Definition: microhttpd.h:1941
int MHD_get_connection_values(struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIterator iterator, void *iterator_cls)
Definition: connection.c:356
int MHD_run(struct MHD_Daemon *daemon)
Definition: daemon.c:4458
MHD_OPTION
MHD options.
Definition: microhttpd.h:1168
void * apc_cls
Definition: internal.h:1319
MHD_ContentReaderCallback crc
Definition: internal.h:309
void * crc_cls
Definition: internal.h:303
MHD_DaemonInfoType
Definition: microhttpd.h:1804
void MHD_resume_connection(struct MHD_Connection *connection)
Definition: daemon.c:2799
const char * MHD_get_version(void)
Definition: daemon.c:6511
_MHD_EXTERN int MHD_is_feature_supported(enum MHD_FEATURE feature)
Definition: daemon.c:6545
struct sockaddr * client_addr
Definition: microhttpd.h:1697
int MHD_del_response_header(struct MHD_Response *response, const char *header, const char *content)
Definition: response.c:159
#define _MHD_DEPR_MACRO(msg)
Definition: microhttpd.h:235
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:1068
struct MHD_Response * MHD_create_response_from_fd(size_t size, int fd)
Definition: response.c:521
_MHD_EXTERN MHD_socket MHD_quiesce_daemon(struct MHD_Daemon *daemon)
Definition: daemon.c:4642
int(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
Definition: microhttpd.h:1873
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
Definition: microhttpd.h:1966
_MHD_EXTERN const char * MHD_get_reason_phrase_for(unsigned int code)
enum MHD_OPTION option
Definition: microhttpd.h:1502
struct MHD_Response * MHD_create_response_from_fd_at_offset(size_t size, int fd, off_t offset)
Definition: response.c:452
size_t MHD_http_unescape(char *val)
Definition: internal.c:138
int MHD_set_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, const char *value)
Definition: connection.c:408
MHD_FLAG
Flags for the struct MHD_Daemon.
Definition: microhttpd.h:882
int MHD_get_response_headers(struct MHD_Response *response, MHD_KeyValueIterator iterator, void *iterator_cls)
Definition: response.c:205