[sr-dev] git:master:126c9c34: http_client Limit protocols to HTTP and HTTPS

Olle E. Johansson oej at edvina.net
Mon Mar 28 21:06:46 CEST 2016


Module: kamailio
Branch: master
Commit: 126c9c341af5f7cf74279d1a6e757f7602ce7d99
URL: https://github.com/kamailio/kamailio/commit/126c9c341af5f7cf74279d1a6e757f7602ce7d99

Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at edvina.net>
Date: 2016-03-28T20:54:17+02:00

http_client Limit protocols to HTTP and HTTPS

---

Modified: modules/http_client/functions.c

---

Diff:  https://github.com/kamailio/kamailio/commit/126c9c341af5f7cf74279d1a6e757f7602ce7d99.diff
Patch: https://github.com/kamailio/kamailio/commit/126c9c341af5f7cf74279d1a6e757f7602ce7d99.patch

---

diff --git a/modules/http_client/functions.c b/modules/http_client/functions.c
index 3d1b576..919839b 100644
--- a/modules/http_client/functions.c
+++ b/modules/http_client/functions.c
@@ -130,6 +130,9 @@ static int curL_query_url(struct sip_msg* _m, const char* _url, str* _dst, const
     LM_DBG("****** ##### CURL URL [%s] \n", _url);
     res = curl_easy_setopt(curl, CURLOPT_URL, _url);
 
+    /* Limit to HTTP and HTTPS protocols */
+    res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+
     if (params->post) {
 	char ctype[256];
 




More information about the sr-dev mailing list