def sleep(self, transaction): BaseServlet.sleep(self, transaction) self.session = None self.request = None self._request = None self.response = None self.transaction = None
def sleep(self, transaction): Servlet.sleep(self, transaction) self._session = None self._request = None self._response = None self._transaction = None self.field = None self.fields = None self.hasField = None self._exception = None
def awake(self, transaction): Servlet.awake(self, transaction) self._transaction = transaction self._response = transaction.response() self._request = transaction.request() self._session = None # don't create unless needed self._messagesDisplayed = 0 self._contentAction = None self._exception = None self.field = self._request.field self.fields = self._request.fields self.hasField = self._request.hasField assert self._transaction is not None assert self._response is not None assert self._request is not None
def awake(self, transaction): BaseServlet.awake(self, transaction) # a hack to signify that the servlet is being run directly from WebKit self.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
def serverSidePath(self, path=None, normpath=os.path.normpath, abspath=os.path.abspath): if self.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
def serverSidePath(self, path=None, normpath=os.path.normpath, abspath=os.path.abspath ): if self.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
def __init__(self): BaseServlet.__init__(self) # this default will be changed by the .awake() method self.isControlledByWebKit = False
def __init__(self): Servlet.__init__(self) self._methodForRequestType = {} # a cache; see respond() if not hasattr(self, '_title'): self._title = self.__class__.__name__ self.exc = ExceptionGetter(self)