| Summary: | [sites] Stop caching 404s served through a hosted site | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> |
| Component: | Server | Assignee: | Mark Macdonald <mamacdon> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | libingw, mamacdon |
| Version: | 0.5 | ||
| Target Milestone: | 1.0 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Susan McCourt
I think the bug might be as simple as "sites launched by view on site don't launch from the link in the sites page." Mark, could you check whether there is an obvious problem in M1? I haven't been able to reproduce the "site is stopped" error (tried on localhost and orion.eclipse.org). But I do see a usability problem. In Step 5 I get an error because there's no /index.html or / defined, so there's nothing to show when I navigate to the root of the site. This is because "View on site" in Step 2 creates a site with the HelloWorld content at http://hello-world-site.orion.eclipse.org/Hello%20World, not http://hello-world-site.orion.eclipse.org/. I can change the "View on site" logic to mount the folder at the root of the site when you "View on" a new site. This way you'll be able to navigate to it from the sites page and get a sensible result. OK, I (finally) came up with an explanation for this. 1. Load http://susans-demo.orion.eclipse.org/ while the site is stopped. --> browser caches the 404. 2. Run Actions->View on site. The site is started, and you're taken to http://susans-demo.orion.eclipse.org/Hello%World/ --> this URL loads as expected. 3. Click through from the Sites page to http://susanstestsite.orion.eclipse.org/ --> browser serves the cached 404. * In Step 1, the hosted site URL gets swept up by our server-wide cache filter: > Cache-Control:max-age=900, must-revalidate This means the site root will appear to be "stopped" until 15 minutes has passed or you do Ctrl+Shift+R on it. * Step 2 succeeds because the /Hello%World/ URL slips past the cache filter -- it only seems to affect the root (/) and URLs that end in .(html|js|css). * Step 3 (assuming it's run within 15 minutes of Step 1) causes the site root to appear "stopped" when it isn't. Hosted content is supposed to be excluded from caching, but that evidently isn't happening when we serve 404s. Libing is running into this problem with plugins, and it's even more annoying. When you're dealing with a plugin that fails to load because of a cached 404, fixing it is a 2-step process: you have to first clear the cache (or Ctrl+Shift+R), *then* reload the plugin data on the Settings page to get your services back. Add a "no-cache" instruction when serving up a "stopped" site through the sites api. http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=b42f3ed8fc476ae9de5c65e5a6761ec123014251 |