tracker issue : CF-3700164

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

The function gethttpRequestData() fails when form posted with encType="multipart/form-data"

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): A. Bakia / A. Bakia (A. Bakia)

Created: 01/28/2014

Components: Language

Versions: 10.0

Failure Type: Non Functioning

Found In Build/Fixed In Build: Final /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Windows 7 64-bit

Vote Count: 0

Duplicate ID:	CF-3700163

Problem Description: The function gethttpRequestData() fails to function as expected when a form is submitted with attributes method="post" and encType="multipart/form-data".

Steps to Reproduce:run the following code:

 1) Run the following code:

<cfif isDefined("Form.fieldContent")>
    <cfoutput>
    isBinary(gethttpRequestData().content): #isBinary(gethttpRequestData().content)#<br>
    binaryEncode(gethttpRequestData().content, 'hex'): #binaryEncode(gethttpRequestData().content, 'hex')#<br>
    </cfoutput>
    <cfdump var="#gethttpRequestData().content#" label="gethttpRequestData().content dump">
   <cffile action="write" file="#expandPath('testBinary')#" output="#gethttpRequestData().content#">
</cfif>
 
<cfoutput><form method="post" action="#cgi.SCRIPT_NAME#" enctype="multipart/form-data"></cfoutput>
<input name="fieldContent" type="text">
<br>
<input name="sbmt" type="submit" value="Send">
</form>

2) Enter 0123456789 in the text field and submit the form. 

Actual Result:
a) isBinary(gethttpRequestData().content) returns 'Yes'.
b) binaryEncode(gethttpRequestData().content, 'hex') returns an empty string.
c) The dump shows no detail, is therefore apparently blank.
d) The file, testBinary, is created, but has 0 bytes.

Expected Result: I expected the following
a) isBinary(gethttpRequestData().content) to return 'Yes'.
b) binaryEncode(gethttpRequestData().content, 'hex') to return a non-empty, hex-encoded string.
c) The dump to show a table consisting of rows of data.
d) The file, testBinary, to be created, and to contain the data from the form.


Any Workarounds:

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

Watson Bug ID:	3700164

External Customer Info:
External Company:  
External Customer Name: BKBK
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

I ran the same code on Railo 4.1.2.005 and got the expected result! For details, follow this link to the ColdFusion forum: http://forums.adobe.com/message/6060019#6060019
Comment by External U.
13592 | January 28, 2014 07:42:42 AM GMT