diff options
Diffstat (limited to 'web/server')
-rw-r--r-- | web/server/static/static-threaded.c | 4 | ||||
-rw-r--r-- | web/server/web_client.c | 8 | ||||
-rw-r--r-- | web/server/web_client.h | 1 | ||||
-rw-r--r-- | web/server/web_client_cache.c | 4 |
4 files changed, 9 insertions, 8 deletions
diff --git a/web/server/static/static-threaded.c b/web/server/static/static-threaded.c index 8b9122f87f..26e9a47bda 100644 --- a/web/server/static/static-threaded.c +++ b/web/server/static/static-threaded.c @@ -196,7 +196,7 @@ static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data } #ifdef ENABLE_HTTPS - if ((!web_client_check_unix(w)) && ( netdata_srv_ctx )) { + if ((!web_client_check_unix(w)) && (netdata_ssl_srv_ctx)) { if( sock_delnonblock(w->ifd) < 0 ){ error("Web server cannot remove the non-blocking flag from socket %d",w->ifd); } @@ -218,7 +218,7 @@ static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data //The next two ifs are not together because I am reusing SSL structure if (!w->ssl.conn) { - w->ssl.conn = SSL_new(netdata_srv_ctx); + w->ssl.conn = SSL_new(netdata_ssl_srv_ctx); if ( w->ssl.conn ) { SSL_set_accept_state(w->ssl.conn); } else { diff --git a/web/server/web_client.c b/web/server/web_client.c index 9865ce671b..ff485384f7 100644 --- a/web/server/web_client.c +++ b/web/server/web_client.c @@ -1018,7 +1018,7 @@ static inline HTTP_VALIDATION http_request_validate(struct web_client *w) { // TODO -- ideally we we should avoid copying buffers around snprintfz(w->last_url, NETDATA_WEB_REQUEST_URL_SIZE, "%s%s", w->decoded_url, w->decoded_query_string); #ifdef ENABLE_HTTPS - if ( (!web_client_check_unix(w)) && (netdata_srv_ctx) ) { + if ( (!web_client_check_unix(w)) && (netdata_ssl_srv_ctx) ) { if ((w->ssl.conn) && ((w->ssl.flags & NETDATA_SSL_NO_HANDSHAKE) && (web_client_is_using_ssl_force(w) || web_client_is_using_ssl_default(w)) && (w->mode != WEB_CLIENT_MODE_STREAM)) ) { w->header_parse_tries = 0; w->header_parse_last_size = 0; @@ -1054,7 +1054,7 @@ static inline ssize_t web_client_send_data(struct web_client *w,const void *buf, { ssize_t bytes; #ifdef ENABLE_HTTPS - if ( (!web_client_check_unix(w)) && (netdata_srv_ctx) ) { + if ( (!web_client_check_unix(w)) && (netdata_ssl_srv_ctx) ) { if ( ( w->ssl.conn ) && ( !w->ssl.flags ) ){ bytes = SSL_write(w->ssl.conn,buf, len) ; } else { @@ -1211,7 +1211,7 @@ static inline void web_client_send_http_header(struct web_client *w) { size_t count = 0; ssize_t bytes; #ifdef ENABLE_HTTPS - if ( (!web_client_check_unix(w)) && (netdata_srv_ctx) ) { + if ( (!web_client_check_unix(w)) && (netdata_ssl_srv_ctx) ) { if ( ( w->ssl.conn ) && ( !w->ssl.flags ) ){ while((bytes = SSL_write(w->ssl.conn, buffer_tostring(w->response.header_output), buffer_strlen(w->response.header_output))) < 0) { count++; @@ -1915,7 +1915,7 @@ ssize_t web_client_receive(struct web_client *w) buffer_need_bytes(w->response.data, NETDATA_WEB_REQUEST_RECEIVE_SIZE); #ifdef ENABLE_HTTPS - if ( (!web_client_check_unix(w)) && (netdata_srv_ctx) ) { + if ( (!web_client_check_unix(w)) && (netdata_ssl_srv_ctx) ) { if ( ( w->ssl.conn ) && (!w->ssl.flags)) { bytes = SSL_read(w->ssl.conn, &w->response.data->buffer[w->response.data->len], (size_t) (left - 1)); }else { diff --git a/web/server/web_client.h b/web/server/web_client.h index 50e08fb335..63a6f4b589 100644 --- a/web/server/web_client.h +++ b/web/server/web_client.h @@ -27,6 +27,7 @@ extern int web_enable_gzip, web_gzip_level, web_gzip_strategy; #define HTTP_RESP_INTERNAL_SERVER_ERROR 500 #define HTTP_RESP_BACKEND_FETCH_FAILED 503 #define HTTP_RESP_GATEWAY_TIMEOUT 504 +#define HTTP_RESP_BACKEND_RESPONSE_INVALID 591 extern int respect_web_browser_do_not_track_policy; extern char *web_x_frame_options; diff --git a/web/server/web_client_cache.c b/web/server/web_client_cache.c index 5d7865762d..f7eb527239 100644 --- a/web/server/web_client_cache.c +++ b/web/server/web_client_cache.c @@ -9,7 +9,7 @@ #ifdef ENABLE_HTTPS static void web_client_reuse_ssl(struct web_client *w) { - if (netdata_srv_ctx) { + if (netdata_ssl_srv_ctx) { if (w->ssl.conn) { SSL_clear(w->ssl.conn); } @@ -48,7 +48,7 @@ static void web_client_free(struct web_client *w) { buffer_free(w->response.data); freez(w->user_agent); #ifdef ENABLE_HTTPS - if ((!web_client_check_unix(w)) && ( netdata_srv_ctx )) { + if ((!web_client_check_unix(w)) && (netdata_ssl_srv_ctx)) { if (w->ssl.conn) { SSL_free(w->ssl.conn); w->ssl.conn = NULL; |