Title:
The function gethttpRequestData() fails when form posted with encType="multipart/form-data"
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
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 / CF11 Update5
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Windows 7 64-bit
Vote Count: 2
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: 3700163
External Customer Info:
External Company:
External Customer Name: BKBK
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: