Example #1
0
 def sleep(self, transaction):
     BaseServlet.sleep(self, transaction)
     self.session = None
     self.request = None
     self._request = None
     self.response = None
     self.transaction = None
Example #2
0
 def sleep(self, transaction):
     BaseServlet.sleep(self, transaction)
     self.session = None
     self.request  = None
     self._request  = None        
     self.response = None
     self.transaction = None
Example #3
0
    def awake(self, transaction):
        BaseServlet.awake(self, transaction)

        # a hack to signify that the servlet is being run directly from WebKit
        self._CHEETAH__isControlledByWebKit = True

        self.transaction = transaction
        #self.application = transaction.application
        self.response = response = transaction.response
        self.request = transaction.request

        # Temporary hack to accomodate bug in
        # WebKit.Servlet.Servlet.serverSidePath: it uses
        # self._request even though this attribute does not exist.
        # This attribute WILL disappear in the future.
        self._request = transaction.request()

        self.session = transaction.session
        self.write = response().write
Example #4
0
    def awake(self, transaction):
        BaseServlet.awake(self, transaction)
        
        # a hack to signify that the servlet is being run directly from WebKit
        self._CHEETAH__isControlledByWebKit = True
        
        self.transaction = transaction        
        #self.application = transaction.application
        self.response = response = transaction.response
        self.request = transaction.request

        # Temporary hack to accomodate bug in
        # WebKit.Servlet.Servlet.serverSidePath: it uses 
        # self._request even though this attribute does not exist.
        # This attribute WILL disappear in the future.
        self._request = transaction.request()

        
        self.session = transaction.session
        self.write = response().write
Example #5
0
    def serverSidePath(self,
                       path=None,
                       normpath=os.path.normpath,
                       abspath=os.path.abspath):

        if self._CHEETAH__isControlledByWebKit:
            return BaseServlet.serverSidePath(self, path)
        elif path:
            return normpath(abspath(path.replace("\\", '/')))
        elif hasattr(self, '_filePath') and self._filePath:
            return normpath(abspath(self._filePath))
        else:
            return None
Example #6
0
 def serverSidePath(self, path=None,
                    normpath=os.path.normpath,
                    abspath=os.path.abspath
                    ):
     
     if self._CHEETAH__isControlledByWebKit:
         return BaseServlet.serverSidePath(self, path)
     elif path:
         return normpath(abspath(path.replace("\\",'/')))
     elif hasattr(self, '_filePath') and self._filePath:
         return normpath(abspath(self._filePath))
     else:
         return None
Example #7
0
    def __init__(self):
        BaseServlet.__init__(self)

        # this default will be changed by the .awake() method
        self._CHEETAH__isControlledByWebKit = False
Example #8
0
 def __init__(self):
     BaseServlet.__init__(self)
    
     # this default will be changed by the .awake() method
     self._CHEETAH__isControlledByWebKit = False