Issue #113 resolved

First try to map URL to object, then try static file

Anonymous created an issue

This will allow this in the cfg file:

[staticContenct] / = /home/mysite/static /download = /mount/hda

Reported by rdelon

Comments (11)

  1. Anonymous

    The staticfilter still does not fix this. That's why I wrote "a patch for staticfilter".

  2. Anonymous

    steadicat,

    I don't see how your problem cannot ve solved by the new static filter. I may miss something but :

    [staticContenct]
    / = /home/mysite/static
    /download = /mount/hda
    

    Looks equivalent to me to:

    [/]
    staticFilter.on = True
    staticFilter.dir = /home/mysite/static
    
    [/download]
    staticFilter.on = True
    staticFilter.dir = /mount/hda
    

    So where is the problem?

  3. Anonymous

    The problem is it doesn't work. The ticket's title is "First try to map URL to object, then try static file".

    Right now if you use:

    [/]
    staticFilter.on = True
    staticFilter.dir = /home/mysite/static
    

    all requests are handled by the static filter. There is no way to pass all requests not handled by the code to the static filter, which is an expected behavior and a feature requested many times by people who I've talked to about CherryPy.

  4. Anonymous

    We won't do this: people need to explicitely use staticFilter to serve static content (even for a single file).

  5. Log in to comment