private void correctUserAgentHeader(HttpRequest request, Map<String, Object> requestConfig) {
        //TODO: implement cache for user-agent
        Header userAgentHeader = request.getLastHeader(HttpHeaders.USER_AGENT);
        request.removeHeaders(HttpHeaders.USER_AGENT);

        String clientName = chConfiguration.getOrDefault(ClientConfigProperties.CLIENT_NAME.getKey(), "");
        if (requestConfig != null) {
            String reqClientName = (String) requestConfig.get(ClientConfigProperties.CLIENT_NAME.getKey());
            if (reqClientName != null && !reqClientName.isEmpty()) {
                clientName = reqClientName;
            }
        }
        String userAgentValue = defaultUserAgent;
        if (userAgentHeader == null && clientName != null && !clientName.isEmpty()) {
            userAgentValue = clientName + " " + defaultUserAgent;
        } else if (userAgentHeader != null) {
            userAgentValue = userAgentHeader.getValue() + " " + defaultUserAgent;
        }

        request.setHeader(HttpHeaders.USER_AGENT, userAgentValue);
    }
Parses URL parameters.
@param url
@return Map of parameters
client-v2/src/main/java/com/clickhouse/client/api/internal/HttpAPIClientHelper.java