url_registry: Remove of unecessary NULL (#6714)
Summary With the recent changes on URL parsing, we caused an issue in the registry. Requests were not being logged, so the counters remained the same. The reason was that we modified the request buffer and the daemon couldn't access the cookie required to store the info. After @cosmix review, I notice that there was a code that is not necessary on Netdata. I executed tests with the stress.sh and urls/request.sh scripts, this last I used during 4 hours with cron calling it each hour.
thiagoftsm committed
Aug 28, 2019 at 15:41 UTC
e972d27c5496ef3a9b7b9c3af2ce0e916e74f600
1 file changed
-3
web/server/web_client.c
-3
@@ -1065,9 +1065,6 @@ static inline HTTP_VALIDATION http_request_validate(struct web_client *w) {
1065
// copy the URL - we are going to overwrite parts of it
1066
// TODO -- ideally we we should avoid copying buffers around
1067
strncpyz(w->last_url, w->decoded_url, NETDATA_WEB_REQUEST_URL_SIZE);
1068
- if (w->url_search_path && w->separator) {
1069
- *w->url_search_path = 0x00;
1070
- }
1068
#ifdef ENABLE_HTTPS
1069
if ( (!web_client_check_unix(w)) && (netdata_srv_ctx) ) {
1070
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)) ) {