Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Harry Klein / Harry Klein (Harry Klein)
Created: 03/09/2016
Components: Language
Versions: 2016
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: RC1_v12 /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win All
Vote Count: 0
Problem Description:
Passed struct gets modified inside cfthread
Steps to Reproduce:
<cffunction name="post" hint="Does a asyncronous POST HTTP request" access="public" returntype="void" output="false">
<cfargument name="url" hint="The url to do a post request on" type="string" required="Yes">
<cfargument name="formdata" hint="Structure of form, value pairs" type="struct" required="no" default="#StructNew()#">
<cflog file="asynchttp1" text="#serializeJson(arguments.formdata)#">
<cfthread name="asynchttp-thread-#createUUID()#" action="run" posturl="#arguments.url#" data="#arguments.formdata#" httpcookies="#stCookies#">
<cfset var iItem = "">
<cflog file="asynchttp2" text="#serializeJson(attributes.data)#">
<cfhttp url="#attributes.posturl#" method="post" timeout="1">
<cfhttpparam type="formfield" name="callbackurl" value="#attributes.posturl#" />
<cflog file="asynchttp3" text="#serializeJson(attributes.data)#">
<cfloop collection="#attributes.data#" item="iItem">
<cfhttpparam type="formfield" name="#iItem#" value="#attributes.data[iItem]#" />
</cfloop>
Actual Result:
Result from first logfile (asynchttp1.log)
"Information","http-nio-8500-exec-5","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-publishinstance-662""}"
"Information","http-nio-8500-exec-5","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-revokeinstance-662""}"
"Information","http-nio-8500-exec-5","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-deleteinstance-662""}"
Result from second logfile (asynchttp2.log)
"Information","cfthread-0","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-publishinstance-662""}"
"Information","cfthread-1","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-revokeinstance-662""}"
"Information","cfthread-3","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-deleteinstance-662""}"
Result from third logfile (asynchttp3.log)
"Information","cfthread-0","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-revokeinstance-662""}"
"Information","cfthread-3","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-deleteinstance-662""}"
"Information","cfthread-1","02/08/16","14:20:55","CONTENSTESTS","{""DELETESCHEDULEDTASK"":""contenstests-revokeinstance-662""}"
As you see the data changed - "revokeinstance"
Expected Result:
struct data should not change
Any Workarounds:
-
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4126397
External Customer Info:
External Company: CONTENS
External Customer Name: Harry Klein
External Customer Email: KLEIN@CONTENS.DE
External Test Config:
Bug File Paths:
\\sjshare.corp.adobe.com\Prereleasebugfiles\ColdFusion\12.0\RC1_v12\4114981\testformatforlist.cfm
Attachments:
Comments: