[asterisk-bugs] [JIRA] (ASTERISK-28825) Any curl response checks out as valid even if 404 is returned.

Asterisk Team (JIRA) noreply at issues.asterisk.org
Mon Apr 13 12:58:27 CDT 2020


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

Asterisk Team commented on ASTERISK-28825:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

> Any curl response checks out as valid even if 404 is returned.
> --------------------------------------------------------------
>
>                 Key: ASTERISK-28825
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28825
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Functions/func_curl
>    Affects Versions: 16.6.1
>         Environment: CentOS7, Asterisk 16.6.1
>            Reporter: dovid
>            Severity: Minor
>
> Hi,
> In acf_curl_helper if there is any response then ret gets set to 0. This is the case regardless if the http response code that is sent back is a 200, 404 etc. It seems to be under if (args->cb_data.str && ast_str_strlen(args->cb_data.str)) {
> For instance if the response is:
> '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> <html><head>
> <title>404 Not Found</title>
> </head><body>
> <h1>Not Found</h1>
> <p>The requested URL /moh.php/single was not found on this server.</p>
> </body></html>'
> then Asterisk thinks the response was valid. If I do a curl request direct from the Linux CLI it looks like this
> [root at a2-c2-nyc2 asterisk-16.6.1]# curl -I  http://localhost/moh.php
> HTTP/1.1 404 Not Found
> Date: Mon, 13 Apr 2020 17:55:50 GMT
> Server: Apache/2.4.6 (CentOS) PHP/7.0.30
> Content-Type: text/html; charset=iso-8859-1
> [root at a2-c2-nyc2 asterisk-16.6.1]# 
>  



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



More information about the asterisk-bugs mailing list