[sr-dev] git:master:f19d258d: http_client Restrict protocols for redirects

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


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

Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at edvina.net>
Date: 2016-03-28T21:06:16+02:00

http_client Restrict protocols for redirects

---

Modified: modules/http_client/functions.c

---

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

---

diff --git a/modules/http_client/functions.c b/modules/http_client/functions.c
index 919839b..89407bb 100644
--- a/modules/http_client/functions.c
+++ b/modules/http_client/functions.c
@@ -132,6 +132,7 @@ static int curL_query_url(struct sip_msg* _m, const char* _url, str* _dst, const
 
     /* Limit to HTTP and HTTPS protocols */
     res = curl_easy_setopt(curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
+    res = curl_easy_setopt(curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
 
     if (params->post) {
 	char ctype[256];




More information about the sr-dev mailing list