Title:
CHTTP returns filecontent as java.io.ByteArrayOutputStream when mimetype is application/json
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): James Moberg / James Moberg (James Moberg)
Created: 06/06/2013
Components: Net Protocols, HTTP
Versions: 9.0.1
Failure Type:
Found In Build/Fixed In Build: 9.0.1 /
Priority/Frequency: Major / All users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 0
Problem Description: I'm accessing the OpenWeatherMaps API with ColdFusion 9,0,1,274733 (Java 1.6.0_29) and the data is not returned as plain text in the CFHTTP.FileContent response variable.
Steps to Reproduce:
<cfhttp url="http://api.openweathermap.org/data/2.5/find?=New+York&mode=json" method="GET">
<CFDUMP VAR="#CFHTTP#">
Actual Result: CFHTTP.FileContent is "object of java.io.ByteArrayOutputStream" instead of JSON data. (CFHTTP.Text = "no")
Expected Result: Usable JSON data... use your browser to open this URL:
http://api.openweathermap.org/data/2.5/find?=New+York&mode=json
Any Workarounds: Use Java? Use CFHTTP.FileContent.toString() to convert the object to a text string containing the JSON data. (This won't impact the value if FileContent is already plaintext.)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3574332
External Customer Info:
External Company:
External Customer Name: Jamo
External Customer Email:
External Test Config: My Hardware and Environment details: ColdFusion 9,0,1,274733 (Java 1.6.0_29) on Windows Server 2008 R2 (64 bit)
NOTE: I tried this same request using CF10 and it return a text JSON string instead of an object.
Attachments:
Comments: