Posts

Showing posts from May, 2016

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 string 408 statusText st

Lucee 4.5.2 cfparam null value error with full null support

With cfparam and the full null support (non default behaviour) there is a dodgy impact: Suppose qryDB has a null valued column, and you set a variable to that null value <cfparam name="myVar" default="#qryDB.nullValueColumn#"> This throws an error, same as would happen in this instance; <cfparam name="myVar"> Though the later appears to be inconsistently present in Adobe ColdFusion also; http://blog.adamcameron.me/2013/04/coldfusion-bugs-id-like-to-see-dealt.html

Lucee 4.5.2 cfpdfparam difference with Adobe ColdFusion

Suppose the following on Lucee 4.5.2: <cfset x = 1> <cfdocument format="pdf" pagetype="A4" name="myVar#x#"> <cfdocumentsection> Hi there </cfdocumentsection> </cfdocument> <cfpdf action="merge" destination="RAM:///myPDF.pdf" overwrite="yes">     <cfpdfparam source="#evaluate("myVar#x#")#" /> </cfpdf> <cfcontent file="RAM:///myPDF.pdf" type="application/pdf"> then to check it also runs on Adobe Cf; you'd actually end up with: "ByteArray objects cannot be converted to strings."   The original code for Adobe CF ran with the paramater like so:  <cfpdfparam source="myVar#x#" /> Both sets of documentation list source defined as follows: "Source PDF file to merge. You can specify a PDF variable, a cfdocument variable, or the pathname to a file." This would indicate it is just