[asterisk-bugs] [JIRA] (ASTERISK-17491) CURLOPT() needs a "followlocation" parameter / "maxredirs" doesn't do anything

Friendly Automation (JIRA) noreply at issues.asterisk.org
Tue Jan 14 12:32:25 CST 2020


    [ https://issues.asterisk.org/jira/browse/ASTERISK-17491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=249371#comment-249371 ] 

Friendly Automation commented on ASTERISK-17491:
------------------------------------------------

Change 13587 merged by Joshua Colp:
func_curl: Add 'followlocation' option to CURLOPT()

[https://gerrit.asterisk.org/c/asterisk/+/13587|https://gerrit.asterisk.org/c/asterisk/+/13587]

> CURLOPT() needs a "followlocation" parameter / "maxredirs" doesn't do anything
> ------------------------------------------------------------------------------
>
>                 Key: ASTERISK-17491
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-17491
>             Project: Asterisk
>          Issue Type: New Feature
>          Components: Functions/func_curl
>    Affects Versions: 1.8.3, 13.18.4
>            Reporter: candrews
>         Attachments: ast11_func_curl_redirects_and_tls.patch
>
>
> I noticed that the CURL function will not follow redirects. According to http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTFOLLOWLOCATION you need to set the CURLOPT_FOLLOWLOCATION in order for CURL to follow redirects, and that is not set according to the source code: http://svnview.digium.com/svn/asterisk/trunk/funcs/func_curl.c?view=markup
> This is especially interesting seeing as how there is a "maxredirs" CURLOPT parameter. According to the CURL documentation at http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTMAXREDIR :
> "This option only makes sense if the CURLOPT_FOLLOWLOCATION is used at the same time."
> I suggest that a new CURLOPT parameter "followlocation" be added to add the redirect following feature and fix the currently broken "maxredirs" option.
> ****** ADDITIONAL INFORMATION ******
> Note that this is not a feature request - "maxredirect" (which already exists) is currently broken - and I'm suggesting a way to fix that.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list