libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit d7392e0882eb7b1cc559d25849204c966a5091ef
parent ca582a0633be1d06210ad5eefca753f8e87d6211
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri,  4 Nov 2016 17:02:56 +0100

all flags start with MHD_USE_, rename MHD_ALLOW_UPGRADE to MHD_USE_UPGRADE for consistency

Diffstat:
Mdoc/libmicrohttpd.texi | 2+-
Msrc/examples/upgrade_example.c | 2+-
Msrc/include/microhttpd.h | 4++--
Msrc/microhttpd/connection.c | 4++--
Msrc/microhttpd/daemon.c | 6+++---
Msrc/microhttpd/response.c | 2+-
Msrc/microhttpd/test_upgrade.c | 2+-
Msrc/microhttpd/test_upgrade_ssl.c | 2+-
8 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/doc/libmicrohttpd.texi b/doc/libmicrohttpd.texi @@ -591,7 +591,7 @@ Enable TCP_FASTOPEN on the listen socket. TCP_FASTOPEN is currently supported on Linux >= 3.6. On other systems using this option with cause @code{MHD_start_daemon} to fail. -@item MHD_ALLOW_UPGRADE +@item MHD_USE_UPGRADE @cindex upgrade This option must be set if you want to upgrade connections (via ``101 Switching Protocols'' responses). This requires MHD to diff --git a/src/examples/upgrade_example.c b/src/examples/upgrade_example.c @@ -275,7 +275,7 @@ main (int argc, printf ("%s PORT\n", argv[0]); return 1; } - d = MHD_start_daemon (MHD_ALLOW_UPGRADE | MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, + d = MHD_start_daemon (MHD_USE_UPGRADE | MHD_USE_SELECT_INTERNALLY | MHD_USE_DEBUG, atoi (argv[1]), NULL, NULL, &ahc_echo, NULL, diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -690,7 +690,7 @@ enum MHD_FLAG * "Upgrade" may require usage of additional internal resources, * which we do not want to use unless necessary. */ - MHD_ALLOW_UPGRADE = 32768 + MHD_USE_UPGRADE = 32768 }; @@ -2859,7 +2859,7 @@ enum MHD_FEATURE /** * Get whether HTTP "Upgrade" is supported. - * If supported then #MHD_ALLOW_UPGRADE, #MHD_upgrade_action() and + * If supported then #MHD_USE_UPGRADE, #MHD_upgrade_action() and * #MHD_create_response_for_upgrade() can be used. */ MHD_FEATURE_UPGRADE = 17 diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -3455,11 +3455,11 @@ MHD_queue_response (struct MHD_Connection *connection, #ifdef UPGRADE_SUPPORT daemon = connection->daemon; if ( (NULL != response->upgrade_handler) && - (0 == (daemon->options & MHD_ALLOW_UPGRADE)) ) + (0 == (daemon->options & MHD_USE_UPGRADE)) ) { #ifdef HAVE_MESSAGES MHD_DLOG (daemon, - _("Attempted 'upgrade' connection on daemon without MHD_ALLOW_UPGRADE option!\n")); + _("Attempted 'upgrade' connection on daemon without MHD_USE_UPGRADE option!\n")); #endif return MHD_NO; } diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c @@ -4639,7 +4639,7 @@ setup_epoll_to_listen (struct MHD_Daemon *daemon) if (-1 == daemon->epoll_fd) return MHD_NO; #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) - if (0 != (MHD_ALLOW_UPGRADE & daemon->options)) + if (0 != (MHD_USE_UPGRADE & daemon->options)) { daemon->epoll_upgrade_fd = setup_epoll_fd (daemon); if (MHD_INVALID_SOCKET == daemon->epoll_upgrade_fd) @@ -4740,7 +4740,7 @@ MHD_start_daemon_va (unsigned int flags, if (0 != (flags & MHD_USE_TCP_FASTOPEN)) return NULL; #endif - if (0 != (flags & MHD_ALLOW_UPGRADE)) + if (0 != (flags & MHD_USE_UPGRADE)) { #ifdef UPGRADE_SUPPORT flags |= MHD_USE_SUSPEND_RESUME; @@ -5449,7 +5449,7 @@ close_all_connections (struct MHD_Daemon *daemon) struct MHD_Connection *pos; const _MHD_bool used_thr_p_c = (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)); #ifdef UPGRADE_SUPPORT - const _MHD_bool upg_allowed = (0 != (daemon->options & MHD_ALLOW_UPGRADE)); + const _MHD_bool upg_allowed = (0 != (daemon->options & MHD_USE_UPGRADE)); #endif /* UPGRADE_SUPPORT */ #if defined(HTTPS_SUPPORT) && defined(UPGRADE_SUPPORT) struct MHD_UpgradeResponseHandle *urh; diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -692,7 +692,7 @@ MHD_response_execute_upgrade_ (struct MHD_Response *response, struct MHD_UpgradeResponseHandle *urh; size_t rbo; - if (0 == (daemon->options & MHD_ALLOW_UPGRADE)) + if (0 == (daemon->options & MHD_USE_UPGRADE)) return MHD_NO; if (NULL == diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c @@ -61,7 +61,7 @@ test_upgrade (int flags, done = 0; - d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_ALLOW_UPGRADE, + d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_USE_UPGRADE, 1080, NULL, NULL, &ahc_upgrade, NULL, diff --git a/src/microhttpd/test_upgrade_ssl.c b/src/microhttpd/test_upgrade_ssl.c @@ -139,7 +139,7 @@ test_upgrade (int flags, done = 0; - d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_ALLOW_UPGRADE | MHD_USE_TLS, + d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_USE_UPGRADE | MHD_USE_TLS, 1080, NULL, NULL, &ahc_upgrade, NULL,