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

Changeset 1104

Show
Ignore:
Timestamp:
05/10/06 02:44:54
Author:
fumanchu
Message:

Fixed xmlrpc tool to use InternalRedirect? (only when needed!).

Files:

Legend:

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

    r1102 r1104  
    319319    def setup(self): 
    320320        """Hook this tool into cherrypy.request using the given conf.""" 
    321         cherrypy.request.path_info = _xmlrpc.patched_path(cherrypy.request.path_info) 
    322         cherrypy.request.error_response = _xmlrpc.on_error 
     321        request = cherrypy.request 
     322        if hasattr(request, 'xmlrpc'): 
     323            return 
     324        request.xmlrpc = True 
     325        request.error_response = _xmlrpc.on_error 
     326        path_info = request.path_info 
     327        ppath = _xmlrpc.patched_path(path_info) 
     328        if ppath != path_info: 
     329            raise cherrypy.InternalRedirect(ppath) 
    323330xmlrpc = _XMLRPCTool() 
    324331 

Hosted by WebFaction

Log in as guest/cpguest to create tickets