Status/Resolution/Reason: Closed/Withdrawn/NotABug
Reporter/Name(from Bugbase): Raymond Camden / Raymond Camden (Raymond Camden)
Created: 09/22/2012
Components: REST Services
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Mac 10.7 64-bit
Vote Count: 1
Ok, this could be very bad I think. Consider this simple REST cfc:
component rest="true" restPath="contentService2" {
remote string function helloWorldSimple() httpmethod="get" produces="text/plain" {
return "Content Simple";
}
remote struct function helloWorldComplex() httpmethod="get" produces="text/xml,application/json" {
writelog('called');
var code = randRange(1,100);
return {code:code, message:"Content Complex"};
}
}
I wrote a simple CFM to request this service, once asking for xml, once json:
<cfhttp url="http://localhost:8500/rest/cfwack5_root/contentService2">
<cfhttpparam type="header" name="Accept" value="application/json" />
</cfhttp>
<cfdump var="#cfhttp.filecontent#">
<p>
<cfhttp url="http://localhost:8500/rest/cfwack5_root/contentService2">
<cfhttpparam type="header" name="Accept" value="text/xml" />
</cfhttp>
<cfdump var="#cfhttp.filecontent#">
When run, the result was formatted right, ie JSON for the first one and XML for the second, but, crucially, the number was either the same, or one off. So I'd either get 5 and 5 for example or 5 and 4. Only once in about 30 reloads did I get two numbers that were very different.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3335493
External Customer Info:
External Company:
External Customer Name: cfjedimaster
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: