Part of twisted.web2.vhost View Source View In Hierarchy
| Parameters | supportNested | If True domain segments will be chopped off until the TLD is reached or a matching virtual host is found. (In which case the child resource can do its own more specific virtual host lookup.) |
| Method | __init__ | |
| Method | addHost | Add a host to this virtual host. - The Fun Stuff(TM) |
| Method | removeHost | Remove the given host. @param name: The FQDN to remove. @type name:
str
|
| Method | locateChild | It's a NameVirtualHost, do you know where your children are? |
Inherited from Resource:
| Method | child_ | This method locates a child with a trailing "/"
in the URL. @param request: the request to process.
|
| Method | putChild | Register a static child. |
| Method | http_GET | Respond to a GET request. |
Inherited from RenderMixin (via Resource):
| Method | allowedMethods | |
| Method | checkPreconditions | No summary |
| Method | renderHTTP | See iweb.IResource.renderHTTP.
|
| Method | http_OPTIONS | Respond to a OPTIONS request. @param request: the request to process.
@return: an object adaptable to iweb.IResponse.
|
| Method | http_TRACE | Respond to a TRACE request. @param request: the request to process.
@return: an object adaptable to iweb.IResponse.
|
| Method | http_HEAD | Respond to a HEAD request. @param request: the request to process.
@return: an object adaptable to iweb.IResponse.
|
| Method | render | No summary |
| Parameters | default | The default resource to be served when encountering an unknown
hostname.
(type: twisted.web2.iweb.IResource
or None
) |
Add a host to this virtual host. - The Fun Stuff(TM)
This associates a host named 'name' with a resource 'resrc':
nvh.addHost('nevow.com', nevowDirectory)
nvh.addHost('divmod.org', divmodDirectory)
nvh.addHost('twistedmatrix.com', twistedMatrixDirectory)
I told you that was fun.
| Parameters | name | The FQDN to be matched to the 'Host' header.
(type: str
) |
| resrc | The twisted.web2.iweb.IResource
to be served as the given hostname.
| |
| resource | (type: twisted.web2.iweb.IResource
) |
| Parameters | name | The FQDN to remove.
(type: str
) |
It's a NameVirtualHost, do you know where your children are?
This uses locateChild magic so you don't have to mutate the request.