def canonicalize(self, path):
if os.path.isabs(path):<EOL><INDENT>out = os.path.normpath(path)<EOL><DEDENT>else:<EOL><INDENT>out = os.path.normpath("<STR_LIT:/>" + path)<EOL><DEDENT>if sys.platform == "<STR_LIT:win32>":<EOL><INDENT>out = out.replace("<STR_LIT:\\>", "<STR_LIT:/>")<EOL><DEDENT>return out<EOL>
Return the canonical form of a path on the server.  For example,
if the server's home folder is ``/home/foo``, the path
``"../betty"`` would be canonicalized to ``"/home/betty"``.  Note
the obvious security issues: if you're serving files only from a
specific folder, you probably don't want this method to reveal path
names outside that folder.

You may find the Python methods in ``os.path`` useful, especially
``os.path.normpath`` and ``os.path.realpath``.

The default implementation returns ``os.path.normpath('/' + path)``.