Write the entire request with parameters in the access.log file (#12815)
Stelios Fragkakis committed
May 4, 2022 at 17:41 UTC
b198febbd4b87eee680ff20675b22365a6343e68
1 file changed
+1
-1
web/server/web_client.c
+1
-1
@@ -1011,7 +1011,7 @@ static inline HTTP_VALIDATION http_request_validate(struct web_client *w) {
1011
1012
// copy the URL - we are going to overwrite parts of it
1013
// TODO -- ideally we we should avoid copying buffers around
1014
- strncpyz(w->last_url, w->decoded_url, NETDATA_WEB_REQUEST_URL_SIZE);
1014
+ snprintfz(w->last_url, NETDATA_WEB_REQUEST_URL_SIZE, "%s%s", w->decoded_url, w->decoded_query_string);
1015
#ifdef ENABLE_HTTPS
1016
if ( (!web_client_check_unix(w)) && (netdata_srv_ctx) ) {
1017
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)) ) {