Class t.w.c.h.HTTPChannelRequest(HTTPParser):

Part of twisted.web2.channel.http View Source View In Hierarchy

This class handles the state and parsing for one HTTP request. It is responsible for all the low-level connection oriented behavior. Thus, it takes care of keep-alive, de-chunking, etc., and passes the non-connection headers on to the user-level Request object.
Line # Kind Name Docs
330 Method __init__ Undocumented
345 Method gotInitialLine Undocumented
375 Method lineLengthExceeded Undocumented
379 Method createRequest Undocumented
383 Method processRequest Undocumented
386 Method handleContentChunk Undocumented
389 Method handleContentComplete Undocumented
398 Method writeIntermediateResponse Undocumented
402 Method writeHeaders Undocumented
405 Method _writeHeaders Undocumented
441 Method write Undocumented
449 Method finish We are finished writing data.
464 Method abortConnection Abort the HTTP connection because of some kind of unrecoverable
486 Method getHostInfo Undocumented
493 Method getRemoteHost Undocumented
498 Method _abortWithError Handle low level protocol errors.
510 Method _cleanup Called when have finished responding and are no longer queued.
520 Method noLongerQueued Notify the object that it is no longer queued.
548 Method registerProducer Register a producer.
562 Method unregisterProducer Unregister the producer.
568 Method connectionLost connection was lost

Inherited from HTTPParser:

Line # Kind Name Docs
89 Method lineReceived Undocumented
156 Method rawDataReceived Handle incoming content.
175 Method headerReceived Store this header away. Check for too much header data
188 Method allHeadersReceived Undocumented
196 Method allContentReceived Undocumented
202 Method splitConnectionHeaders Undocumented
239 Method setConnectionParams Undocumented
298 Method abortParse Undocumented
306 Method pauseProducing Undocumented
310 Method resumeProducing Undocumented
314 Method stopProducing Undocumented
def __init__(self, channel, queued=0):
Undocumented
def gotInitialLine(self, initialLine):
Undocumented
def lineLengthExceeded(self, line, wasFirst=False):
Undocumented
def createRequest(self):
Undocumented
def processRequest(self):
Undocumented
def handleContentChunk(self, data):
Undocumented
def handleContentComplete(self):
Undocumented
def writeIntermediateResponse(self, code, headers=None):
Undocumented
def writeHeaders(self, code, headers):
Undocumented
def _writeHeaders(self, code, headers, addConnectionHeaders):
Undocumented
def write(self, data):
Undocumented
def finish(self):
We are finished writing data.
def abortConnection(self, closeWrite=True):

Abort the HTTP connection because of some kind of unrecoverable error. If closeWrite=False, then only abort reading, but leave the writing side alone. This is mostly for internal use by the HTTP request parsing logic, so that it can call an error page generator.

Otherwise, completely shut down the connection.
def getHostInfo(self):
Undocumented
def getRemoteHost(self):
Undocumented
def _abortWithError(self, errorcode, text=''):
Handle low level protocol errors.
def _cleanup(self):
Called when have finished responding and are no longer queued.
def noLongerQueued(self):

Notify the object that it is no longer queued.

We start writing whatever data we have to the transport, etc.

This method is not intended for users.
def registerProducer(self, producer, streaming):
Register a producer.
def unregisterProducer(self):
Unregister the producer.
def connectionLost(self, reason):
connection was lost