tracker issue : CF-3909694

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

The function gethttpRequestData() fails when form posted with encType="application/octet-stream"

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Ian Clark / Ian Clark (Ian Clark)

Created: 12/15/2014

Components: Language

Versions: 11.0

Failure Type: Data Loss

Found In Build/Fixed In Build: CF11_Final / CF11 Update5

Priority/Frequency: Critical / All users will encounter

Locale/System: ALL / Solaris All

Vote Count: 0

Listed in the version 11.0.05.293506 Issues Fixed doc
Problem Description:I have action script code compiled into a SWF file that breaks large files into chunks to send to the sderver. On the server I have code to reconstruct the file. To do this I am using the gethttpRequestData().content object. This has been working for over a year on cold fusion 9. It started to fail when up upgraded our development server to 11. I can run the code on a windows 7 PC with cold fusion 11 and it will work. It only fails on Solaris 11 with cold fusion 11 and Apache web server.

Steps to Reproduce:You need to do a post of a file with content type set to "application/octet-stream"  then have cold fusion dump the gethttpRequestData() structure content will be empty yet in the header records the content size will be correctly reported. This is similar to bug 3700163 . The attached zip file contains the swf file and associated cold fusion code to demostrate the issue.

Actual Result: Content is null

Expected Result: Binary data of file chunk

Any Workarounds:No and we only have a 30 day window before we go live with the conversion to production.

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

Watson Bug ID:	3909694

External Customer Info:
External Company:  
External Customer Name: iclark3509
External Customer Email:  
External Test Config: My Hardware and Environment details: Solaris 11, Cold Fusion 11 apache 2.2

Attachments:

  1. December 16, 2014 00:00:00: 1_fileupload.zip
  2. January 21, 2015 00:00:00: 2_swfobject.js
  3. January 23, 2015 00:00:00: 3_Large_file_upload_on_enile_machine.swf
  4. January 23, 2015 00:00:00: 4_Large_File_on_New_Test_Server.swf
  5. February 07, 2015 00:00:00: 5_fileUploadNoneDB_(2).zip

Comments:

swfobject.js which is provided in source code throws an exception, there seems to be a code snippet missing from provided file. Please provide us working code to repro the case.
Comment by Akhila K.
9405 | January 21, 2015 05:58:37 AM GMT
On trying to fix the syntax exception, there were few more issues related to try-catch block part of code in swfobject.js around line number 247, please fix and provide us the same. Thanks.
Comment by Akhila K.
9406 | January 21, 2015 06:09:36 AM GMT
The swfobject.js is a standard file generated by Adobe Flash builder. Perhaps it became corrupted in the zip file. I have uploaded anther copy
Comment by External U.
9407 | January 21, 2015 08:57:25 AM GMT
I have included to short film clips. The first one :Large_file_upload_on_enile_machine.swf shows how the upload works on our existing test server. Cold Fusion 9. As the upload is in process you can see each chunk being sent to the server. The second one is exactly the same code running on our new test server with Cold Fusion 11 and Solaris 11 and apache 2.2. When the upload starts the first chunk is sent and I show that the request content is indeed binary data. Yet the server does not get any content and thus the upload fails. This is becoming a critical issue as we are due to be moving to the new environment in the near future.
Comment by External U.
9408 | January 23, 2015 08:14:56 AM GMT
The original zip file I uploaded had a swf file that was corrupted when the code was moved between machines. It would not load into the player. The code in fileUploadNoneDB (2).zip has been tested as standalone code on 11 & Solaris and like our production code it fails. It should be called using FileUploaderApp.cfm which loads the swf and sets some flash vars. The file being uploaded must be more that 50MB to force the chunking. It will read the file into memory. Caclate a check digit and then try to upload. If you watch the net work traffic from the browser. It does a get to the act_uploadfile.cfm to see if the file upload has already been done/started for this file. If it has not the response will be success when 0 for offset. If it had previously been started it would return the bytes already loaded. Next it does the post of the first chunk. which starts a size of 51200. On windows or on Cold Fusion 9 this will be followed by a series of post until the file is uploaded. On 11 it stops here. in the act_uploadfile.cfm I dump the getHTTPRequestData to a file. In there you will see that the content is empty even though the header says it is 51200. In this sample I do not clean up the files written. So to run it more than once you need to delete the files written.
Comment by External U.
9409 | February 06, 2015 12:08:42 PM GMT
Fix will be available in Update 5. System property -Dcoldfusion.bufferoctetstream=true should be provided in jvm.config to get the fix in place.
Comment by Krishna R.
9410 | February 18, 2015 08:05:17 AM GMT
The fix for this bug is available in the pre-release build of ColdFusion 11 Update 5
Comment by CFwatson U.
9411 | February 20, 2015 09:27:18 AM GMT