80 #ifndef MHD_MICROHTTPD_H 81 #define MHD_MICROHTTPD_H 99 #define MHD_VERSION 0x01000100 109 #ifndef MHD_PLATFORM_H 110 #if defined(_WIN32) && ! defined(__CYGWIN__) && \ 111 ! defined(_CRT_DECLARE_NONSTDC_NAMES) 113 #define _CRT_DECLARE_NONSTDC_NAMES 1 117 #include <sys/types.h> 118 #if ! defined(_WIN32) || defined(__CYGWIN__) 120 #include <sys/time.h> 121 #include <sys/socket.h> 123 #include <ws2tcpip.h> 124 #if defined(_MSC_FULL_VER) && ! defined(_SSIZE_T_DEFINED) 125 #define _SSIZE_T_DEFINED 126 typedef intptr_t ssize_t;
131 #if defined(__CYGWIN__) && ! defined(_SYS_TYPES_FD_SET) 133 #error Cygwin with winsock fd_set is not supported 136 #ifdef __has_attribute 137 #if __has_attribute (flag_enum) 138 #define _MHD_FLAGS_ENUM __attribute__((flag_enum)) 140 #if __has_attribute (enum_extensibility) 141 #define _MHD_FIXED_ENUM __attribute__((enum_extensibility (closed))) 145 #ifndef _MHD_FLAGS_ENUM 146 #define _MHD_FLAGS_ENUM 148 #ifndef _MHD_FIXED_ENUM 149 #define _MHD_FIXED_ENUM 152 #define _MHD_FIXED_FLAGS_ENUM _MHD_FIXED_ENUM _MHD_FLAGS_ENUM 176 #define MHD_SIZE_UNKNOWN UINT64_MAX 178 #define MHD_SIZE_UNKNOWN ((uint64_t) -1LL) 181 #define MHD_CONTENT_READER_END_OF_STREAM ((ssize_t) -1) 182 #define MHD_CONTENT_READER_END_WITH_ERROR ((ssize_t) -2) 185 #if defined(_WIN32) && defined(MHD_W32LIB) 186 #define _MHD_EXTERN extern 187 #elif defined(_WIN32) && defined(MHD_W32DLL) 189 #define _MHD_EXTERN __declspec(dllimport) 191 #define _MHD_EXTERN extern 195 #ifndef MHD_SOCKET_DEFINED 199 #if ! defined(_WIN32) || defined(_SYS_TYPES_FD_SET) 200 #define MHD_POSIX_SOCKETS 1 202 #define MHD_INVALID_SOCKET (-1) 204 #define MHD_WINSOCK_SOCKETS 1 205 #include <winsock2.h> 207 #define MHD_INVALID_SOCKET (INVALID_SOCKET) 209 #define MHD_SOCKET_DEFINED 1 215 #ifdef MHD_NO_DEPRECATION 216 #define _MHD_DEPR_MACRO(msg) 217 #define _MHD_NO_DEPR_IN_MACRO 1 218 #define _MHD_DEPR_IN_MACRO(msg) 219 #define _MHD_NO_DEPR_FUNC 1 220 #define _MHD_DEPR_FUNC(msg) 223 #ifndef _MHD_DEPR_MACRO 224 #if defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1500 227 #define _MHD_INSTRMACRO(a) #a 228 #define _MHD_STRMACRO(a) _MHD_INSTRMACRO (a) 230 #define _MHD_DEPR_MACRO(msg) \ 231 __pragma(message (__FILE__ "(" _MHD_STRMACRO ( __LINE__) "): warning: " msg)) 232 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg) 233 #elif defined(__clang__) || defined(__GNUC_PATCHLEVEL__) 235 #define _MHD_GCC_PRAG(x) _Pragma(#x) 236 #if (defined(__clang__) && \ 237 (__clang_major__ + 0 >= 5 || \ 238 (! defined(__apple_build_version__) && \ 239 (__clang_major__ + 0 > 3 || \ 240 (__clang_major__ + 0 == 3 && __clang_minor__ >= 3))))) || \ 241 __GNUC__ + 0 > 4 || (__GNUC__ + 0 == 4 && __GNUC_MINOR__ + 0 >= 8) 244 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG (GCC warning msg) 245 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg) 248 #define _MHD_DEPR_MACRO(msg) _MHD_GCC_PRAG (message msg) 249 #if (defined(__clang__) && \ 250 (__clang_major__ + 0 > 2 || \ 251 (__clang_major__ + 0 == 2 && __clang_minor__ >= 9))) 253 #define _MHD_DEPR_IN_MACRO(msg) _MHD_DEPR_MACRO (msg) 260 #ifndef _MHD_DEPR_MACRO 261 #define _MHD_DEPR_MACRO(msg) 264 #ifndef _MHD_DEPR_IN_MACRO 265 #define _MHD_NO_DEPR_IN_MACRO 1 266 #define _MHD_DEPR_IN_MACRO(msg) 269 #ifndef _MHD_DEPR_FUNC 270 #if defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1400 272 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated (msg)) 273 #elif defined(_MSC_FULL_VER) && _MSC_VER + 0 >= 1310 275 #define _MHD_DEPR_FUNC(msg) __declspec(deprecated) 276 #elif (__GNUC__ + 0 >= 5) || (defined(__clang__) && \ 277 (__clang_major__ + 0 > 2 || \ 278 (__clang_major__ + 0 == 2 && __clang_minor__ >= 9))) 280 #define _MHD_DEPR_FUNC(msg) __attribute__((deprecated (msg))) 281 #elif defined(__clang__) || __GNUC__ + 0 > 3 || \ 282 (__GNUC__ + 0 == 3 && __GNUC_MINOR__ + 0 >= 1) 285 #define _MHD_DEPR_FUNC(msg) __attribute__((__deprecated__)) 290 #ifndef _MHD_DEPR_FUNC 291 #define _MHD_NO_DEPR_FUNC 1 292 #define _MHD_DEPR_FUNC(msg) 300 #ifndef MHD_LONG_LONG 304 #define MHD_LONG_LONG long long 305 #define MHD_UNSIGNED_LONG_LONG unsigned long long 308 "Macro MHD_LONG_LONG is deprecated, use MHD_UNSIGNED_LONG_LONG")
314 #ifndef MHD_LONG_LONG_PRINTF 318 #define MHD_LONG_LONG_PRINTF "ll" 319 #define MHD_UNSIGNED_LONG_LONG_PRINTF "%llu" 322 "Macro MHD_LONG_LONG_PRINTF is deprecated, use MHD_UNSIGNED_LONG_LONG_PRINTF")
335 #define MHD_HTTP_CONTINUE 100 337 #define MHD_HTTP_SWITCHING_PROTOCOLS 101 339 #define MHD_HTTP_PROCESSING 102 341 #define MHD_HTTP_EARLY_HINTS 103 344 #define MHD_HTTP_OK 200 346 #define MHD_HTTP_CREATED 201 348 #define MHD_HTTP_ACCEPTED 202 350 #define MHD_HTTP_NON_AUTHORITATIVE_INFORMATION 203 352 #define MHD_HTTP_NO_CONTENT 204 354 #define MHD_HTTP_RESET_CONTENT 205 356 #define MHD_HTTP_PARTIAL_CONTENT 206 358 #define MHD_HTTP_MULTI_STATUS 207 360 #define MHD_HTTP_ALREADY_REPORTED 208 363 #define MHD_HTTP_IM_USED 226 366 #define MHD_HTTP_MULTIPLE_CHOICES 300 368 #define MHD_HTTP_MOVED_PERMANENTLY 301 370 #define MHD_HTTP_FOUND 302 372 #define MHD_HTTP_SEE_OTHER 303 374 #define MHD_HTTP_NOT_MODIFIED 304 376 #define MHD_HTTP_USE_PROXY 305 378 #define MHD_HTTP_SWITCH_PROXY 306 380 #define MHD_HTTP_TEMPORARY_REDIRECT 307 382 #define MHD_HTTP_PERMANENT_REDIRECT 308 385 #define MHD_HTTP_BAD_REQUEST 400 387 #define MHD_HTTP_UNAUTHORIZED 401 389 #define MHD_HTTP_PAYMENT_REQUIRED 402 391 #define MHD_HTTP_FORBIDDEN 403 393 #define MHD_HTTP_NOT_FOUND 404 395 #define MHD_HTTP_METHOD_NOT_ALLOWED 405 397 #define MHD_HTTP_NOT_ACCEPTABLE 406 399 #define MHD_HTTP_PROXY_AUTHENTICATION_REQUIRED 407 401 #define MHD_HTTP_REQUEST_TIMEOUT 408 403 #define MHD_HTTP_CONFLICT 409 405 #define MHD_HTTP_GONE 410 407 #define MHD_HTTP_LENGTH_REQUIRED 411 409 #define MHD_HTTP_PRECONDITION_FAILED 412 411 #define MHD_HTTP_CONTENT_TOO_LARGE 413 413 #define MHD_HTTP_URI_TOO_LONG 414 415 #define MHD_HTTP_UNSUPPORTED_MEDIA_TYPE 415 417 #define MHD_HTTP_RANGE_NOT_SATISFIABLE 416 419 #define MHD_HTTP_EXPECTATION_FAILED 417 423 #define MHD_HTTP_MISDIRECTED_REQUEST 421 425 #define MHD_HTTP_UNPROCESSABLE_CONTENT 422 427 #define MHD_HTTP_LOCKED 423 429 #define MHD_HTTP_FAILED_DEPENDENCY 424 431 #define MHD_HTTP_TOO_EARLY 425 433 #define MHD_HTTP_UPGRADE_REQUIRED 426 436 #define MHD_HTTP_PRECONDITION_REQUIRED 428 438 #define MHD_HTTP_TOO_MANY_REQUESTS 429 441 #define MHD_HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431 444 #define MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451 447 #define MHD_HTTP_INTERNAL_SERVER_ERROR 500 449 #define MHD_HTTP_NOT_IMPLEMENTED 501 451 #define MHD_HTTP_BAD_GATEWAY 502 453 #define MHD_HTTP_SERVICE_UNAVAILABLE 503 455 #define MHD_HTTP_GATEWAY_TIMEOUT 504 457 #define MHD_HTTP_HTTP_VERSION_NOT_SUPPORTED 505 459 #define MHD_HTTP_VARIANT_ALSO_NEGOTIATES 506 461 #define MHD_HTTP_INSUFFICIENT_STORAGE 507 463 #define MHD_HTTP_LOOP_DETECTED 508 466 #define MHD_HTTP_NOT_EXTENDED 510 468 #define MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED 511 473 #define MHD_HTTP_RETRY_WITH 449 476 #define MHD_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450 479 #define MHD_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509 483 #define MHD_HTTP_METHOD_NOT_ACCEPTABLE _MHD_DEPR_IN_MACRO (\ 484 "Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE" \ 488 #define MHD_HTTP_REQUEST_ENTITY_TOO_LARGE _MHD_DEPR_IN_MACRO (\ 489 "Value MHD_HTTP_REQUEST_ENTITY_TOO_LARGE is deprecated, use MHD_HTTP_CONTENT_TOO_LARGE"\ 493 #define MHD_HTTP_PAYLOAD_TOO_LARGE _MHD_DEPR_IN_MACRO (\ 494 "Value MHD_HTTP_PAYLOAD_TOO_LARGE is deprecated use MHD_HTTP_CONTENT_TOO_LARGE" \ 498 #define MHD_HTTP_REQUEST_URI_TOO_LONG _MHD_DEPR_IN_MACRO (\ 499 "Value MHD_HTTP_REQUEST_URI_TOO_LONG is deprecated, use MHD_HTTP_URI_TOO_LONG" \ 503 #define MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE _MHD_DEPR_IN_MACRO (\ 504 "Value MHD_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE is deprecated, use MHD_HTTP_RANGE_NOT_SATISFIABLE" \ 508 #define MHD_HTTP_UNPROCESSABLE_ENTITY _MHD_DEPR_IN_MACRO (\ 509 "Value MHD_HTTP_UNPROCESSABLE_ENTITY is deprecated, use MHD_HTTP_UNPROCESSABLE_CONTENT" \ 513 #define MHD_HTTP_UNORDERED_COLLECTION _MHD_DEPR_IN_MACRO (\ 514 "Value MHD_HTTP_UNORDERED_COLLECTION is deprecated as it was removed from RFC" \ 518 #define MHD_HTTP_NO_RESPONSE _MHD_DEPR_IN_MACRO (\ 519 "Value MHD_HTTP_NO_RESPONSE is deprecated as it is nginx internal code for logs only"\ 550 #define MHD_ICY_FLAG ((uint32_t) (((uint32_t) 1) << 31)) 562 #define MHD_HTTP_HEADER_ACCEPT "Accept" 564 #define MHD_HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset" 566 #define MHD_HTTP_HEADER_ACCEPT_ENCODING "Accept-Encoding" 568 #define MHD_HTTP_HEADER_ACCEPT_LANGUAGE "Accept-Language" 570 #define MHD_HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges" 572 #define MHD_HTTP_HEADER_AGE "Age" 574 #define MHD_HTTP_HEADER_ALLOW "Allow" 576 #define MHD_HTTP_HEADER_AUTHENTICATION_INFO "Authentication-Info" 578 #define MHD_HTTP_HEADER_AUTHORIZATION "Authorization" 580 #define MHD_HTTP_HEADER_CACHE_CONTROL "Cache-Control" 582 #define MHD_HTTP_HEADER_CLOSE "Close" 584 #define MHD_HTTP_HEADER_CONNECTION "Connection" 586 #define MHD_HTTP_HEADER_CONTENT_ENCODING "Content-Encoding" 588 #define MHD_HTTP_HEADER_CONTENT_LANGUAGE "Content-Language" 590 #define MHD_HTTP_HEADER_CONTENT_LENGTH "Content-Length" 592 #define MHD_HTTP_HEADER_CONTENT_LOCATION "Content-Location" 594 #define MHD_HTTP_HEADER_CONTENT_RANGE "Content-Range" 596 #define MHD_HTTP_HEADER_CONTENT_TYPE "Content-Type" 598 #define MHD_HTTP_HEADER_DATE "Date" 600 #define MHD_HTTP_HEADER_ETAG "ETag" 602 #define MHD_HTTP_HEADER_EXPECT "Expect" 604 #define MHD_HTTP_HEADER_EXPIRES "Expires" 606 #define MHD_HTTP_HEADER_FROM "From" 608 #define MHD_HTTP_HEADER_HOST "Host" 610 #define MHD_HTTP_HEADER_IF_MATCH "If-Match" 612 #define MHD_HTTP_HEADER_IF_MODIFIED_SINCE "If-Modified-Since" 614 #define MHD_HTTP_HEADER_IF_NONE_MATCH "If-None-Match" 616 #define MHD_HTTP_HEADER_IF_RANGE "If-Range" 618 #define MHD_HTTP_HEADER_IF_UNMODIFIED_SINCE "If-Unmodified-Since" 620 #define MHD_HTTP_HEADER_LAST_MODIFIED "Last-Modified" 622 #define MHD_HTTP_HEADER_LOCATION "Location" 624 #define MHD_HTTP_HEADER_MAX_FORWARDS "Max-Forwards" 626 #define MHD_HTTP_HEADER_MIME_VERSION "MIME-Version" 628 #define MHD_HTTP_HEADER_PRAGMA "Pragma" 630 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATE "Proxy-Authenticate" 632 #define MHD_HTTP_HEADER_PROXY_AUTHENTICATION_INFO "Proxy-Authentication-Info" 634 #define MHD_HTTP_HEADER_PROXY_AUTHORIZATION "Proxy-Authorization" 636 #define MHD_HTTP_HEADER_RANGE "Range" 638 #define MHD_HTTP_HEADER_REFERER "Referer" 640 #define MHD_HTTP_HEADER_RETRY_AFTER "Retry-After" 642 #define MHD_HTTP_HEADER_SERVER "Server" 644 #define MHD_HTTP_HEADER_TE "TE" 646 #define MHD_HTTP_HEADER_TRAILER "Trailer" 648 #define MHD_HTTP_HEADER_TRANSFER_ENCODING "Transfer-Encoding" 650 #define MHD_HTTP_HEADER_UPGRADE "Upgrade" 652 #define MHD_HTTP_HEADER_USER_AGENT "User-Agent" 654 #define MHD_HTTP_HEADER_VARY "Vary" 656 #define MHD_HTTP_HEADER_VIA "Via" 658 #define MHD_HTTP_HEADER_WWW_AUTHENTICATE "WWW-Authenticate" 660 #define MHD_HTTP_HEADER_ASTERISK "*" 664 #define MHD_HTTP_HEADER_A_IM "A-IM" 666 #define MHD_HTTP_HEADER_ACCEPT_ADDITIONS "Accept-Additions" 668 #define MHD_HTTP_HEADER_ACCEPT_CH "Accept-CH" 670 #define MHD_HTTP_HEADER_ACCEPT_DATETIME "Accept-Datetime" 672 #define MHD_HTTP_HEADER_ACCEPT_FEATURES "Accept-Features" 674 #define MHD_HTTP_HEADER_ACCEPT_PATCH "Accept-Patch" 676 #define MHD_HTTP_HEADER_ACCEPT_POST "Accept-Post" 678 #define MHD_HTTP_HEADER_ACCEPT_SIGNATURE "Accept-Signature" 680 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_CREDENTIALS \ 681 "Access-Control-Allow-Credentials" 683 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_HEADERS \ 684 "Access-Control-Allow-Headers" 686 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_METHODS \ 687 "Access-Control-Allow-Methods" 689 #define MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN \ 690 "Access-Control-Allow-Origin" 692 #define MHD_HTTP_HEADER_ACCESS_CONTROL_EXPOSE_HEADERS \ 693 "Access-Control-Expose-Headers" 695 #define MHD_HTTP_HEADER_ACCESS_CONTROL_MAX_AGE "Access-Control-Max-Age" 697 #define MHD_HTTP_HEADER_ACCESS_CONTROL_REQUEST_HEADERS \ 698 "Access-Control-Request-Headers" 700 #define MHD_HTTP_HEADER_ACCESS_CONTROL_REQUEST_METHOD \ 701 "Access-Control-Request-Method" 703 #define MHD_HTTP_HEADER_ALPN "ALPN" 705 #define MHD_HTTP_HEADER_ALT_SVC "Alt-Svc" 707 #define MHD_HTTP_HEADER_ALT_USED "Alt-Used" 709 #define MHD_HTTP_HEADER_ALTERNATES "Alternates" 711 #define MHD_HTTP_HEADER_APPLY_TO_REDIRECT_REF "Apply-To-Redirect-Ref" 713 #define MHD_HTTP_HEADER_AUTHENTICATION_CONTROL "Authentication-Control" 715 #define MHD_HTTP_HEADER_CACHE_STATUS "Cache-Status" 717 #define MHD_HTTP_HEADER_CAL_MANAGED_ID "Cal-Managed-ID" 719 #define MHD_HTTP_HEADER_CALDAV_TIMEZONES "CalDAV-Timezones" 721 #define MHD_HTTP_HEADER_CAPSULE_PROTOCOL "Capsule-Protocol" 723 #define MHD_HTTP_HEADER_CDN_CACHE_CONTROL "CDN-Cache-Control" 725 #define MHD_HTTP_HEADER_CDN_LOOP "CDN-Loop" 727 #define MHD_HTTP_HEADER_CERT_NOT_AFTER "Cert-Not-After" 729 #define MHD_HTTP_HEADER_CERT_NOT_BEFORE "Cert-Not-Before" 731 #define MHD_HTTP_HEADER_CLEAR_SITE_DATA "Clear-Site-Data" 733 #define MHD_HTTP_HEADER_CLIENT_CERT "Client-Cert" 735 #define MHD_HTTP_HEADER_CLIENT_CERT_CHAIN "Client-Cert-Chain" 737 #define MHD_HTTP_HEADER_CONTENT_DIGEST "Content-Digest" 739 #define MHD_HTTP_HEADER_CONTENT_DISPOSITION "Content-Disposition" 741 #define MHD_HTTP_HEADER_CONTENT_ID "Content-ID" 743 #define MHD_HTTP_HEADER_CONTENT_SECURITY_POLICY "Content-Security-Policy" 745 #define MHD_HTTP_HEADER_CONTENT_SECURITY_POLICY_REPORT_ONLY \ 746 "Content-Security-Policy-Report-Only" 748 #define MHD_HTTP_HEADER_COOKIE "Cookie" 750 #define MHD_HTTP_HEADER_CROSS_ORIGIN_EMBEDDER_POLICY \ 751 "Cross-Origin-Embedder-Policy" 753 #define MHD_HTTP_HEADER_CROSS_ORIGIN_EMBEDDER_POLICY_REPORT_ONLY \ 754 "Cross-Origin-Embedder-Policy-Report-Only" 756 #define MHD_HTTP_HEADER_CROSS_ORIGIN_OPENER_POLICY "Cross-Origin-Opener-Policy" 758 #define MHD_HTTP_HEADER_CROSS_ORIGIN_OPENER_POLICY_REPORT_ONLY \ 759 "Cross-Origin-Opener-Policy-Report-Only" 761 #define MHD_HTTP_HEADER_CROSS_ORIGIN_RESOURCE_POLICY \ 762 "Cross-Origin-Resource-Policy" 764 #define MHD_HTTP_HEADER_DASL "DASL" 766 #define MHD_HTTP_HEADER_DAV "DAV" 768 #define MHD_HTTP_HEADER_DELTA_BASE "Delta-Base" 770 #define MHD_HTTP_HEADER_DEPTH "Depth" 772 #define MHD_HTTP_HEADER_DESTINATION "Destination" 774 #define MHD_HTTP_HEADER_DIFFERENTIAL_ID "Differential-ID" 776 #define MHD_HTTP_HEADER_DPOP "DPoP" 778 #define MHD_HTTP_HEADER_DPOP_NONCE "DPoP-Nonce" 780 #define MHD_HTTP_HEADER_EARLY_DATA "Early-Data" 782 #define MHD_HTTP_HEADER_EXPECT_CT "Expect-CT" 784 #define MHD_HTTP_HEADER_FORWARDED "Forwarded" 786 #define MHD_HTTP_HEADER_HOBAREG "Hobareg" 788 #define MHD_HTTP_HEADER_IF "If" 790 #define MHD_HTTP_HEADER_IF_SCHEDULE_TAG_MATCH "If-Schedule-Tag-Match" 792 #define MHD_HTTP_HEADER_IM "IM" 794 #define MHD_HTTP_HEADER_INCLUDE_REFERRED_TOKEN_BINDING_ID \ 795 "Include-Referred-Token-Binding-ID" 797 #define MHD_HTTP_HEADER_KEEP_ALIVE "Keep-Alive" 799 #define MHD_HTTP_HEADER_LABEL "Label" 801 #define MHD_HTTP_HEADER_LAST_EVENT_ID "Last-Event-ID" 803 #define MHD_HTTP_HEADER_LINK "Link" 805 #define MHD_HTTP_HEADER_LOCK_TOKEN "Lock-Token" 807 #define MHD_HTTP_HEADER_MEMENTO_DATETIME "Memento-Datetime" 809 #define MHD_HTTP_HEADER_METER "Meter" 811 #define MHD_HTTP_HEADER_NEGOTIATE "Negotiate" 813 #define MHD_HTTP_HEADER_NEL "NEL" 815 #define MHD_HTTP_HEADER_ODATA_ENTITYID "OData-EntityId" 817 #define MHD_HTTP_HEADER_ODATA_ISOLATION "OData-Isolation" 819 #define MHD_HTTP_HEADER_ODATA_MAXVERSION "OData-MaxVersion" 821 #define MHD_HTTP_HEADER_ODATA_VERSION "OData-Version" 823 #define MHD_HTTP_HEADER_OPTIONAL_WWW_AUTHENTICATE "Optional-WWW-Authenticate" 825 #define MHD_HTTP_HEADER_ORDERING_TYPE "Ordering-Type" 827 #define MHD_HTTP_HEADER_ORIGIN "Origin" 829 #define MHD_HTTP_HEADER_ORIGIN_AGENT_CLUSTER "Origin-Agent-Cluster" 831 #define MHD_HTTP_HEADER_OSCORE "OSCORE" 833 #define MHD_HTTP_HEADER_OSLC_CORE_VERSION "OSLC-Core-Version" 835 #define MHD_HTTP_HEADER_OVERWRITE "Overwrite" 837 #define MHD_HTTP_HEADER_PING_FROM "Ping-From" 839 #define MHD_HTTP_HEADER_PING_TO "Ping-To" 841 #define MHD_HTTP_HEADER_POSITION "Position" 843 #define MHD_HTTP_HEADER_PREFER "Prefer" 845 #define MHD_HTTP_HEADER_PREFERENCE_APPLIED "Preference-Applied" 847 #define MHD_HTTP_HEADER_PRIORITY "Priority" 849 #define MHD_HTTP_HEADER_PROXY_STATUS "Proxy-Status" 851 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS "Public-Key-Pins" 853 #define MHD_HTTP_HEADER_PUBLIC_KEY_PINS_REPORT_ONLY \ 854 "Public-Key-Pins-Report-Only" 856 #define MHD_HTTP_HEADER_REDIRECT_REF "Redirect-Ref" 858 #define MHD_HTTP_HEADER_REFRESH "Refresh" 860 #define MHD_HTTP_HEADER_REPLAY_NONCE "Replay-Nonce" 862 #define MHD_HTTP_HEADER_REPR_DIGEST "Repr-Digest" 864 #define MHD_HTTP_HEADER_SCHEDULE_REPLY "Schedule-Reply" 866 #define MHD_HTTP_HEADER_SCHEDULE_TAG "Schedule-Tag" 868 #define MHD_HTTP_HEADER_SEC_PURPOSE "Sec-Purpose" 870 #define MHD_HTTP_HEADER_SEC_TOKEN_BINDING "Sec-Token-Binding" 872 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_ACCEPT "Sec-WebSocket-Accept" 874 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_EXTENSIONS "Sec-WebSocket-Extensions" 876 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_KEY "Sec-WebSocket-Key" 878 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_PROTOCOL "Sec-WebSocket-Protocol" 880 #define MHD_HTTP_HEADER_SEC_WEBSOCKET_VERSION "Sec-WebSocket-Version" 882 #define MHD_HTTP_HEADER_SERVER_TIMING "Server-Timing" 884 #define MHD_HTTP_HEADER_SET_COOKIE "Set-Cookie" 886 #define MHD_HTTP_HEADER_SIGNATURE "Signature" 888 #define MHD_HTTP_HEADER_SIGNATURE_INPUT "Signature-Input" 890 #define MHD_HTTP_HEADER_SLUG "SLUG" 892 #define MHD_HTTP_HEADER_SOAPACTION "SoapAction" 894 #define MHD_HTTP_HEADER_STATUS_URI "Status-URI" 896 #define MHD_HTTP_HEADER_STRICT_TRANSPORT_SECURITY "Strict-Transport-Security" 898 #define MHD_HTTP_HEADER_SUNSET "Sunset" 900 #define MHD_HTTP_HEADER_SURROGATE_CAPABILITY "Surrogate-Capability" 902 #define MHD_HTTP_HEADER_SURROGATE_CONTROL "Surrogate-Control" 904 #define MHD_HTTP_HEADER_TCN "TCN" 906 #define MHD_HTTP_HEADER_TIMEOUT "Timeout" 908 #define MHD_HTTP_HEADER_TOPIC "Topic" 910 #define MHD_HTTP_HEADER_TRACEPARENT "Traceparent" 912 #define MHD_HTTP_HEADER_TRACESTATE "Tracestate" 914 #define MHD_HTTP_HEADER_TTL "TTL" 916 #define MHD_HTTP_HEADER_URGENCY "Urgency" 918 #define MHD_HTTP_HEADER_VARIANT_VARY "Variant-Vary" 920 #define MHD_HTTP_HEADER_WANT_CONTENT_DIGEST "Want-Content-Digest" 922 #define MHD_HTTP_HEADER_WANT_REPR_DIGEST "Want-Repr-Digest" 924 #define MHD_HTTP_HEADER_X_CONTENT_TYPE_OPTIONS "X-Content-Type-Options" 926 #define MHD_HTTP_HEADER_X_FRAME_OPTIONS "X-Frame-Options" 928 #define MHD_HTTP_HEADER_AMP_CACHE_TRANSFORM "AMP-Cache-Transform" 930 #define MHD_HTTP_HEADER_CONFIGURATION_CONTEXT "Configuration-Context" 932 #define MHD_HTTP_HEADER_EDIINT_FEATURES "EDIINT-Features" 934 #define MHD_HTTP_HEADER_ISOLATION "Isolation" 936 #define MHD_HTTP_HEADER_PERMISSIONS_POLICY "Permissions-Policy" 938 #define MHD_HTTP_HEADER_REPEATABILITY_CLIENT_ID "Repeatability-Client-ID" 940 #define MHD_HTTP_HEADER_REPEATABILITY_FIRST_SENT "Repeatability-First-Sent" 942 #define MHD_HTTP_HEADER_REPEATABILITY_REQUEST_ID "Repeatability-Request-ID" 944 #define MHD_HTTP_HEADER_REPEATABILITY_RESULT "Repeatability-Result" 946 #define MHD_HTTP_HEADER_REPORTING_ENDPOINTS "Reporting-Endpoints" 948 #define MHD_HTTP_HEADER_SEC_GPC "Sec-GPC" 950 #define MHD_HTTP_HEADER_TIMING_ALLOW_ORIGIN "Timing-Allow-Origin" 952 #define MHD_HTTP_HEADER_C_PEP_INFO "C-PEP-Info" 954 #define MHD_HTTP_HEADER_PROTOCOL_INFO "Protocol-Info" 956 #define MHD_HTTP_HEADER_PROTOCOL_QUERY "Protocol-Query" 958 #define MHD_HTTP_HEADER_ACCESS_CONTROL "Access-Control" 960 #define MHD_HTTP_HEADER_C_EXT "C-Ext" 962 #define MHD_HTTP_HEADER_C_MAN "C-Man" 964 #define MHD_HTTP_HEADER_C_OPT "C-Opt" 966 #define MHD_HTTP_HEADER_C_PEP "C-PEP" 968 #define MHD_HTTP_HEADER_CONTENT_BASE "Content-Base" 970 #define MHD_HTTP_HEADER_CONTENT_MD5 "Content-MD5" 972 #define MHD_HTTP_HEADER_CONTENT_SCRIPT_TYPE "Content-Script-Type" 974 #define MHD_HTTP_HEADER_CONTENT_STYLE_TYPE "Content-Style-Type" 976 #define MHD_HTTP_HEADER_CONTENT_VERSION "Content-Version" 978 #define MHD_HTTP_HEADER_COOKIE2 "Cookie2" 980 #define MHD_HTTP_HEADER_DEFAULT_STYLE "Default-Style" 982 #define MHD_HTTP_HEADER_DERIVED_FROM "Derived-From" 984 #define MHD_HTTP_HEADER_DIGEST "Digest" 986 #define MHD_HTTP_HEADER_EXT "Ext" 988 #define MHD_HTTP_HEADER_GETPROFILE "GetProfile" 990 #define MHD_HTTP_HEADER_HTTP2_SETTINGS "HTTP2-Settings" 992 #define MHD_HTTP_HEADER_MAN "Man" 994 #define MHD_HTTP_HEADER_METHOD_CHECK "Method-Check" 996 #define MHD_HTTP_HEADER_METHOD_CHECK_EXPIRES "Method-Check-Expires" 998 #define MHD_HTTP_HEADER_OPT "Opt" 1000 #define MHD_HTTP_HEADER_P3P "P3P" 1002 #define MHD_HTTP_HEADER_PEP "PEP" 1004 #define MHD_HTTP_HEADER_PEP_INFO "Pep-Info" 1006 #define MHD_HTTP_HEADER_PICS_LABEL "PICS-Label" 1008 #define MHD_HTTP_HEADER_PROFILEOBJECT "ProfileObject" 1010 #define MHD_HTTP_HEADER_PROTOCOL "Protocol" 1012 #define MHD_HTTP_HEADER_PROTOCOL_REQUEST "Protocol-Request" 1014 #define MHD_HTTP_HEADER_PROXY_FEATURES "Proxy-Features" 1016 #define MHD_HTTP_HEADER_PROXY_INSTRUCTION "Proxy-Instruction" 1018 #define MHD_HTTP_HEADER_PUBLIC "Public" 1020 #define MHD_HTTP_HEADER_REFERER_ROOT "Referer-Root" 1022 #define MHD_HTTP_HEADER_SAFE "Safe" 1024 #define MHD_HTTP_HEADER_SECURITY_SCHEME "Security-Scheme" 1026 #define MHD_HTTP_HEADER_SET_COOKIE2 "Set-Cookie2" 1028 #define MHD_HTTP_HEADER_SETPROFILE "SetProfile" 1030 #define MHD_HTTP_HEADER_URI "URI" 1032 #define MHD_HTTP_HEADER_WANT_DIGEST "Want-Digest" 1034 #define MHD_HTTP_HEADER_WARNING "Warning" 1038 #define MHD_HTTP_HEADER_COMPLIANCE "Compliance" 1040 #define MHD_HTTP_HEADER_CONTENT_TRANSFER_ENCODING "Content-Transfer-Encoding" 1042 #define MHD_HTTP_HEADER_COST "Cost" 1044 #define MHD_HTTP_HEADER_MESSAGE_ID "Message-ID" 1046 #define MHD_HTTP_HEADER_NON_COMPLIANCE "Non-Compliance" 1048 #define MHD_HTTP_HEADER_OPTIONAL "Optional" 1050 #define MHD_HTTP_HEADER_RESOLUTION_HINT "Resolution-Hint" 1052 #define MHD_HTTP_HEADER_RESOLVER_LOCATION "Resolver-Location" 1054 #define MHD_HTTP_HEADER_SUBOK "SubOK" 1056 #define MHD_HTTP_HEADER_SUBST "Subst" 1058 #define MHD_HTTP_HEADER_TITLE "Title" 1060 #define MHD_HTTP_HEADER_UA_COLOR "UA-Color" 1062 #define MHD_HTTP_HEADER_UA_MEDIA "UA-Media" 1064 #define MHD_HTTP_HEADER_UA_PIXELS "UA-Pixels" 1066 #define MHD_HTTP_HEADER_UA_RESOLUTION "UA-Resolution" 1068 #define MHD_HTTP_HEADER_UA_WINDOWPIXELS "UA-Windowpixels" 1070 #define MHD_HTTP_HEADER_VERSION "Version" 1072 #define MHD_HTTP_HEADER_X_DEVICE_ACCEPT "X-Device-Accept" 1074 #define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_CHARSET "X-Device-Accept-Charset" 1076 #define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_ENCODING "X-Device-Accept-Encoding" 1078 #define MHD_HTTP_HEADER_X_DEVICE_ACCEPT_LANGUAGE "X-Device-Accept-Language" 1080 #define MHD_HTTP_HEADER_X_DEVICE_USER_AGENT "X-Device-User-Agent" 1090 #define MHD_HTTP_VERSION_1_0 "HTTP/1.0" 1091 #define MHD_HTTP_VERSION_1_1 "HTTP/1.1" 1105 #define MHD_HTTP_METHOD_GET "GET" 1107 #define MHD_HTTP_METHOD_HEAD "HEAD" 1109 #define MHD_HTTP_METHOD_POST "POST" 1111 #define MHD_HTTP_METHOD_PUT "PUT" 1113 #define MHD_HTTP_METHOD_DELETE "DELETE" 1115 #define MHD_HTTP_METHOD_CONNECT "CONNECT" 1117 #define MHD_HTTP_METHOD_OPTIONS "OPTIONS" 1119 #define MHD_HTTP_METHOD_TRACE "TRACE" 1123 #define MHD_HTTP_METHOD_ACL "ACL" 1125 #define MHD_HTTP_METHOD_BASELINE_CONTROL "BASELINE-CONTROL" 1127 #define MHD_HTTP_METHOD_BIND "BIND" 1129 #define MHD_HTTP_METHOD_CHECKIN "CHECKIN" 1131 #define MHD_HTTP_METHOD_CHECKOUT "CHECKOUT" 1133 #define MHD_HTTP_METHOD_COPY "COPY" 1135 #define MHD_HTTP_METHOD_LABEL "LABEL" 1137 #define MHD_HTTP_METHOD_LINK "LINK" 1139 #define MHD_HTTP_METHOD_LOCK "LOCK" 1141 #define MHD_HTTP_METHOD_MERGE "MERGE" 1143 #define MHD_HTTP_METHOD_MKACTIVITY "MKACTIVITY" 1145 #define MHD_HTTP_METHOD_MKCALENDAR "MKCALENDAR" 1147 #define MHD_HTTP_METHOD_MKCOL "MKCOL" 1149 #define MHD_HTTP_METHOD_MKREDIRECTREF "MKREDIRECTREF" 1151 #define MHD_HTTP_METHOD_MKWORKSPACE "MKWORKSPACE" 1153 #define MHD_HTTP_METHOD_MOVE "MOVE" 1155 #define MHD_HTTP_METHOD_ORDERPATCH "ORDERPATCH" 1157 #define MHD_HTTP_METHOD_PATCH "PATCH" 1159 #define MHD_HTTP_METHOD_PRI "PRI" 1161 #define MHD_HTTP_METHOD_PROPFIND "PROPFIND" 1163 #define MHD_HTTP_METHOD_PROPPATCH "PROPPATCH" 1165 #define MHD_HTTP_METHOD_REBIND "REBIND" 1167 #define MHD_HTTP_METHOD_REPORT "REPORT" 1169 #define MHD_HTTP_METHOD_SEARCH "SEARCH" 1171 #define MHD_HTTP_METHOD_UNBIND "UNBIND" 1173 #define MHD_HTTP_METHOD_UNCHECKOUT "UNCHECKOUT" 1175 #define MHD_HTTP_METHOD_UNLINK "UNLINK" 1177 #define MHD_HTTP_METHOD_UNLOCK "UNLOCK" 1179 #define MHD_HTTP_METHOD_UPDATE "UPDATE" 1181 #define MHD_HTTP_METHOD_UPDATEREDIRECTREF "UPDATEREDIRECTREF" 1183 #define MHD_HTTP_METHOD_VERSION_CONTROL "VERSION-CONTROL" 1185 #define MHD_HTTP_METHOD_ASTERISK "*" 1194 #define MHD_HTTP_POST_ENCODING_FORM_URLENCODED \ 1195 "application/x-www-form-urlencoded" 1196 #define MHD_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data" 1271 #define MHD_USE_SSL \ 1272 _MHD_DEPR_IN_MACRO ("Value MHD_USE_SSL is deprecated, use MHD_USE_TLS") \ 1302 #define MHD_USE_SELECT_INTERNALLY \ 1303 _MHD_DEPR_IN_MACRO ( \ 1304 "Value MHD_USE_SELECT_INTERNALLY is deprecated, use MHD_USE_INTERNAL_POLLING_THREAD instead") \ 1305 MHD_USE_INTERNAL_POLLING_THREAD 1326 #define MHD_USE_PEDANTIC_CHECKS \ 1327 _MHD_DEPR_IN_MACRO ( \ 1328 "Flag MHD_USE_PEDANTIC_CHECKS is deprecated, " \ 1329 "use option MHD_OPTION_CLIENT_DISCIPLINE_LVL instead") \ 1353 #define MHD_USE_POLL_INTERNALLY \ 1354 _MHD_DEPR_IN_MACRO ( \ 1355 "Value MHD_USE_POLL_INTERNALLY is deprecated, use MHD_USE_POLL_INTERNAL_THREAD instead") \ 1356 MHD_USE_POLL_INTERNAL_THREAD 1370 #define MHD_SUPPRESS_DATE_NO_CLOCK \ 1371 _MHD_DEPR_IN_MACRO ( \ 1372 "Value MHD_SUPPRESS_DATE_NO_CLOCK is deprecated, use MHD_USE_SUPPRESS_DATE_NO_CLOCK instead") \ 1373 MHD_USE_SUPPRESS_DATE_NO_CLOCK 1397 #define MHD_USE_EPOLL_LINUX_ONLY \ 1398 _MHD_DEPR_IN_MACRO ( \ 1399 "Value MHD_USE_EPOLL_LINUX_ONLY is deprecated, use MHD_USE_EPOLL") \ 1418 #define MHD_USE_EPOLL_INTERNALLY \ 1419 _MHD_DEPR_IN_MACRO ( \ 1420 "Value MHD_USE_EPOLL_INTERNALLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \ 1421 MHD_USE_EPOLL_INTERNAL_THREAD 1423 #define MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY \ 1424 _MHD_DEPR_IN_MACRO ( \ 1425 "Value MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY is deprecated, use MHD_USE_EPOLL_INTERNAL_THREAD") \ 1426 MHD_USE_EPOLL_INTERNAL_THREAD 1446 #define MHD_USE_PIPE_FOR_SHUTDOWN \ 1447 _MHD_DEPR_IN_MACRO ( \ 1448 "Value MHD_USE_PIPE_FOR_SHUTDOWN is deprecated, use MHD_USE_ITC") \ 1468 #define MHD_USE_EPOLL_TURBO \ 1469 _MHD_DEPR_IN_MACRO ( \ 1470 "Value MHD_USE_EPOLL_TURBO is deprecated, use MHD_USE_TURBO") \ 1483 #define MHD_USE_SUSPEND_RESUME \ 1484 _MHD_DEPR_IN_MACRO ( \ 1485 "Value MHD_USE_SUSPEND_RESUME is deprecated, use MHD_ALLOW_SUSPEND_RESUME instead") \ 1486 MHD_ALLOW_SUSPEND_RESUME 1580 const char *username,
2252 #define MHD_RESPONSE_HEADER_KIND \ 2253 _MHD_DEPR_IN_MACRO ( \ 2254 "Value MHD_RESPONSE_HEADER_KIND is deprecated and not used") \ 2255 MHD_RESPONSE_HEADER_KIND 2637 const char *reason);
2649 const struct sockaddr *addr,
2722 const char *version,
2723 const char *upload_data,
2724 size_t *upload_data_size,
2911 const char *filename,
2912 const char *content_type,
2913 const char *transfer_encoding,
3039 const struct sockaddr *addr,
3076 fd_set *read_fd_set,
3077 fd_set *write_fd_set,
3078 fd_set *except_fd_set,
3118 fd_set *read_fd_set,
3119 fd_set *write_fd_set,
3120 fd_set *except_fd_set,
3122 unsigned int fd_setsize);
3156 #define MHD_get_fdset(daemon,read_fd_set,write_fd_set,except_fd_set,max_fd) \ 3157 MHD_get_fdset2 ((daemon),(read_fd_set),(write_fd_set),(except_fd_set), \ 3158 (max_fd),FD_SETSIZE) 3436 const fd_set *read_fd_set,
3437 const fd_set *write_fd_set,
3438 const fd_set *except_fd_set);
3474 const fd_set *read_fd_set,
3475 const fd_set *write_fd_set,
3476 const fd_set *except_fd_set,
3477 unsigned int fd_setsize);
3510 #define MHD_run_from_select(d,r,w,e) \ 3511 MHD_run_from_select2((d),(r),(w),(e),(unsigned int)(FD_SETSIZE)) 3531 void *iterator_cls);
3551 void *iterator_cls);
3696 const char **value_ptr,
3697 size_t *value_size_ptr);
3747 unsigned int status_code,
3964 _MHD_DEPR_FUNC (
"MHD_create_response_from_data() is deprecated, " \
3965 "use MHD_create_response_from_buffer()") \
4061 const void *buffer);
4088 const void *buffer);
4238 _MHD_DEPR_FUNC (
"Function MHD_create_response_from_fd_at_offset() is " \
4239 "deprecated, use MHD_create_response_from_fd_at_offset64()") \
4245 #if ! defined(_MHD_NO_DEPR_IN_MACRO) || defined(_MHD_NO_DEPR_FUNC) 4248 #define MHD_create_response_from_fd_at_offset(size,fd,offset) \ 4249 _MHD_DEPR_IN_MACRO ( \ 4250 "Usage of MHD_create_response_from_fd_at_offset() is deprecated, use MHD_create_response_from_fd_at_offset64()") \ 4251 MHD_create_response_from_fd_at_offset64 ((size),(fd),(offset)) 4307 unsigned int iovcnt,
4365 struct MHD_UpgradeResponseHandle;
4437 const char *extra_in,
4438 size_t extra_in_size,
4440 struct MHD_UpgradeResponseHandle *urh);
4474 void *upgrade_handler_cls);
4542 const char *content);
4557 const char *content);
4577 const char *content);
4593 void *iterator_cls);
4657 const char *post_data,
4658 size_t post_data_len);
4683 #define MHD_MD5_DIGEST_SIZE 16 4690 #define MHD_SHA256_DIGEST_SIZE 32 4700 #define MHD_SHA512_256_DIGEST_SIZE 32 4740 #define MHD_DIGEST_AUTH_ALGO3_NON_SESSION (1 << 6) 4747 #define MHD_DIGEST_AUTH_ALGO3_SESSION (1 << 7) 4987 const char *username,
4990 size_t bin_buf_size);
5035 const char *username,
5038 size_t hex_buf_size);
5187 #define MHD_DIGEST_AUTH_INVALID_NC_VALUE (0) 5566 const char *password,
5567 unsigned int nonce_timeout,
5610 const char *password,
5611 void *userdigest_bin,
5612 size_t bin_buf_size);
5661 const void *userdigest,
5662 size_t userdigest_size,
5663 unsigned int nonce_timeout,
5740 int userhash_support,
5751 #define MHD_INVALID_NONCE -1 5819 const char *password,
5820 unsigned int nonce_timeout,
5846 const char *password,
5847 unsigned int nonce_timeout);
5873 const uint8_t *digest,
5875 unsigned int nonce_timeout,
5903 unsigned int nonce_timeout);
#define _MHD_DEPR_FUNC(msg)
enum MHD_Result(* MHD_PostDataIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *filename, const char *content_type, const char *transfer_encoding, const char *data, uint64_t off, size_t size)
_MHD_EXTERN enum MHD_Result MHD_run_from_select2(struct MHD_Daemon *daemon, const fd_set *read_fd_set, const fd_set *write_fd_set, const fd_set *except_fd_set, unsigned int fd_setsize)
_MHD_EXTERN enum MHD_Result MHD_digest_auth_calc_userhash(enum MHD_DigestAuthAlgo3 algo3, const char *username, const char *realm, void *userhash_bin, size_t bin_buf_size)
_MHD_EXTERN enum MHD_DigestAuthResult MHD_digest_auth_check_digest3(struct MHD_Connection *connection, const char *realm, const char *username, const void *userdigest, size_t userdigest_size, unsigned int nonce_timeout, uint32_t max_nc, enum MHD_DigestAuthMultiQOP mqop, enum MHD_DigestAuthMultiAlgo3 malgo3)
int(* MHD_PskServerCredentialsCallback)(void *cls, const struct MHD_Connection *connection, const char *username, void **psk, size_t *psk_size)
_MHD_EXTERN enum MHD_Result MHD_get_fdset2(struct MHD_Daemon *daemon, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, MHD_socket *max_fd, unsigned int fd_setsize)
_MHD_EXTERN enum MHD_Result MHD_queue_auth_required_response3(struct MHD_Connection *connection, const char *realm, const char *opaque, const char *domain, struct MHD_Response *response, int signal_stale, enum MHD_DigestAuthMultiQOP mqop, enum MHD_DigestAuthMultiAlgo3 algo, int userhash_support, int prefer_utf8)
_MHD_EXTERN enum MHD_Result MHD_set_connection_option(struct MHD_Connection *connection, enum MHD_CONNECTION_OPTION option,...)
_MHD_EXTERN int MHD_get_connection_values_n(struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIteratorN iterator, void *iterator_cls)
_MHD_EXTERN const union MHD_ConnectionInfo * MHD_get_connection_info(struct MHD_Connection *connection, enum MHD_ConnectionInfoType info_type,...)
MHD_ContentReaderFreeCallback crfc
_MHD_EXTERN enum MHD_Result MHD_lookup_connection_value_n(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, size_t key_size, const char **value_ptr, size_t *value_size_ptr)
void(* MHD_ContentReaderFreeCallback)(void *cls)
_MHD_EXTERN int MHD_get_connection_values(struct MHD_Connection *connection, enum MHD_ValueKind kind, MHD_KeyValueIterator iterator, void *iterator_cls)
enum MHD_DigestAuthUsernameType uname_type
_MHD_EXTERN enum MHD_Result MHD_set_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, const char *value)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd64(uint64_t size, int fd)
_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)
_MHD_EXTERN enum MHD_Result MHD_upgrade_action(struct MHD_UpgradeResponseHandle *urh, enum MHD_UpgradeAction action,...)
#define MHD_DIGEST_AUTH_ALGO3_NON_SESSION
MHD_RequestTerminationCode
_MHD_EXTERN enum MHD_Result MHD_queue_basic_auth_fail_response(struct MHD_Connection *connection, const char *realm, struct MHD_Response *response)
void(* MHD_UpgradeHandler)(void *cls, struct MHD_Connection *connection, void *req_cls, const char *extra_in, size_t extra_in_size, MHD_socket sock, struct MHD_UpgradeResponseHandle *urh)
_MHD_EXTERN int MHD_digest_auth_check(struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout)
_MHD_EXTERN enum MHD_Result MHD_set_connection_value_n(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key, size_t key_size, const char *value, size_t value_size)
MHD_ConnectionNotificationCode
_MHD_EXTERN struct MHD_DigestAuthUsernameInfo * MHD_digest_auth_get_username3(struct MHD_Connection *connection)
_MHD_EXTERN struct MHD_Response * MHD_create_response_empty(enum MHD_ResponseFlags flags)
#define MHD_UNSIGNED_LONG_LONG
_MHD_EXTERN enum MHD_Result MHD_del_response_header(struct MHD_Response *response, const char *header, const char *content)
void(* MHD_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
#define MHD_run_from_select(d, r, w, e)
_MHD_EXTERN const char * MHD_lookup_connection_value(struct MHD_Connection *connection, enum MHD_ValueKind kind, const char *key)
void(* MHD_LogCallback)(void *cls, const char *fm, va_list ap)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_iovec(const struct MHD_IoVec *iov, unsigned int iovcnt, MHD_ContentReaderFreeCallback free_cb, void *cls)
struct MHD_Connection * connection
_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,...)
_MHD_EXTERN enum MHD_Result MHD_queue_response(struct MHD_Connection *connection, unsigned int status_code, struct MHD_Response *response)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_data(size_t size, void *data, int must_free, int must_copy)
_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)
enum MHD_Result(* MHD_AcceptPolicyCallback)(void *cls, const struct sockaddr *addr, socklen_t addrlen)
enum MHD_DigestAuthQOP qop
_MHD_EXTERN enum MHD_Result MHD_queue_auth_fail_response(struct MHD_Connection *connection, const char *realm, const char *opaque, struct MHD_Response *response, int signal_stale)
_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)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd_at_offset64(uint64_t size, int fd, uint64_t offset)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_fd(size_t size, int fd)
enum MHD_Result(* MHD_AccessHandlerCallback)(void *cls, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **req_cls)
enum MHD_DigestAuthUsernameType uname_type
ssize_t(* MHD_ContentReaderCallback)(void *cls, uint64_t pos, char *buf, size_t max)
_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)
_MHD_EXTERN struct MHD_DigestAuthInfo * MHD_digest_auth_get_request_info3(struct MHD_Connection *connection)
_MHD_EXTERN void MHD_suspend_connection(struct MHD_Connection *connection)
_MHD_EXTERN enum MHD_Result MHD_destroy_post_processor(struct MHD_PostProcessor *pp)
_MHD_EXTERN int64_t MHD_get_timeout64s(struct MHD_Daemon *daemon)
void(* MHD_RequestCompletedCallback)(void *cls, struct MHD_Connection *connection, void **req_cls, enum MHD_RequestTerminationCode toe)
_MHD_EXTERN enum MHD_Result MHD_add_connection(struct MHD_Daemon *daemon, MHD_socket client_socket, const struct sockaddr *addr, socklen_t addrlen)
_MHD_EXTERN enum MHD_Result MHD_queue_auth_fail_response2(struct MHD_Connection *connection, const char *realm, const char *opaque, struct MHD_Response *response, int signal_stale, enum MHD_DigestAuthAlgorithm algo)
_MHD_EXTERN enum MHD_Result MHD_get_timeout64(struct MHD_Daemon *daemon, uint64_t *timeout)
_MHD_EXTERN enum MHD_Result MHD_digest_auth_calc_userdigest(enum MHD_DigestAuthAlgo3 algo3, const char *username, const char *realm, const char *password, void *userdigest_bin, size_t bin_buf_size)
_MHD_EXTERN MHD_socket MHD_quiesce_daemon(struct MHD_Daemon *daemon)
_MHD_EXTERN int MHD_get_timeout_i(struct MHD_Daemon *daemon)
_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)
_MHD_EXTERN const union MHD_DaemonInfo * MHD_get_daemon_info(struct MHD_Daemon *daemon, enum MHD_DaemonInfoType info_type,...)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer(size_t size, void *buffer, enum MHD_ResponseMemoryMode mode)
struct MHD_Daemon * daemon
_MHD_EXTERN uint32_t MHD_get_version_bin(void)
#define MHD_create_response_from_fd_at_offset(size, fd, offset)
_MHD_EXTERN enum MHD_Result MHD_is_feature_supported(enum MHD_FEATURE feature)
_MHD_EXTERN struct MHD_PostProcessor * MHD_create_post_processor(struct MHD_Connection *connection, size_t buffer_size, MHD_PostDataIterator iter, void *iter_cls)
_MHD_EXTERN void MHD_destroy_response(struct MHD_Response *response)
_MHD_EXTERN enum MHD_Result MHD_run_wait(struct MHD_Daemon *daemon, int32_t millisec)
_MHD_EXTERN void MHD_stop_daemon(struct MHD_Daemon *daemon)
_MHD_EXTERN char * MHD_basic_auth_get_username_password(struct MHD_Connection *connection, char **password)
unsigned int connection_timeout
_MHD_EXTERN char * MHD_digest_auth_get_username(struct MHD_Connection *connection)
_MHD_EXTERN enum MHD_Result MHD_get_timeout(struct MHD_Daemon *daemon, MHD_UNSIGNED_LONG_LONG *timeout)
MHD_AcceptPolicyCallback apc
_MHD_EXTERN enum MHD_Result MHD_digest_auth_calc_userhash_hex(enum MHD_DigestAuthAlgo3 algo3, const char *username, const char *realm, char *userhash_hex, size_t hex_buf_size)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_pipe(int fd)
_MHD_EXTERN enum MHD_Result MHD_queue_basic_auth_required_response3(struct MHD_Connection *connection, const char *realm, int prefer_utf8, struct MHD_Response *response)
#define _MHD_FIXED_FLAGS_ENUM
_MHD_EXTERN enum MHD_Result MHD_set_response_options(struct MHD_Response *response, enum MHD_ResponseFlags flags,...)
enum MHD_ResponseFlags flags
enum MHD_Result(* MHD_KeyValueIterator)(void *cls, enum MHD_ValueKind kind, const char *key, const char *value)
_MHD_EXTERN size_t MHD_digest_get_hash_size(enum MHD_DigestAuthAlgo3 algo3)
enum MHD_DigestAuthAlgo3 algo3
_MHD_EXTERN void MHD_free(void *ptr)
enum MHD_Result(* MHD_KeyValueIteratorN)(void *cls, enum MHD_ValueKind kind, const char *key, size_t key_size, const char *value, size_t value_size)
#define MHD_DIGEST_AUTH_ALGO3_SESSION
_MHD_EXTERN struct MHD_Response * MHD_create_response_for_upgrade(MHD_UpgradeHandler upgrade_handler, void *upgrade_handler_cls)
_MHD_EXTERN size_t MHD_get_reason_phrase_len_for(unsigned int code)
_MHD_EXTERN void MHD_set_panic_func(MHD_PanicCallback cb, void *cls)
_MHD_EXTERN const char * MHD_get_version(void)
_MHD_EXTERN int MHD_get_response_headers(struct MHD_Response *response, MHD_KeyValueIterator iterator, void *iterator_cls)
_MHD_EXTERN enum MHD_Result MHD_post_process(struct MHD_PostProcessor *pp, const char *post_data, size_t post_data_len)
_MHD_EXTERN const char * MHD_get_response_header(struct MHD_Response *response, const char *key)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer_with_free_callback_cls(size_t size, const void *buffer, MHD_ContentReaderFreeCallback crfc, void *crfc_cls)
_MHD_EXTERN struct MHD_BasicAuthInfo * MHD_basic_auth_get_username_password3(struct MHD_Connection *connection)
_MHD_EXTERN enum MHD_Result MHD_run(struct MHD_Daemon *daemon)
#define MHD_get_fdset(daemon, read_fd_set, write_fd_set, except_fd_set, max_fd)
MHD_ContentReaderCallback crc
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer_copy(size_t size, const void *buffer)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer_with_free_callback(size_t size, void *buffer, MHD_ContentReaderFreeCallback crfc)
_MHD_EXTERN enum MHD_Result MHD_add_response_footer(struct MHD_Response *response, const char *footer, const char *content)
_MHD_EXTERN struct MHD_Response * MHD_create_response_from_buffer_static(size_t size, const void *buffer)
_MHD_EXTERN enum MHD_DigestAuthResult MHD_digest_auth_check3(struct MHD_Connection *connection, const char *realm, const char *username, const char *password, unsigned int nonce_timeout, uint32_t max_nc, enum MHD_DigestAuthMultiQOP mqop, enum MHD_DigestAuthMultiAlgo3 malgo3)
MHD_DigestAuthUsernameType
struct sockaddr * client_addr
_MHD_EXTERN enum MHD_Result MHD_add_response_header(struct MHD_Response *response, const char *header, const char *content)
#define _MHD_DEPR_MACRO(msg)
unsigned int num_connections
void(* MHD_NotifyConnectionCallback)(void *cls, struct MHD_Connection *connection, void **socket_context, enum MHD_ConnectionNotificationCode toe)
#define MHD_MD5_DIGEST_SIZE
_MHD_EXTERN size_t MHD_http_unescape(char *val)
_MHD_EXTERN const char * MHD_get_reason_phrase_for(unsigned int code)
MHD_FLAG
Flags for the struct MHD_Daemon.
#define MHD_RESPONSE_HEADER_KIND
_MHD_EXTERN void MHD_resume_connection(struct MHD_Connection *connection)
enum MHD_DigestAuthAlgo3 algo3