Package gavo :: Package web :: Module common :: Class Request
[frames] | no frames]

Class Request

source code

    twisted.python.components.Componentized --+    
                                              |    
 twisted.spread.jelly.Jellyable --+           |    
                                  |           |    
twisted.spread.flavors.Serializable --+       |    
                                      |       |    
        twisted.spread.flavors.Copyable --+   |    
                                          |   |    
               twisted.web.http.Request --+   |    
                                          |   |    
twisted.python.components.Componentized --+   |    
                                          |   |    
                 twisted.web.server.Request --+    
                                              |    
                   nevow.appserver.NevowRequest --+
                                                  |
                                                 Request

a custom request class used in DaCHS' application server.

The main change is that we enforce a limit to the size of the payload. This is especially crucial because nevow blocks while parsing the header payload.

Instance Methods
 
gotLength(self, length)
Called when HTTP channel got length of content in this request.
source code
 
connectionLost(self, reason)
There is no longer a connection for this request to respond over.
source code

Inherited from nevow.appserver.NevowRequest: URLPath, __init__, __provides__, finish, finishRequest, getSession, gotPageContext, process, rememberRootURL

Inherited from twisted.python.components.Componentized: __conform__, __providedBy__, addAdapter, addComponent, getComponent, locateAdapterClass, removeComponent, setAdapter, setComponent, unsetComponent

Inherited from twisted.web.server.Request: childLink, getRootURL, getStateToCopyFor, prePathURL, processingFailed, render, sibLink, view_addCookie, view_finish, view_registerProducer, view_setETag, view_setHeader, view_setLastModified, view_setResponseCode, view_unregisterProducer, view_write, write

Inherited from twisted.spread.flavors.Copyable: getStateToCopy, getTypeToCopy, getTypeToCopyFor, jellyFor

Inherited from twisted.spread.flavors.Serializable: processUniqueID

Inherited from twisted.spread.jelly.Jellyable: getStateFor

Inherited from twisted.web.http.Request: __repr__, addCookie, getAllHeaders, getClient, getClientIP, getCookie, getHeader, getHost, getPassword, getRequestHostname, getUser, handleContentChunk, isSecure, loseConnection, noLongerQueued, notifyFinish, parseCookies, redirect, registerProducer, requestReceived, setETag, setHeader, setHost, setLastModified, setResponseCode, unregisterProducer

Class Variables

Inherited from nevow.appserver.NevowRequest: __implemented__, session

Inherited from twisted.python.components.Componentized: persistenceVersion

Inherited from twisted.web.server.Request: __pychecker__, appRootURL, site

Inherited from twisted.web.http.Request: chunked, clientproto, code, code_message, content, etag, finished, lastModified, producer, sentLength, startedWriting

Instance Variables

Inherited from nevow.appserver.NevowRequest: fields

Inherited from twisted.web.server.Request: defaultContentType

Inherited from twisted.web.http.Request: args, cookies, method, notifications, path, requestHeaders, responseHeaders, uri

Properties

Inherited from nevow.appserver.NevowRequest: headers, received_headers

Method Details

gotLength(self, length)

source code 

Called when HTTP channel got length of content in this request.

This method is not intended for users.

Parameters:
  • length - The length of the request body, as indicated by the request headers. None if the request headers do not indicate a length.
Overrides: twisted.web.http.Request.gotLength
(inherited documentation)

connectionLost(self, reason)

source code 

There is no longer a connection for this request to respond over. Clean up anything which can't be useful anymore.

Overrides: twisted.web.http.Request.connectionLost
(inherited documentation)