Bug #359

Non-standard theme path causes bad caching

Added by Redmine Admin 1222 days ago. Updated 790 days ago.

Status :Closed Start :
Priority :Normal Due date :
Assigned to :tobi - % Done :

0%

Category :backend
Target version :2.5
Resolution :

fixed


Description

I just went to

http://my-blog.domain.com/theme/images?filename=hdr.gif
. It served up the image properly, but it cached it in typo/public/theme/images.html (the GIF file was images.html). This is obviously incorrect. In fact, it shouldn't be caching it at all because there's a question mark in the URL, regardless of anything else.

Associated revisions

Revision 0a6caee0560910a09aae634ccac3e62ca4d05fa0
Added by scott 1191 days ago

Add missing file (closes #359)

git-svn-id: http://svn.typosphere.org/typo/trunk@585 820eb932-12ee-0310-9ca8-eeb645f39767

Revision f8fcfd23e9f787f70c1178724b8918bf95d7725d
Added by scott 1193 days ago

Configurable tag sidebar. (closes #359)

git-svn-id: http://svn.typosphere.org/typo/trunk@582 820eb932-12ee-0310-9ca8-eeb645f39767

History

07/29/2005 02:57 PM - scoop -

The question mark (or rather the query params part of the URL) sadly never makes it into ApplicationController#cache_page which means the conditional in there is useless as it is right now. Can we check @request?

07/29/2005 05:34 PM - scott -

We should really remove /theme from the route space. If we remove the default :controller/:action/... line, it'll break at least a couple article actions, but does anything else depend on it? Perhaps adding a /articles/:action line in place of :controler/:action would do the trick?

07/29/2005 06:06 PM - Redmine Admin

Alternately, we could just put a conditional on :controller to make it not equal theme.

What happened to the description of the ticket? My link turned into an image tag...

07/29/2005 07:31 PM - scott -

Wow, functional tests are amazingly unhappy without the default route.

07/31/2005 10:34 PM - scott -

I'm going to commit a route that deep-sixes all /theme/* URLs. This isn't the ideal fix for this, but removing the default :controller/:action/:id line breaks too many things for this phase of development. Once we get 2.5 out and we're more willing to break things, then we should come up with a cleaner fix.

07/31/2005 10:36 PM - scott -

  • Status changed from New to Closed
  • Resolution set to fixed

(In r474) Blocked access to theme_controller directly via /theme. (closes #243)

07/31/2005 10:38 PM - scott -

See #252 for the milestone-4.0 cleanup associated with this.

07/31/2005 11:58 PM - Redmine Admin

Instead of the fix in r474 you could have added a condition on the anything route to make sure :controller didn't equal theme, something like :controller => /^(?!theme$).*$/.

Also available in: Atom PDF