coldfusion - HTTP/1.1 500 Complex object types cannot be converted to simple values -


i'm following tutorial ben nadel , receiving following error in browser network/xhr.

complex object types cannot converted simple values

i think problem in cfloop tag i'm not sure should modify resolve error.

<!---     content byte array (by converting binary,     can echo appropriate length use in     binary response stream. ---> <cfset binresponse = tobinary(tobase64( objrequest.filecontent )) />  <!--- echo response code. ---> <cfheader statuscode="#val( objrequest.statuscode )#" statustext="#listrest( objrequest.statuscode, ' ' )#" />  <!--- echo response legnth. ---> <cfheader name="content-length" value="#arraylen( binresponse )#" />  <!--- echo response heaers. ---> <cfloop item="strkey" collection="#objrequest.responseheader#">  <!--- check see if header simple value. --->     <cfif issimplevalue( objrequest.responseheader[ strkey ] )>          <!--- echo header value. --->         <cfheader name="#strkey#" value="#objrequest.responseheader[ strkey ]#" />     </cfif>  </cfloop>  <!---     echo content appropriate mime type. using     variable attribute, make sure content     stream reset , given response returned. ---> <cfcontent type="#objrequest.mimetype#" variable="#binresponse#" /> 

i commented out each line of code until found out problem line of code cfheader. turned out, don't need whole cfloop block of code. author of tutorial may have other use block of code do, works fine without it. many tried help.

<cfheader name="#strkey#" value="#objrequest.responseheader[ strkey ]#" /> 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -