Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 878

Show
Ignore:
Timestamp:
12/19/05 20:03:58
Author:
peterhunt
Message:

fix which now allows us to serve static content directly alongside dynamic content. staticFilter won't take over the entire request if it doesn't find the file

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/filters/staticfilter.py

    r856 r878  
    4141            if root: 
    4242                filename = os.path.join(root, filename) 
     43 
     44        try:         
     45            cptools.serveFile(filename) 
     46            request.executeMain = False 
     47        except cherrypy.NotFound: 
     48            # if we didn't find the static file, continue 
     49            # handling the request. we might find a dynamic 
     50            # handler instead. 
     51            pass 
    4352         
    44         cptools.serveFile(filename) 
    45         request.executeMain = False 
    46  

Hosted by WebFaction

Log in as guest/cpguest to create tickets