diff options
Diffstat (limited to 'doc/libmicrohttpd.texi')
-rw-r--r-- | doc/libmicrohttpd.texi | 133 |
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 | ||
69 | Appendices | 70 | Appendices |
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 | ||
2599 | Values of this enum are used to specify what | ||
2600 | information about a daemon is desired. | ||
2601 | @table @code | ||
2602 | @item MHD_FEATURE_MESSAGES | ||
2603 | Get whether messages are supported. If supported then in debug | ||
2604 | mode messages can be printed to stderr or to external logger. | ||
2605 | |||
2606 | @item MHD_FEATURE_SSL | ||
2607 | Get whether HTTPS is supported. If supported then flag | ||
2608 | MHD_USE_SSL and options MHD_OPTION_HTTPS_MEM_KEY, | ||
2609 | MHD_OPTION_HTTPS_MEM_CERT, MHD_OPTION_HTTPS_MEM_TRUST, | ||
2610 | MHD_OPTION_HTTPS_MEM_DHPARAMS, MHD_OPTION_HTTPS_CRED_TYPE, | ||
2611 | MHD_OPTION_HTTPS_PRIORITIES can be used. | ||
2612 | |||
2613 | @item MHD_FEATURE_HTTPS_CERT_CALLBACK | ||
2614 | Get whether option #MHD_OPTION_HTTPS_CERT_CALLBACK is | ||
2615 | supported. | ||
2616 | |||
2617 | @item MHD_FEATURE_IPv6 | ||
2618 | Get whether IPv6 is supported. If supported then flag | ||
2619 | MHD_USE_IPv6 can be used. | ||
2620 | |||
2621 | @item MHD_FEATURE_IPv6_ONLY | ||
2622 | Get whether IPv6 without IPv4 is supported. If not supported | ||
2623 | then IPv4 is always enabled in IPv6 sockets and | ||
2624 | flag MHD_USE_DUAL_STACK if always used when MHD_USE_IPv6 is | ||
2625 | specified. | ||
2626 | |||
2627 | @item MHD_FEATURE_POLL | ||
2628 | Get whether @code{poll()} is supported. If supported then flag | ||
2629 | MHD_USE_POLL can be used. | ||
2630 | |||
2631 | @item MHD_FEATURE_EPOLL | ||
2632 | Get whether @code{epoll()} is supported. If supported then Flags | ||
2633 | MHD_USE_EPOLL_LINUX_ONLY and | ||
2634 | MHD_USE_EPOLL_INTERNALLY_LINUX_ONLY can be used. | ||
2635 | |||
2636 | @item MHD_FEATURE_SHUTDOWN_LISTEN_SOCKET | ||
2637 | Get whether shutdown on listen socket to signal other | ||
2638 | threads is supported. If not supported flag | ||
2639 | MHD_USE_PIPE_FOR_SHUTDOWN is automatically forced. | ||
2640 | |||
2641 | @item MHD_FEATURE_SOCKETPAIR | ||
2642 | Get whether a @code{socketpair()} is used internally instead of | ||
2643 | a @code{pipe()} to signal other threads. | ||
2644 | |||
2645 | @item MHD_FEATURE_TCP_FASTOPEN | ||
2646 | Get whether TCP Fast Open is supported. If supported then | ||
2647 | flag MHD_USE_TCP_FASTOPEN and option | ||
2648 | MHD_OPTION_TCP_FASTOPEN_QUEUE_SIZE can be used. | ||
2649 | |||
2650 | @item MHD_FEATURE_BASIC_AUTH | ||
2651 | Get whether HTTP Basic authorization is supported. If supported | ||
2652 | then 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 | ||
2656 | Get whether HTTP Digest authorization is supported. If | ||
2657 | supported then options MHD_OPTION_DIGEST_AUTH_RANDOM, | ||
2658 | MHD_OPTION_NONCE_NC_SIZE and functions @code{MHD_digest_auth_check()}, | ||
2659 | can be used. | ||
2660 | |||
2661 | @item MHD_FEATURE_POSTPROCESSOR | ||
2662 | Get whether postprocessor is supported. If supported then | ||
2663 | functions @code{MHD_create_post_processor()}, | ||
2664 | @code{MHD_post_process()}, @code{MHD_destroy_post_processor()} | ||
2665 | can be used. | ||
2666 | |||
2667 | @end table | ||
2668 | @end deftp | ||
2669 | |||
2670 | |||
2671 | |||
2672 | @deftypefun {int} MHD_is_feature_supported (enum MHD_FEATURE feature) | ||
2673 | Get information about supported MHD features. Indicate that MHD was | ||
2674 | compiled with or without support for particular feature. Some features | ||
2675 | require additional support by the kernel. However, kernel support is not | ||
2676 | checked by this function. | ||
2677 | |||
2678 | @table @var | ||
2679 | @item feature | ||
2680 | type of requested information | ||
2681 | @end table | ||
2682 | |||
2683 | Returns @code{MHD_YES} if the feature is supported, | ||
2684 | and @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) | ||
2693 | Process escape sequences ('%HH') Updates val in place; the result | ||
2694 | should be UTF-8 encoded and cannot be larger than the input. The | ||
2695 | result must also still be 0-terminated. | ||
2696 | |||
2697 | @table @var | ||
2698 | @item val | ||
2699 | value to unescape (modified in the process), must be | ||
2700 | a 0-terminated UTF-8 string. | ||
2701 | @end table | ||
2702 | |||
2703 | Returns length of the resulting val (@code{strlen(val)} may be | ||
2704 | shorter afterwards due to elimination of escape sequences). | ||
2705 | |||
2706 | @end deftypefun | ||
2707 | |||
2708 | |||
2709 | |||
2710 | |||
2578 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 2711 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2579 | 2712 | ||
2580 | 2713 | ||