Title:
[ANeff] Bug for: cfhttp throws "Incorrect number of columns in row" if quoted CSV value contains newline
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 05/13/2016
Components: Net Protocols, HTTP
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: CF2016_Final /
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win XP All
Vote Count: 1
cfhttp throws "Incorrect number of columns in row" if quoted CSV value contains newline
Repro:
<cfscript>
myCSV = 'col1,col2' & chr(13) & chr(10) & '"val,' & chr(10) & 'ue",value2';
cfspreadsheet(action="write", filename=expandPath("./myXLS.xls"), name="myCSV", format="csv", overwrite=true);//works (good)
myCSV = 'col1,col2' & chr(13) & chr(10) & '"val,' & chr(10) & 'ue",value2';
fileWrite(expandPath("./myCSV.csv"), myCSV);
cfhttp(url='http://' & CGI.HTTP_HOST & getDirectoryFromPath(CGI.SCRIPT_NAME) & 'myCSV.csv', name="resultQuery");//throws "Incorrect number of columns in row."
</cfscript>
Actual result: "Incorrect number of columns in row."
Expected result: query created successfully
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4152543
External Customer Info:
External Company:
External Customer Name: Aaron Neff
External Customer Email:
Attachments:
Comments: