• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

ColdFusion 11 cfcontent failing

New Here ,
Nov 13, 2014 Nov 13, 2014

Copy link to clipboard

Copied

I have a stumper.  Installed CF11 on our test server. Did some regression testing and am running into an issue. I have a .cfm that downloads information to Excel. It renders fine in CF10 (and prior versions). In CF11, it renders fine in IE10 and in FireFox. It however fails horribly in IE8 and since most of our users are still required to be on IE8, this is a showstopper.

Here is the code that sets up the excel dump - page name is show_table.cfm:

 

  <cfif IsDefined('URL.ExcelDump')>

        <cfheader name="Content-Disposition" value="filename=#Session.utilstablename#.xls">

  <cfcontent type="application/vnd.ms-excel">

  </cfif>

The website runs under SSL.  I have already turned off these lines - with no change in the below error:

       <META http-EQUIV="Pragma" CONTENT="no-cache">

       <META http-EQUIV="cache-control" CONTENT=" no-store,no-cache, must-revalidate">

This is what I expect to happen - IE10 does a similar open/save panel:

CF 11 FF download works.JPG

here is what happens in IE8:

CF 11 IE8 download issue.jpg

Note that the filename on the fail is the same as the .cfm page that is trying to do the download. It's like it does not see the cfheader setting it to the expected name (which for this particular download should be er_quality_items_view.xls). I tried commenting out the cfheader to make it take the default, and no change to the error.

It looks to me like this is a bug in CF11....any suggestions on how to get around this failure?

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Nov 20, 2014 Nov 20, 2014

Specific to your problem is the behavior of some versions of IE

Quoting MVP Erik Law (link below):

"if a user tries to download a file over a HTTPS connection, any response headers that prevent caching will cause the file download process to fail."

So, it's actually the provision of Cache-Control header tokens like no-cache & no-store, a Vary header or the infamous Pragma no-cache header which are causing the browser to abort the download when over ssl. Assuming Erik Law's blog link survives the te

...

Votes

Translate

Translate
Explorer ,
Nov 20, 2014 Nov 20, 2014

Copy link to clipboard

Copied

Specific to your problem is the behavior of some versions of IE

Quoting MVP Erik Law (link below):

"if a user tries to download a file over a HTTPS connection, any response headers that prevent caching will cause the file download process to fail."

So, it's actually the provision of Cache-Control header tokens like no-cache & no-store, a Vary header or the infamous Pragma no-cache header which are causing the browser to abort the download when over ssl. Assuming Erik Law's blog link survives the test of time, you can read all about it via the link below.

So, site-wide CFHEADER cache settings may be good in general, but you'll want to clear all that out when it comes to downloading files. Try placing this little gem above your download CFML code:
<cfset getPageContext().getResponse().reset() />
and test again.

http://blogs.msdn.com/b/ieinternals/archive/2009/10/03/internet-explorer-cannot-download-over-https-...


https://groups.google.com/forum/?fromgroups#!topic/openbd/ke6cSVHXMfM

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 21, 2014 Nov 21, 2014

Copy link to clipboard

Copied

LATEST

adding that reset solves the problem...this fixed our issue, hope this  helps a few others on this forum.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation