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

Changeset 1111

Show
Ignore:
Timestamp:
05/25/06 12:49:31
Author:
fumanchu
Message:

tree.mount now strips trailing slash on script_name.

Files:

Legend:

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

    r1108 r1111  
    4343    def mount(self, root, script_name="", conf=None): 
    4444        """Mount a new app from a root object, script_name, and conf.""" 
    45         if script_name == "/": 
    46             script_name = "" 
     45        # Next line both 1) strips trailing slash and 2) maps "/" -> "". 
     46        script_name = script_name.rstrip("/") 
    4747        app = Application(root, script_name, conf) 
    4848        self.apps[script_name] = app 

Hosted by WebFaction

Log in as guest/cpguest to create tickets