tracker issue : CF-3041905

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 83860:structCopy() no longer works on the result of cfhttp

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

Reporter/Name(from Bugbase): Elliott Sprehn / Elliott Sprehn (Elliott Sprehn)

Created: 08/18/2010

Components: Language, Tags

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Most users will encounter

Locale/System: English / Platforms All

Vote Count: 2

Problem:

structCopy() no longer works on the result of cfhttp. This is a regression from earlier versions of CF.
Method:

<cfhttp url="http://google.com/" result="result"><cfset result = structCopy(result)>
Result:

The StructCopy ColdFusion function is not supported on this object.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3041905

External Customer Info:
External Company:  
External Customer Name: Elliott Sprehn
External Customer Email: 202D59C844579997992016B7
External Test Config: 08/18/2010

Attachments:

Comments:

Why was this ticket closed as "will not fix"?
Comment by Bradley W.
30779 | May 20, 2019 10:04:38 PM GMT
+1 ...........
Vote by Aaron N.
30805 | May 22, 2019 07:29:48 AM GMT
Hi Adobe, +1 to re-open/fix this regression (and also add the struct member functions to the various struct variants). From a CF developer's perspective, a struct is a struct is a struct is a struct. We're not to worry about coldfusion.runtime.Struct vs coldfusion.runtime.StructBean vs coldfusion.runtime.ExceptionScope vs etc. That is a behind-the-scenes implementation detail for CF to worry about. Hi Brad, I just noticed it doesn't work here either (and, guessing, other places too): ----------- <cfscript> try {a=b} catch(any e) {writeDump(structCopy(e))} //exception: "The StructCopy ColdFusion function is not supported on an object of type coldfusion.runtime.ExceptionScope." </cfscript> ----------- And just a random tangent (and not suggesting this as a workaround :)), I wondered if cfwddx would preserve the underlying data type. ----------- <cfscript> cfhttp(url="http://www.google.com") writeOutput(CFHTTP.getClass().getName())//coldfusion.runtime.StructBean cfwddx(action="cfml2wddx", input=CFHTTP, output="FromCFMLToWDDX") writeOutput('<br>' & FromCFMLToWDDX.reMatch("<struct type='coldfusion.runtime.StructBean'>")[1].encodeForHTML())//<struct type='coldfusion.runtime.StructBean'> cfwddx(action="wddx2cfml", input=FromCFMLToWDDX, output="FromWDDXToCFML") writeOutput('<br>' & FromWDDXToCFML.getClass().getName())//coldfusion.runtime.Struct </cfscript> ----------- Nope :) My knee-jerk reaction was to log a bug (for cfwddx to preserve the underlying type), but.. I'm thinking cfwddx's current behavior is preferred here.. Thanks!, -Aaron
Comment by Aaron N.
30804 | May 22, 2019 07:49:54 AM GMT