aboutsummaryrefslogtreecommitdiff
path: root/doc/libmicrohttpd.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/libmicrohttpd.texi')
-rw-r--r--doc/libmicrohttpd.texi133
1 files changed, 133 insertions, 0 deletions
diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi
index 91579c62..b0a1000b 100644
--- a/doc/libmicrohttpd.texi
+++ b/doc/libmicrohttpd.texi
@@ -65,6 +65,7 @@ Free Documentation License".
65* microhttpd-dauth:: Utilizing Authentication. 65* microhttpd-dauth:: Utilizing Authentication.
66* microhttpd-post:: Adding a @code{POST} processor. 66* microhttpd-post:: Adding a @code{POST} processor.
67* microhttpd-info:: Obtaining and modifying status information. 67* microhttpd-info:: Obtaining and modifying status information.
68* microhttpd-util:: Utilities.
68 69
69Appendices 70Appendices
70 71
@@ -2575,6 +2576,138 @@ zero for no timeout.
2575@end deftp 2576@end deftp
2576 2577
2577 2578
2579
2580@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2581
2582@c ------------------------------------------------------------
2583@node microhttpd-util
2584@chapter Utility functions.
2585
2586
2587@menu
2588* microhttpd-util feature:: Test supported MHD features
2589* microhttpd-util unescape:: Unescape strings
2590@end menu
2591
2592
2593@c ------------------------------------------------------------
2594@node microhttpd-util feature
2595@section Testing for supported MHD features
2596
2597
2598@deftp {Enumeration} MHD_FEATURE
2599Values of this enum are used to specify what
2600information about a daemon is desired.
2601@table @code
2602@item MHD_FEATURE_MESSAGES
2603Get whether messages are supported. If supported then in debug
2604mode messages can be printed to stderr or to external logger.
2605
2606@item MHD_FEATURE_SSL
2607Get whether HTTPS is supported. If supported then flag
2608MHD_USE_SSL and options MHD_OPTION_HTTPS_MEM_KEY,
2609MHD_OPTION_HTTPS_MEM_CERT, MHD_OPTION_HTTPS_MEM_TRUST,
2610MHD_OPTION_HTTPS_MEM_DHPARAMS, MHD_OPTION_HTTPS_CRED_TYPE,
2611MHD_OPTION_HTTPS_PRIORITIES can be used.
2612
2613@item MHD_FEATURE_HTTPS_CERT_CALLBACK
2614Get whether option #MHD_OPTION_HTTPS_CERT_CALLBACK is
2615supported.
2616
2617@item MHD_FEATURE_IPv6
2618Get whether IPv6 is supported. If supported then flag
2619MHD_USE_IPv6 can be used.
2620
2621@item MHD_FEATURE_IPv6_ONLY
2622Get whether IPv6 without IPv4 is supported. If not supported
2623then IPv4 is always enabled in IPv6 sockets and
2624flag MHD_USE_DUAL_STACK if always used when MHD_USE_IPv6 is
2625specified.
2626
2627@item MHD_FEATURE_POLL
2628Get whether @code{poll()} is supported. If supported then flag
2629MHD_USE_POLL can be used.
2630
2631@item MHD_FEATURE_EPOLL
2632Get whether @code{epoll()} is supported. If supported then Flags
2633MHD_USE_EPOLL_LINUX_ONLY and
2634MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY can be used.
2635
2636@item MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET
2637Get whether shutdown on listen socket to signal other
2638threads is supported. If not supported flag
2639MHD_USE_PIPE_FOR_SHUTDOWN is automatically forced.
2640
2641@item MHD_FEATURE_SOCKETPAIR
2642Get whether a @code{socketpair()} is used internally instead of
2643a @code{pipe()} to signal other threads.
2644
2645@item MHD_FEATURE_TCP_FASTOPEN
2646Get whether TCP Fast Open is supported. If supported then
2647flag MHD_USE_TCP_FASTOPEN and option
2648MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE can be used.
2649
2650@item MHD_FEATURE_BASIC_AUTH
2651Get whether HTTP Basic authorization is supported. If supported
2652then functions @code{MHD_basic_auth_get_username_password()} and
2653@code{MHD_queue_basic_auth_fail_response()} can be used.
2654
2655@item MHD_FEATURE_DIGEST_AUTH
2656Get whether HTTP Digest authorization is supported. If
2657supported then options MHD_OPTION_DIGEST_AUTH_RANDOM,
2658MHD_OPTION_NONCE_NC_SIZE and functions @code{MHD_digest_auth_check()},
2659can be used.
2660
2661@item MHD_FEATURE_POSTPROCESSOR
2662Get whether postprocessor is supported. If supported then
2663functions @code{MHD_create_post_processor()},
2664@code{MHD_post_process()}, @code{MHD_destroy_post_processor()}
2665can be used.
2666
2667@end table
2668@end deftp
2669
2670
2671
2672@deftypefun {int} MHD_is_feature_supported (enum MHD_FEATURE feature)
2673Get information about supported MHD features. Indicate that MHD was
2674compiled with or without support for particular feature. Some features
2675require additional support by the kernel. However, kernel support is not
2676checked by this function.
2677
2678@table @var
2679@item feature
2680type of requested information
2681@end table
2682
2683Returns @code{MHD_YES} if the feature is supported,
2684and @code{MHD_NO} if not.
2685@end deftypefun
2686
2687
2688@c ------------------------------------------------------------
2689@node microhttpd-util unescape
2690@section Unescape strings
2691
2692@deftypefun {size_t} MHD_http_unescape (char *val)
2693Process escape sequences ('%HH') Updates val in place; the result
2694should be UTF-8 encoded and cannot be larger than the input. The
2695result must also still be 0-terminated.
2696
2697@table @var
2698@item val
2699value to unescape (modified in the process), must be
2700a 0-terminated UTF-8 string.
2701@end table
2702
2703Returns length of the resulting val (@code{strlen(val)} may be
2704shorter afterwards due to elimination of escape sequences).
2705
2706@end deftypefun
2707
2708
2709
2710
2578@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2711@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2579 2712
2580 2713