Lucee 4.5.2 cfhttp inconsistent timeout response with Adobe Coldfusion



Trying to catch a timeout is alwas a problem, particularly on those jumpy sites that are normally ok, but can be offline for an hour or 2 when the owners is asleep!

There is a bug here https://luceeserver.atlassian.net/browse/LDEV-80 but it is not quite the same and I do get a correct response if in the example below sleep(4000) was replaced by a=1/0;



Suppose a file like so:

<cfif structkeyexists(url, "test")>
    <cfscript>sleep(4000);</cfscript>
<cfelse>
<cftry>
    <cfhttp timeout="2" url="http://#cgi.http_host##cgi.script_name#?test" throwonerror="true" result="x" />
    <cfcatch type="any">        <cfdump var="#x#" />
        <cfdump var="#cfcatch#" />
    </cfcatch>
</cftry>
</cfif>

Lucee 4.5.2 produces
Struct
errordetail
string


while the cfcatch adds in this
statusCode
string408
statusText
stringTime-out

while Adobe CF populates x as follows with no mention of status codes in the cfcatch
Charset[empty string]
ErrorDetail[empty string]
FilecontentConnection Timeout
Header[empty string]
MimetypeUnable to determine MIME type of file.
Responseheader
struct [empty]
Statuscode408 Request Time-out
TextYES



I guess you could search the error details for the phrase "timeout" as that is the only consistent thing between the 2 engines.

Comments

Popular posts from this blog

cf_sql_timestamp vs cf_sql_date vs getdate()

Global SQL Procedure, System Objects and sp_ms_marksystemobject

Ghost Records, Card Recon and PCI Compliance