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

Changeset 835

Show
Ignore:
Timestamp:
11/26/05 13:06:53
Author:
fumanchu
Message:

Made some Request.run arg assignments sooner.

Files:

Legend:

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

    r809 r835  
    1919    from cherrypy._cpthreadinglocal import local 
    2020 
    21 # Create a threadlocal object to hold the request and response objects. 
    22 # In this way, we can easily dump those objects when we stop/start a 
    23 # new HTTP conversation. 
     21# Create a threadlocal object to hold the request and response 
     22# objects. In this way, we can easily dump those objects when 
     23# we stop/start a new HTTP conversation, yet still refer to 
     24# them as module-level globals in a thread-safe way. 
    2425serving = local() 
    2526 
  • trunk/cherrypy/_cphttptools.py

    r833 r835  
    4545         
    4646        """ 
     47        self.requestLine = requestLine.strip() 
     48        self.headers = list(headers) 
     49        self.rfile = rfile 
     50         
    4751        if cherrypy.profiler: 
    48             cherrypy.profiler.run(self._run, requestLine, headers, rfile
    49         else: 
    50             self._run(requestLine, headers, rfile
     52            cherrypy.profiler.run(self._run
     53        else: 
     54            self._run(
    5155        return cherrypy.response 
    5256     
    53     def _run(self, requestLine, headers, rfile): 
     57    def _run(self): 
    5458         
    5559        try: 
    56             self.headers = list(headers) 
    5760            self.headerMap = httptools.HeaderMap() 
    5861            self.simpleCookie = Cookie.SimpleCookie() 
    59             self.rfile = rfile 
    6062             
    6163            # This has to be done very early in the request process, 
    6264            # because request.objectPath is used for config lookups 
    6365            # right away. 
    64             self.processRequestLine(requestLine
     66            self.processRequestLine(
    6567             
    6668            try: 
     
    102104        _cputil.getSpecialAttribute("_cpLogAccess")() 
    103105     
    104     def processRequestLine(self, requestLine): 
    105         self.requestLine = rl = requestLine.strip() 
     106    def processRequestLine(self): 
     107        rl = self.requestLine 
    106108        method, path, qs, proto = httptools.parseRequestLine(rl) 
    107109        if path == "*": 

Hosted by WebFaction

Log in as guest/cpguest to create tickets