<p>Sean Bright has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13587">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">func_curl: Add 'followlocation' option to CURLOPT()<br><br>We allow for 'maxredirs' to be set, but this value is ignored when<br>followlocation is not enabled which, by default, it is not.<br><br>ASTERISK-17491 #close<br>Reported by: candrews<br><br>Change-Id: I96a4ab0142f2fb7d2e96ff976f6cf7b2982c761a<br>---<br>M funcs/func_curl.c<br>1 file changed, 10 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/13587/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/funcs/func_curl.c b/funcs/func_curl.c</span><br><span>index 06a8b53..5ea04c2 100644</span><br><span>--- a/funcs/func_curl.c</span><br><span>+++ b/funcs/func_curl.c</span><br><span>@@ -108,8 +108,13 @@</span><br><span>                                           <para>For HTTP(S) URIs, number of seconds to wait for a</span><br><span>                                                server response</para></span><br><span>                                         </enum></span><br><span style="color: hsl(120, 100%, 40%);">+                                 <enum name="followlocation"></span><br><span style="color: hsl(120, 100%, 40%);">+                                          <para>Whether or not to follow HTTP 3xx redirects (boolean)</para></span><br><span style="color: hsl(120, 100%, 40%);">+                                        </enum></span><br><span>                                        <enum name="maxredirs"></span><br><span style="color: hsl(0, 100%, 40%);">-                                         <para>Maximum number of redirects to follow</para></span><br><span style="color: hsl(120, 100%, 40%);">+                                                <para>Maximum number of redirects to follow. The default is -1,</span><br><span style="color: hsl(120, 100%, 40%);">+                                         which allows for unlimited redirects. This only makes sense when</span><br><span style="color: hsl(120, 100%, 40%);">+                                              followlocation is also set.</para></span><br><span>                                     </enum></span><br><span>                                        <enum name="proxy"></span><br><span>                                          <para>Hostname or IP address to use as a proxy server</para></span><br><span>@@ -247,6 +252,9 @@</span><br><span>       } else if (!strcasecmp(name, "proxyuserpwd")) {</span><br><span>            *key = CURLOPT_PROXYUSERPWD;</span><br><span>                 *ot = OT_STRING;</span><br><span style="color: hsl(120, 100%, 40%);">+      } else if (!strcasecmp(name, "followlocation")) {</span><br><span style="color: hsl(120, 100%, 40%);">+           *key = CURLOPT_FOLLOWLOCATION;</span><br><span style="color: hsl(120, 100%, 40%);">+                *ot = OT_BOOLEAN;</span><br><span>    } else if (!strcasecmp(name, "maxredirs")) {</span><br><span>               *key = CURLOPT_MAXREDIRS;</span><br><span>            *ot = OT_INTEGER;</span><br><span>@@ -803,6 +811,7 @@</span><br><span> "  header         - Retrieve header information (boolean)\n"</span><br><span> "  httpheader     - Add new custom http header (string)\n"</span><br><span> "  httptimeout    - Number of seconds to wait for HTTP response\n"</span><br><span style="color: hsl(120, 100%, 40%);">+"  followlocation - Follow HTTP 3xx redirects (boolean)\n"</span><br><span> "  maxredirs      - Maximum number of redirects to follow\n"</span><br><span> "  proxy          - Hostname or IP to use as a proxy\n"</span><br><span> "  proxytype      - http, socks4, or socks5\n"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13587">change 13587</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13587"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I96a4ab0142f2fb7d2e96ff976f6cf7b2982c761a </div>
<div style="display:none"> Gerrit-Change-Number: 13587 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>