Inconsistent Responses from CFHTTP

Description

Successful CFHTTP has a status_code, status_text, statuscode, text etc for the status related information.

If you look for a cfhttp.status_code, with an error, you do not get one back.
You get statuscode which has 'Connection Failure. State code unavailable'

This should be a 500 or something, if there is an error, something should be returned.
Some consistency, surely?

Attachments

2
  • 31 Mar 2016, 08:19 pm
  • 31 Mar 2016, 08:19 pm

Activity

Show:

Michael Offner 10 April 2017 at 09:33

in case Lucee was not able to connect you only get the attribute "statuscode" with the the value "Connection Failure. Status code unavailable.". Now in addition you get "status_code" with the value "0" and "status_text"
with the value "Connection Failure".

Michael Offner 4 April 2016 at 06:47

i have converted the ticket to an enhancement request.

Michael Offner 4 April 2016 at 06:46

this is clearly not a black/white scenario, both sides have good arguments.
First of all i have to say, this variable only exist in Lucee/Railo, so this is not a compatibility question to ACF.

For me there is only one relevant point for this, changing that behaviour will break existing code:

if(isNull(http.status_code)) { ... } else { ... }

So changing this will do more harm than good.

Mark Drew 1 April 2016 at 12:56

This is what a null is for. Before sending the fields would be null and if it comes back with a "" response code, that is what is set as the value of the status_code key

Fixed

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Fix versions

Affects versions

Priority

Created 31 March 2016 at 20:15
Updated 8 May 2017 at 02:56
Resolved 10 April 2017 at 10:19

Flag notifications