legacy.inc (3779B)
1 @c graveyard, currently not used, but might be useful in the future... 2 3 @c ------------------------------------------------------------ 4 @node microhttpd-util feature 5 @section Testing for supported MHD features 6 7 8 @deftp {Enumeration} MHD_FEATURE 9 Values of this enum are used to specify what 10 information about a daemon is desired. 11 @table @code 12 @item MHD_FEATURE_MESSAGES 13 Get whether messages are supported. If supported then in debug 14 mode messages can be printed to stderr or to external logger. 15 16 @item MHD_FEATURE_SSL 17 Get whether HTTPS is supported. If supported then flag 18 MHD_USE_SSL and options MHD_OPTION_HTTPS_MEM_KEY, 19 MHD_OPTION_HTTPS_MEM_CERT, MHD_OPTION_HTTPS_MEM_TRUST, 20 MHD_OPTION_HTTPS_MEM_DHPARAMS, MHD_OPTION_HTTPS_CRED_TYPE, 21 MHD_OPTION_HTTPS_PRIORITIES can be used. 22 23 @item MHD_FEATURE_HTTPS_CERT_CALLBACK 24 Get whether option #MHD_OPTION_HTTPS_CERT_CALLBACK is 25 supported. 26 27 @item MHD_FEATURE_IPv6 28 Get whether IPv6 is supported. If supported then flag 29 MHD_USE_IPv6 can be used. 30 31 @item MHD_FEATURE_IPv6_ONLY 32 Get whether IPv6 without IPv4 is supported. If not supported 33 then IPv4 is always enabled in IPv6 sockets and 34 flag MHD_USE_DUAL_STACK if always used when MHD_USE_IPv6 is 35 specified. 36 37 @item MHD_FEATURE_POLL 38 Get whether @code{poll()} is supported. If supported then flag 39 MHD_USE_POLL can be used. 40 41 @item MHD_FEATURE_EPOLL 42 Get whether @code{epoll()} is supported. If supported then Flags 43 MHD_USE_EPOLL and 44 MHD_USE_EPOLL_INTERNAL_THREAD can be used. 45 46 @item MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET 47 Get whether shutdown on listen socket to signal other 48 threads is supported. If not supported flag 49 MHD_USE_ITC is automatically forced. 50 51 @item MHD_FEATURE_SOCKETPAIR 52 Get whether a @code{socketpair()} is used internally instead of 53 a @code{pipe()} to signal other threads. 54 55 @item MHD_FEATURE_TCP_FASTOPEN 56 Get whether TCP Fast Open is supported. If supported then 57 flag MHD_USE_TCP_FASTOPEN and option 58 MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE can be used. 59 60 @item MHD_FEATURE_BASIC_AUTH 61 Get whether HTTP Basic authorization is supported. If supported 62 then functions @code{MHD_basic_auth_get_username_password()} and 63 @code{MHD_queue_basic_auth_fail_response()} can be used. 64 65 @item MHD_FEATURE_DIGEST_AUTH 66 Get whether HTTP Digest authorization is supported. If 67 supported then options MHD_OPTION_DIGEST_AUTH_RANDOM, 68 MHD_OPTION_NONCE_NC_SIZE and functions @code{MHD_digest_auth_check()}, 69 can be used. 70 71 @item MHD_FEATURE_POSTPROCESSOR 72 Get whether postprocessor is supported. If supported then 73 functions @code{MHD_create_post_processor()}, 74 @code{MHD_post_process()}, @code{MHD_destroy_post_processor()} 75 can be used. 76 77 @item MHD_FEATURE_SENDFILE 78 Get whether @code{sendfile()} is supported. 79 80 @end table 81 @end deftp 82 83 84 85 @deftypefun {int} MHD_is_feature_supported (enum MHD_FEATURE feature) 86 Get information about supported MHD features. Indicate that MHD was 87 compiled with or without support for particular feature. Some features 88 require additional support by the kernel. However, kernel support is not 89 checked by this function. 90 91 @table @var 92 @item feature 93 type of requested information 94 @end table 95 96 Returns @code{MHD_YES} if the feature is supported, 97 and @code{MHD_NO} if not. 98 @end deftypefun 99 100 101 102 103 104 105 106 @c ------------------------------------------------------------ 107 @node microhttpd-util unescape 108 @section Unescape strings 109 110 @deftypefun {size_t} MHD_http_unescape (char *val) 111 Process escape sequences ('%HH') Updates val in place; the result 112 should be UTF-8 encoded and cannot be larger than the input. The 113 result must also still be 0-terminated. 114 115 @table @var 116 @item val 117 value to unescape (modified in the process), must be 118 a 0-terminated UTF-8 string. 119 @end table 120 121 Returns length of the resulting val (@code{strlen(val)} may be 122 shorter afterwards due to elimination of escape sequences). 123 124 @end deftypefun