Back to index

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

List of all members.

Public Member Functions

def __init__
def run

Public Attributes

 requestId
 role
 flags
 aborted
 server
 params
 stdin
 stdout
 stderr
 data

Private Member Functions

def _end
def _flush

Detailed Description

A normal CGI request disguised as a FastCGI request.

Definition at line 584 of file fcgi_base.py.


Constructor & Destructor Documentation

Definition at line 586 of file fcgi_base.py.

00586 
00587     def __init__(self, server):
00588         # These are normally filled in by Connection.
00589         self.requestId = 1
00590         self.role = FCGI_RESPONDER
00591         self.flags = 0
00592         self.aborted = False
00593         
00594         self.server = server
00595         self.params = dict(os.environ)
00596         self.stdin = sys.stdin
00597         self.stdout = StdoutWrapper(sys.stdout) # Oh, the humanity!
00598         self.stderr = sys.stderr
00599         self.data = StringIO.StringIO()
        

Member Function Documentation

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

Reimplemented from MoinMoin.support.flup.server.fcgi_base.Request.

Definition at line 600 of file fcgi_base.py.

00600 
00601     def _end(self, appStatus=0L, protocolStatus=FCGI_REQUEST_COMPLETE):
00602         sys.exit(appStatus)

Reimplemented from MoinMoin.support.flup.server.fcgi_base.Request.

Definition at line 603 of file fcgi_base.py.

00603 
00604     def _flush(self):
00605         # Not buffered, do nothing.
00606         pass

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 591 of file fcgi_base.py.

Reimplemented from MoinMoin.support.flup.server.fcgi_base.Request.

Definition at line 598 of file fcgi_base.py.

Definition at line 590 of file fcgi_base.py.

Reimplemented from MoinMoin.support.flup.server.fcgi_base.Request.

Definition at line 594 of file fcgi_base.py.

Definition at line 588 of file fcgi_base.py.

Definition at line 589 of file fcgi_base.py.

Reimplemented from MoinMoin.support.flup.server.fcgi_base.Request.

Definition at line 593 of file fcgi_base.py.

Reimplemented from MoinMoin.support.flup.server.fcgi_base.Request.

Definition at line 597 of file fcgi_base.py.

Reimplemented from MoinMoin.support.flup.server.fcgi_base.Request.

Definition at line 595 of file fcgi_base.py.

Reimplemented from MoinMoin.support.flup.server.fcgi_base.Request.

Definition at line 596 of file fcgi_base.py.


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