summaryrefslogtreecommitdiffstats
path: root/web/server/web_client.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-09 04:52:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-06-09 04:52:39 +0000
commit89f3604407aff8f4cb2ed958252c61e23c767e24 (patch)
tree7fbf408102cab051557d38193524d8c6e991d070 /web/server/web_client.c
parentAdding upstream version 1.34.1. (diff)
downloadnetdata-b2632fc3ce7e8fdc5703ea02a4780885d89438c5.tar.xz
netdata-b2632fc3ce7e8fdc5703ea02a4780885d89438c5.zip
Adding upstream version 1.35.0.upstream/1.35.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/server/web_client.c')
-rw-r--r--web/server/web_client.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/web/server/web_client.c b/web/server/web_client.c
index e61dc0a54..d287cec03 100644
--- a/web/server/web_client.c
+++ b/web/server/web_client.c
@@ -496,6 +496,11 @@ void buffer_data_options2string(BUFFER *wb, uint32_t options) {
if(count++) buffer_strcat(wb, " ");
buffer_strcat(wb, "unaligned");
}
+
+ if(options & RRDR_OPTION_ANOMALY_BIT) {
+ if(count++) buffer_strcat(wb, " ");
+ buffer_strcat(wb, "anomaly-bit");
+ }
}
static inline int check_host_and_call(RRDHOST *host, struct web_client *w, char *url, int (*func)(RRDHOST *, struct web_client *, char *)) {
@@ -1011,7 +1016,7 @@ static inline HTTP_VALIDATION http_request_validate(struct web_client *w) {
// copy the URL - we are going to overwrite parts of it
// TODO -- ideally we we should avoid copying buffers around
- strncpyz(w->last_url, w->decoded_url, NETDATA_WEB_REQUEST_URL_SIZE);
+ 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 ((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)) ) {
@@ -1309,15 +1314,7 @@ static inline int web_client_switch_host(RRDHOST *host, struct web_client *w, ch
host = sql_create_host_by_uuid(tok);
if (likely(host)) {
int rc = web_client_process_url(host, w, url);
- freez(host->hostname);
- freez((char *)host->os);
- freez((char *)host->tags);
- freez((char *)host->timezone);
- freez(host->program_name);
- freez(host->program_version);
- freez(host->registry_hostname);
- freez(host->system_info);
- freez(host);
+ free_temporary_host(host);
return rc;
}
}