On Sat, Dec 27, 2008 at 1:26 PM, Tycon <adie...@gmail.com> wrote: > > I use /static for all my static file, except maybe robots and favicon > which cant be moved. > As for StaticURLParser, using that as the first choice in the Cascade > is wasteful cause > it means pylons will do a file lookup for every request (bad > performance) in addition to the > fact that filenames may hijack pylons controller mapped routes (bad > design calling for bugs). > > You can (and should) get rid of StaticURLParser and the Cascade if > your web server is serving > the static files (with a /static url prefix), or at least move > StaticURLParser to the second choice > in the Cascade when accessing the app directly from Paster http server > (without a separate web server).
My, he's opinionated. In a high-traffic situation you'd have Apache or your favorite webserver serve the static URLs before the application sees them, and then you can get rid of StaticURLParser and Cascade entirely. I'm not sure whether moving StaticURLParser after the Pylons application would be better or worse. My instinct is that it would be worse because a typical dynamic page has several static components. As for a filename "hijacking" a mapped route, I'm not sure what you mean. If you mean that with identical URLs, the static one is chosen, that's the programmer's problem; he should arrange the URLs so they don't overlap (and think about putting static files under a few well-known directories while he's at it). -- Mike Orr <sluggos...@gmail.com> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---