Title:
cfcontent sends corrupt binary data when query string is present with CF11s isapi_redirect.dll
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Peter Boughton / Peter Boughton (Peter Boughton)
Created: 11/18/2014
Components: Web Container (Tomcat)
Versions: 11.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: CF11_Final / CF11 Update5
Priority/Frequency: Critical / All users will encounter
Locale/System: ALL / Win All
Vote Count: 1
# Problem Description
CF11 connected to IIS 7.5 and standard URL rewriting
When using cfcontent to send a non-public binary file (e.g. image or pdf), the presence of a query string in the URL will cause CF to send a corrupt file that only has the relevant header, but has different content.
Switching C:\ColdFusion11\config\wsconfig\1\isapi_redirect.dll with the version from CF10 and restarting CF/IIS causes the problem to go away.
Further information available: https://groups.google.com/forum/#!topic/coldbox/CYoeeZlmjJg
# Steps to Reproduce:
getjelly.cfm
<cfcontent type="image/jpg" file=#expandPath('./Jellyfish.jpg')# /><cfabort/>
web.config rewrite rule:
<rule name="jelly" patternSyntax="ExactMatch" stopProcessing="true">
<match url="jelly" />
<action type="Rewrite" url="getjelly.cfm" appendQueryString="true" logRewrittenUrl="true" />
</rule>
Browse to localhost/getjelly.cfm and the image displays.
Browse to localhost/jelly and the image displays.
Browse to localhost/jelly?nocache=12345 and the image fails.
# Actual Result:
A corrupted file of the appropriate type (i.e. a jpg file has the JPEG magic number, a PDF file has a PDF header)
# Expected Result:
The correct file should always be returned; the presence of a query string should not affect this.
# Any Workarounds:
* Use CF10's isapi_redirect.dll
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3853535
External Customer Info:
External Company:
External Customer Name: boughtonp
External Customer Email:
External Test Config: My Hardware and Environment details:
Attachments:
Comments: