summaryrefslogtreecommitdiffstats
path: root/web/server/web_client.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
}
}