Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
MoinMoin.support.flup.server.fcgi_base.Request Class Reference
Inheritance diagram for MoinMoin.support.flup.server.fcgi_base.Request:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def run

Public Attributes

 server
 params
 stdin
 stdout
 stderr
 data

Private Member Functions

def _end
def _flush

Private Attributes

 _conn

Detailed Description

Represents a single FastCGI request.

These objects are passed to your handler and is the main interface
between your handler and the fcgi module. The methods should not
be called by your handler. However, server, params, stdin, stdout,
stderr, and data are free for your handler's use.

Definition at line 536 of file fcgi_base.py.


Constructor & Destructor Documentation

def MoinMoin.support.flup.server.fcgi_base.Request.__init__ (   self,
  conn,
  inputStreamClass 
)

Definition at line 545 of file fcgi_base.py.

00545 
00546     def __init__(self, conn, inputStreamClass):
00547         self._conn = conn
00548 
00549         self.server = conn.server
00550         self.params = {}
00551         self.stdin = inputStreamClass(conn)
00552         self.stdout = OutputStream(conn, self, FCGI_STDOUT)
00553         self.stderr = OutputStream(conn, self, FCGI_STDERR, buffered=True)
00554         self.data = inputStreamClass(conn)


Member Function Documentation

def MoinMoin.support.flup.server.fcgi_base.Request._end (   self,
  appStatus = 0L,
  protocolStatus = FCGI_REQUEST_COMPLETE 
) [private]

Reimplemented in MoinMoin.support.flup.server.fcgi_base.CGIRequest.

Definition at line 577 of file fcgi_base.py.

00577 
00578     def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
00579         self._conn.end_request(self, appStatus, protocolStatus)
        

Here is the caller graph for this function:

Reimplemented in MoinMoin.support.flup.server.fcgi_base.CGIRequest.

Definition at line 580 of file fcgi_base.py.

00580 
00581     def _flush(self):
00582         self.stdout.close()
00583         self.stderr.close()

Here is the caller graph for this function:

Runs the handler, flushes the streams, and ends the request.

Definition at line 555 of file fcgi_base.py.

00555 
00556     def run(self):
00557         """Runs the handler, flushes the streams, and ends the request."""
00558         try:
00559             protocolStatus, appStatus = self.server.handler(self)
00560         except:
00561             traceback.print_exc(file=self.stderr)
00562             self.stderr.flush()
00563             if not self.stdout.dataWritten:
00564                 self.server.error(self)
00565 
00566             protocolStatus, appStatus = FCGI_REQUEST_COMPLETE, 0
00567 
00568         if __debug__: _debug(1, 'protocolStatus = %d, appStatus = %d' %
00569                              (protocolStatus, appStatus))
00570 
00571         try:
00572             self._flush()
00573             self._end(appStatus, protocolStatus)
00574         except socket.error, e:
00575             if e[0] != errno.EPIPE:
00576                 raise

Here is the call graph for this function:


Member Data Documentation

Definition at line 546 of file fcgi_base.py.

Reimplemented in MoinMoin.support.flup.server.fcgi_base.CGIRequest.

Definition at line 553 of file fcgi_base.py.

Reimplemented in MoinMoin.support.flup.server.fcgi_base.CGIRequest.

Definition at line 549 of file fcgi_base.py.

Reimplemented in MoinMoin.support.flup.server.fcgi_base.CGIRequest.

Definition at line 548 of file fcgi_base.py.

Reimplemented in MoinMoin.support.flup.server.fcgi_base.CGIRequest.

Definition at line 552 of file fcgi_base.py.

Reimplemented in MoinMoin.support.flup.server.fcgi_base.CGIRequest.

Definition at line 550 of file fcgi_base.py.

Reimplemented in MoinMoin.support.flup.server.fcgi_base.CGIRequest.

Definition at line 551 of file fcgi_base.py.


The documentation for this class was generated from the following file: