Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes | Private Attributes
MoinMoin.support.flup.server.scgi_base.Request Class Reference

List of all members.

Public Member Functions

def __init__
def run

Public Attributes

 environ
 stdin
 stdout
 logger

Private Attributes

 _conn

Detailed Description

Encapsulates data related to a single request.

Public attributes:
  environ - Environment variables from web server.
  stdin - File-like object representing the request body.
  stdout - File-like object for writing the response.

Definition at line 158 of file scgi_base.py.


Constructor & Destructor Documentation

def MoinMoin.support.flup.server.scgi_base.Request.__init__ (   self,
  conn,
  environ,
  input,
  output 
)

Definition at line 167 of file scgi_base.py.

00167 
00168     def __init__(self, conn, environ, input, output):
00169         self._conn = conn
00170         self.environ = environ
00171         self.stdin = input
00172         self.stdout = StdoutWrapper(output)
00173 
00174         self.logger = logging.getLogger(LoggerName)


Member Function Documentation

Definition at line 175 of file scgi_base.py.

00175 
00176     def run(self):
00177         self.logger.info('%s %s%s',
00178                          self.environ['REQUEST_METHOD'],
00179                          self.environ.get('SCRIPT_NAME', ''),
00180                          self.environ.get('PATH_INFO', ''))
00181 
00182         start = datetime.datetime.now()
00183 
00184         try:
00185             self._conn.server.handler(self)
00186         except:
00187             self.logger.exception('Exception caught from handler')
00188             if not self.stdout.dataWritten:
00189                 self._conn.server.error(self)
00190 
00191         end = datetime.datetime.now()
00192 
00193         handlerTime = end - start
00194         self.logger.debug('%s %s%s done (%.3f secs)',
00195                           self.environ['REQUEST_METHOD'],
00196                           self.environ.get('SCRIPT_NAME', ''),
00197                           self.environ.get('PATH_INFO', ''),
00198                           handlerTime.seconds +
00199                           handlerTime.microseconds / 1000000.0)


Member Data Documentation

Definition at line 168 of file scgi_base.py.

Definition at line 169 of file scgi_base.py.

Definition at line 173 of file scgi_base.py.

Definition at line 170 of file scgi_base.py.

Definition at line 171 of file scgi_base.py.


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