[Home]

Summary:ASTERISK-29075: CLONE - Any curl response checks out as valid even if 404 is returned.
Reporter:GOBINDA PAUL (gobinda)Labels:
Date Opened:2020-09-11 10:27:10Date Closed:2020-09-11 10:31:42
Priority:MinorRegression?
Status:Closed/CompleteComponents:Functions/func_curl
Versions:16.14.0 Frequency of
Occurrence
Related
Issues:
is the original version of this clone:ASTERISK-28825 Any curl response checks out as valid even if 404 is returned.
Environment:CentOS7, Asterisk 16.14.0Attachments:
Description: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@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@a2-c2-nyc2 asterisk-16.6.1]#
Comments:By: Asterisk Team (asteriskteam) 2020-09-11 10:27:12

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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Benjamin Keith Ford (bford) 2020-09-11 10:31:42.378-0500

There is already an open issue for this. All progress will be posted on that issue. Closing this one out.