Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 107721

Summary: Item preview pages should not be cached
Product: [Retired] Red Hat Enterprise CMS Reporter: Daniel BerrangĂ© <berrange>
Component: otherAssignee: Archit Shah <archit.shah>
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: high Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-07 23:14:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 100952, 106597    

Description Daniel Berrangé 2003-10-22 13:36:32 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.9 (X11; Linux i686; U;) Gecko/20030314

Description of problem:
The old ItemDispatcher used to disable caching when previewing draft content
items. The new ContentSectionServlet lost this behaviour and now  allows both
published & draft preview pages to be cached. THis is wrong because it means
authors don't see their changes unless they force the browser to reload the page
& discard the cached copy.

This must be applied to 6.0 & rickshaw

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create an item
2. Preview the item
3. Make a change to the item
4. Preview the item again
    

Actual Results:  The change from step 3 doesn't appear

Expected Results:  The change from step 3 does appear

Additional info:

Example *incorrect* cache headers on preview:

dan@camden$ wget -S http://dev:9068/ccm/content/preview/foo.en
--14:34:51--  http://dev:9068/ccm/content/preview/foo.en
           => `foo.en.1'
Resolving dev... done.
Connecting to dev[172.16.68.5]:9068... connected.
HTTP request sent, awaiting response... 
 1 HTTP/1.0 200 OK
 2 Server: Resin/2.1.10
 3 Cache-Control: public, max-age=1123200
 4 Expires: Tue, 04 Nov 2003 13:34:52 GMT
 5 Last-Modified: Wed, 22 Oct 2003 13:34:52 GMT
 6 Set-Cookie: JSESSIONID=aSOBZhl2LsKc; path=/
 7 Content-Type: text/html; charset=UTF-8
 8 Date: Wed, 22 Oct 2003 13:34:53 GMT

    [ <=>                                                                      
                                           ] 4,622          4.41M/s             

14:34:53 (4.41 MB/s) - `foo.en.1' saved [4622]

dan@camden$ 

Headers 3,4,5 should in fact be:

 3 Pragma: no-cache
 4 Cache-Control: must-revalidate, no-cache
 5 Expires: Thu, 01 Jan 1970 00:00:00 GMT

Comment 1 Archit Shah 2003-11-05 18:36:55 UTC
fixed at 37713 for dev and 37715 for 6.0.x