@@ -56,6 +56,7 @@ typedef struct { char *cacert; char *ciphersuites; char *http_proxy; + char *useragent; unsigned int authmethod; unsigned int http_proxy_port; unsigned int tlsversion; @@ -206,6 +207,7 @@ static int curL_query_url(struct sip_msg* _m, const char* _url, str* _dst, const res |= curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_function); res |= curl_easy_setopt(curl, CURLOPT_WRITEDATA, &stream);
+ res |= curl_easy_setopt(curl, CURLOPT_USERAGENT, params->useragent);
if (res != CURLE_OK) { /* PANIC */ @@ -379,6 +381,7 @@ int curl_con_query_url(struct sip_msg* _m, const str *connection, const str* url query_params.cacert = default_tls_cacert; query_params.ciphersuites = conn->ciphersuites; query_params.tlsversion = conn->tlsversion; + query_params.useragent = conn->useragent; query_params.verify_peer = conn->verify_peer; query_params.verify_host = conn->verify_host; query_params.timeout = conn->timeout;
This code make http_connect to send user_agent. Not sure if this is correct. :)
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/pull/674#issuecomment-226725634