diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 12:08:18 +0000 |
commit | 5da14042f70711ea5cf66e034699730335462f66 (patch) | |
tree | 0f6354ccac934ed87a2d555f45be4c831cf92f4a /src/web/server/static/static-threaded.c | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-5da14042f70711ea5cf66e034699730335462f66.tar.xz netdata-5da14042f70711ea5cf66e034699730335462f66.zip |
Merging upstream version 1.45.3+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/web/server/static/static-threaded.c (renamed from web/server/static/static-threaded.c) | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/web/server/static/static-threaded.c b/src/web/server/static/static-threaded.c index 773d49f15..f2a07e405 100644 --- a/web/server/static/static-threaded.c +++ b/src/web/server/static/static-threaded.c @@ -40,7 +40,8 @@ static struct web_client *web_client_create_on_fd(POLLINFO *pi) { w->port_acl = pi->port_acl; int flag = 1; - if(unlikely(web_client_check_tcp(w) && setsockopt(w->ifd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int)) != 0)) + if(unlikely( + web_client_check_conn_tcp(w) && setsockopt(w->ifd, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, sizeof(int)) != 0)) netdata_log_debug(D_WEB_CLIENT, "%llu: failed to enable TCP_NODELAY on socket fd %d.", w->id, w->ifd); flag = 1; @@ -142,7 +143,7 @@ static int web_server_file_read_callback(POLLINFO *pi, short int *events) { goto cleanup; } - if(unlikely(w->mode != WEB_CLIENT_MODE_FILECOPY || w->ifd == w->ofd)) { + if(unlikely(w->mode != HTTP_REQUEST_MODE_FILECOPY || w->ifd == w->ofd)) { netdata_log_debug(D_WEB_CLIENT, "%llu: PREVENTED ATTEMPT TO READ FILE ON FD %d, ON NON-FILECOPY WEB CLIENT", w->id, pi->fd); retval = -1; goto cleanup; @@ -205,13 +206,13 @@ static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data struct web_client *w = web_client_create_on_fd(pi); if (!strncmp(pi->client_port, "UNIX", 4)) { - web_client_set_unix(w); + web_client_set_conn_unix(w); } else { - web_client_set_tcp(w); + web_client_set_conn_tcp(w); } #ifdef ENABLE_HTTPS - if ((!web_client_check_unix(w)) && (netdata_ssl_web_server_ctx)) { + if ((web_client_check_conn_tcp(w)) && (netdata_ssl_web_server_ctx)) { sock_delnonblock(w->ifd); //Read the first 7 bytes from the message, but the message @@ -296,11 +297,11 @@ static int web_server_rcv_callback(POLLINFO *pi, short int *events) { worker_is_busy(WORKER_JOB_PROCESS); web_client_process_request_from_web_server(w); - if (unlikely(w->mode == WEB_CLIENT_MODE_STREAM)) { + if (unlikely(w->mode == HTTP_REQUEST_MODE_STREAM)) { web_client_send(w); } - else if(unlikely(w->mode == WEB_CLIENT_MODE_FILECOPY)) { + else if(unlikely(w->mode == HTTP_REQUEST_MODE_FILECOPY)) { if(w->pollinfo_filecopy_slot == 0) { netdata_log_debug(D_WEB_CLIENT, "%llu: FILECOPY DETECTED ON FD %d", w->id, pi->fd); |