tracker issue : CF-3926479

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

CF11 is setting cache-control and expires headers.

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Peter Boughton / Peter Boughton (Peter Boughton)

Created: 01/23/2015

Components: Language

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: ALL / Windows 7

Vote Count: 0

A simple request with no cfcontent/cfheaders involved is returning this:

	HTTP/1.1 200 OK
	Server: Apache-Coyote/1.1
	Cache-Control: no-cache, no-store, must-revalidate, max-age=0
	Pragma: no-cache
	Expires: Thu, 01 Jan 1970 00:00:00 GMT
	Content-Type: text/html;charset=UTF-8
	Transfer-Encoding: chunked
	Date: Fri, 23 Jan 2015 12:03:12 GMT

The Cache-Control, Pragma, and first Expires header should not be there. There is no CFML code adding them. (The page is being requested, not refreshed nor force refreshed.)

Setting an Expires header manually is appending to the existing incorrect header, for example:

	<cfheader name="Expires" value=#getHttpTimeString(Now()+10)# />
	<cfoutput>#Now()#</cfoutput>
	<cfsetting showdebugoutput=false />

Results in this response:

	HTTP/1.1 200 OK
	Server: Apache-Coyote/1.1
	Cache-Control: no-cache, no-store, must-revalidate, max-age=0
	Pragma: no-cache
	Expires: Thu, 01 Jan 1970 00:00:00 GMT
	Expires: Mon, 02 Feb 2015 12:03:41 GMT
	Content-Type: text/html;charset=UTF-8
	Transfer-Encoding: chunked
	Date: Fri, 23 Jan 2015 12:03:41 GMT

The Cache-Control, Pragma, and first Expires header should not be there. There is no CFML code adding them.

This occurs when going via Tomcat's Coyote web server, but going via IIS results in the same behaviour.

This is happening in all browsers, and can be confirmed as not a browser issue by sending a manual HTTP request (e.g. using PuTTY)...

Using this code:

	<cfdump var=#getHttpRequestData().headers# format=text />
	<cfsetting showdebugoutput=false />

Then connecting to 127.0.0.1:8500 and sending this HTTP request:

	GET /test_expires.cfm HTTP/1.1
	Host: localhost
	
Results in the response:

	HTTP/1.1 200 OK
	Server: Apache-Coyote/1.1
	Set-Cookie: JSESSIONID=35BF5B5408B900B856D25B95F69F8161.cfusion; Path=/; HttpOnly
	Cache-Control: no-cache, no-store, must-revalidate, max-age=0
	Pragma: no-cache
	Expires: Thu, 01 Jan 1970 00:00:00 GMT
	Content-Type: text/html;charset=UTF-8
	Transfer-Encoding: chunked
	Date: Fri, 23 Jan 2015 12:05:16 GMT
	
	2c
	<pre>struct
	
	host: localhost
	</pre>

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

Watson Bug ID:	3926479

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

Attachments:

Comments:

p.s. you really need to fix this bugbase software to preserve tabs (and preferably have proper formatting available). Just running it through MarkdownJ would be a trivial thing to do and be a huge improvement.
Comment by External U.
8821 | January 23, 2015 06:44:24 AM GMT
Hi Peter, Regarding IIS, which version? The following is what Wireshark shows me without the above cfheader tag and then with the above cfheader tag, in CF11 Update 3: HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/html;charset=UTF-8 Content-Encoding: gzip Vary: Accept-Encoding Server: Microsoft-IIS/8.5 X-Frame-Options: SAMEORIGIN Date: Thu, 29 Jan 2015 10:37:45 GMT HTTP/1.1 200 OK Transfer-Encoding: chunked Content-Type: text/html;charset=UTF-8 Content-Encoding: gzip Expires: Sun, 08 Feb 2015 10:39:06 GMT Vary: Accept-Encoding Server: Microsoft-IIS/8.5 X-Frame-Options: SAMEORIGIN Date: Thu, 29 Jan 2015 10:39:06 GMT Thanks!, -Aaron
Comment by External U.
8822 | January 29, 2015 05:14:42 AM GMT
Thanks for checking Aaron, It's IIS 7.5 on Windows 7, but connecting to localhost on port 8500 with PuTTY will not be involving IIS (unless something is screwed up). This is on CF11 update 2, because update 3 is broken.
Comment by External U.
8823 | January 29, 2015 08:18:48 AM GMT
We are unable to repro the case with update 2 and 3 on CF11. Could you please verify on latest update and let us know about this? Also you have mentioned "update 3 is broken", which functionality is being referred to be broken, please let us know .
Comment by Akhila K.
8824 | February 17, 2015 03:49:02 AM GMT
We are seeing this as well on some servers (update 3).
Comment by External U.
8825 | February 25, 2015 12:35:03 PM GMT
Has any progress been made on this bug? We are experiencing the same issue. We are not going to upgrade our production to 11 until we get this figured out. Version 11,0,04,293328 Tomcat Version 7.0.54.0 Edition Developer Operating System Windows 7 OS Version 6.1
Comment by External U.
8826 | April 08, 2015 12:45:32 PM GMT
We were experiencing the same problem with some servers that have ColdFusion 11 update 3 installed. We found out that the cache header is coming from MobileDeviceDomInspectionFilter filter in web.xml. Try to comment out the filter and its filter-mappings
Comment by External U.
8827 | April 27, 2015 03:14:48 AM GMT
Thanks Julia, I can confirm that commenting out the MobileDeviceDomInspectionFilter filter and filter-mappings in C:\ColdFusion11\cfusion\wwwroot\WEB-INF\web.xml then restarting the CF service solves the problem here. Given that we're not using any mobile-related functionality, I'm not sure why that filter was doing anything at all. :/
Comment by External U.
8828 | April 27, 2015 06:36:20 AM GMT
Please make this a priority. The workaround suggested by Peter works; however, we shouldn't have to be forced to use the workaround.
Comment by External U.
8829 | June 22, 2015 07:57:15 AM GMT
We are planning to purchase coldfusion 11. Kindly confirm if this issue has been resloved. Regards, Vivek
Comment by External U.
8830 | July 16, 2015 04:27:44 PM GMT
Mobile DOM inspection is a development feature gets enabled only when the server is installed using development profile. When server is installed using production profile this issue will not occur. When server is installed using production profile the installer comments out the respective filter and filter mappings in web.xml. To disable this feature Go to Debugging & Logging -> Remote Inspection settings -> uncheck allow remote inspection and submit the changes.
Comment by S V.
8831 | July 20, 2015 04:40:19 AM GMT