From 93013f420503aa5311f35575bfe5bfa0a22c605a Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 11 Mar 2015 00:22:05 +0900 Subject: [PATCH] nghttpx: Remove --backend-http2-connection-check option, enable it by default --- src/shrpx.cc | 10 ---------- src/shrpx_config.cc | 8 -------- src/shrpx_config.h | 2 -- src/shrpx_http2_session.cc | 3 --- 4 files changed, 23 deletions(-) diff --git a/src/shrpx.cc b/src/shrpx.cc index d2a117ac..b67043ce 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -917,7 +917,6 @@ void fill_default_config() { mod_config()->downstream_response_buffer_size = 16 * 1024; mod_config()->no_server_push = false; mod_config()->host_unix = false; - mod_config()->http2_downstream_connchk = false; mod_config()->http2_downstream_connections_per_worker = 0; } } // namespace @@ -1220,10 +1219,6 @@ HTTP/2 and SPDY: connection to 2**-1. Default: )" << get_config()->http2_downstream_connection_window_bits << R"( - --backend-http2-connection-check - Check HTTP/2 backend connection is alive before - forwarding request. This option is useful in unstable - network environment (e.g. mobile). --backend-no-tls Disable SSL/TLS on backend connections. --http2-no-cookie-crumbling @@ -1496,7 +1491,6 @@ int main(int argc, char **argv) { {"backend-request-buffer", required_argument, &flag, 72}, {"no-host-rewrite", no_argument, &flag, 73}, {"no-server-push", no_argument, &flag, 74}, - {"backend-http2-connection-check", no_argument, &flag, 75}, {"backend-http2-connections-per-worker", required_argument, &flag, 76}, {nullptr, 0, nullptr, 0}}; @@ -1835,10 +1829,6 @@ int main(int argc, char **argv) { // --no-server-push cmdcfgs.emplace_back(SHRPX_OPT_NO_SERVER_PUSH, "yes"); break; - case 75: - // --backend-http2-connection-check - cmdcfgs.emplace_back(SHRPX_OPT_BACKEND_HTTP2_CONNECTION_CHECK, "yes"); - break; case 76: // --backend-http2-connections-per-worker cmdcfgs.emplace_back(SHRPX_OPT_BACKEND_HTTP2_CONNECTIONS_PER_WORKER, diff --git a/src/shrpx_config.cc b/src/shrpx_config.cc index db127bee..182613ca 100644 --- a/src/shrpx_config.cc +++ b/src/shrpx_config.cc @@ -146,8 +146,6 @@ const char SHRPX_OPT_TLS_CTX_PER_WORKER[] = "tls-ctx-per-worker"; const char SHRPX_OPT_BACKEND_REQUEST_BUFFER[] = "backend-request-buffer"; const char SHRPX_OPT_BACKEND_RESPONSE_BUFFER[] = "backend-response-buffer"; const char SHRPX_OPT_NO_SERVER_PUSH[] = "no-server-push"; -const char SHRPX_OPT_BACKEND_HTTP2_CONNECTION_CHECK[] = - "backend-http2-connection-check"; const char SHRPX_OPT_BACKEND_HTTP2_CONNECTIONS_PER_WORKER[] = "backend-http2-connections-per-worker"; @@ -1197,12 +1195,6 @@ int parse_config(const char *opt, const char *optarg) { return 0; } - if (util::strieq(opt, SHRPX_OPT_BACKEND_HTTP2_CONNECTION_CHECK)) { - mod_config()->http2_downstream_connchk = util::strieq(optarg, "yes"); - - return 0; - } - if (util::strieq(opt, SHRPX_OPT_BACKEND_HTTP2_CONNECTIONS_PER_WORKER)) { return parse_uint(&mod_config()->http2_downstream_connections_per_worker, opt, optarg); diff --git a/src/shrpx_config.h b/src/shrpx_config.h index 7e6e758c..9ffaea1e 100644 --- a/src/shrpx_config.h +++ b/src/shrpx_config.h @@ -136,7 +136,6 @@ extern const char SHRPX_OPT_TLS_CTX_PER_WORKER[]; extern const char SHRPX_OPT_BACKEND_REQUEST_BUFFER[]; extern const char SHRPX_OPT_BACKEND_RESPONSE_BUFFER[]; extern const char SHRPX_OPT_NO_SERVER_PUSH[]; -extern const char SHRPX_OPT_BACKEND_HTTP2_CONNECTION_CHECK[]; extern const char SHRPX_OPT_BACKEND_HTTP2_CONNECTIONS_PER_WORKER[]; union sockaddr_union { @@ -325,7 +324,6 @@ struct Config { bool no_server_push; // true if host contains UNIX domain socket path bool host_unix; - bool http2_downstream_connchk; }; const Config *get_config(); diff --git a/src/shrpx_http2_session.cc b/src/shrpx_http2_session.cc index d2b1dba4..c83e4884 100644 --- a/src/shrpx_http2_session.cc +++ b/src/shrpx_http2_session.cc @@ -1468,9 +1468,6 @@ void Http2Session::start_checking_connection() { } void Http2Session::reset_connection_check_timer(ev_tstamp t) { - if (!get_config()->http2_downstream_connchk) { - return; - } connchk_timer_.repeat = t; ev_timer_again(conn_.loop, &connchk_timer_); }