From 83ba6762cc43d9db581b979bb5e3445669e46cc2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 25 Nov 2024 18:33:56 +0100 Subject: Merging upstream version 2.0.3+dfsg (Closes: #923993, #1042533, #1045145). Signed-off-by: Daniel Baumann --- src/web/server/static/README.md | 10 ---------- src/web/server/static/static-threaded.c | 9 --------- 2 files changed, 19 deletions(-) (limited to 'src/web/server/static') diff --git a/src/web/server/static/README.md b/src/web/server/static/README.md index e67949e21..d480ae001 100644 --- a/src/web/server/static/README.md +++ b/src/web/server/static/README.md @@ -1,13 +1,3 @@ - - # `static-threaded` web server The `static-threaded` web server spawns a fixed number of threads. diff --git a/src/web/server/static/static-threaded.c b/src/web/server/static/static-threaded.c index a4b24c9ac..01c9817fb 100644 --- a/src/web/server/static/static-threaded.c +++ b/src/web/server/static/static-threaded.c @@ -211,7 +211,6 @@ static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data web_client_set_conn_tcp(w); } -#ifdef ENABLE_HTTPS if ((web_client_check_conn_tcp(w)) && (netdata_ssl_web_server_ctx)) { sock_delnonblock(w->ifd); @@ -239,13 +238,10 @@ static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data sock_setnonblock(w->ifd); } -#endif netdata_log_debug(D_WEB_CLIENT, "%llu: ADDED CLIENT FD %d", w->id, pi->fd); -#ifdef ENABLE_HTTPS cleanup: -#endif worker_is_idle(); return w; } @@ -503,14 +499,12 @@ void *socket_listen_main_static_threaded(void *ptr) { if(!api_sockets.opened) fatal("LISTENER: no listen sockets available."); -#ifdef ENABLE_HTTPS netdata_ssl_validate_certificate = !config_get_boolean(CONFIG_SECTION_WEB, "ssl skip certificate verification", !netdata_ssl_validate_certificate); if(!netdata_ssl_validate_certificate_sender) netdata_log_info("SSL: web server will skip SSL certificates verification."); netdata_ssl_initialize_ctx(NETDATA_SSL_WEB_SERVER_CTX); -#endif // 6 threads is the optimal value // since 6 are the parallel connections browsers will do @@ -526,13 +520,11 @@ void *socket_listen_main_static_threaded(void *ptr) { if (static_threaded_workers_count < 1) static_threaded_workers_count = 1; -#ifdef ENABLE_HTTPS // See https://github.com/netdata/netdata/issues/11081#issuecomment-831998240 for more details if (OPENSSL_VERSION_NUMBER < OPENSSL_VERSION_110) { static_threaded_workers_count = 1; netdata_log_info("You are running an OpenSSL older than 1.1.0, web server will not enable multithreading."); } -#endif size_t max_sockets = (size_t)config_get_number(CONFIG_SECTION_WEB, "web server max sockets", (long long int)(rlimit_nofile.rlim_cur / 4)); @@ -548,7 +540,6 @@ void *socket_listen_main_static_threaded(void *ptr) { char tag[50 + 1]; snprintfz(tag, sizeof(tag) - 1, "WEB[%d]", i+1); - netdata_log_info("starting worker %d", i+1); static_workers_private_data[i].thread = nd_thread_create(tag, NETDATA_THREAD_OPTION_DEFAULT, socket_listen_main_static_threaded_worker, (void *)&static_workers_private_data[i]); -- cgit v1.2.3