Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 436391

Summary: Self hosting sites on internal Orion dev server have incorrect cache headers
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ServerAssignee: Simon Kaegi <simon_kaegi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Michael_Rennie, simon_kaegi
Version: 5.0   
Target Milestone: 6.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2014-06-02 13:22:50 EDT
1. Start a self-hosting site at orion.eclipse.org (eg. foo.orion.eclipse.org)
2. Navigate to http://foo.orion.eclipse.org:8080/plugins/fileClientPlugin.html
3. Press F12 to open the developer tools and reload the page
4. In the Network tab inspect the response headers. You will see

> Cache-Control:max-age=900, must-revalidate        !!
> Content-Type:text/html
> ETag:e6d98e92e284dfeefbd689ecae9273c7ad1c28
> Expires:Mon, 02 Jun 2014 17:26:26 GMT
> Server:Jetty(8.1.15.v20140411)
> X-Edit-Server:http://orion.eclipse.org/edit/edit.html#
> X-Edit-Token:/file/mrennie-OrionContent/org.eclipse.orion.client/bundles/org.eclipse.orion.client.ui/web/plugins/fileClientPlugin.html

This is wrong and will cause problems for developers (unless they are extremely careful to run with their browser's "Disable cache" option set). Resources on a self-hosted site should not be cached. The site servlet is expected to set the cache-control header to no-cache.
Comment 1 Simon Kaegi CLA 2014-06-12 15:56:20 EDT
In the GenericFileServlet I fixed the 304 path so it always return a Cache Control header.