Class ServerContext
ContainerClass
--+
|
ServerContext
This is a "configuration" class for server contexts.
It's job is just to hold data. If you subclass this class, it will provide
defaults for everything.
The following attributes are used. Note, each has a class default.
- doc_root
- This is the document root. If there is an "htdocs" directory in the
current directory, that is used. Otherwise, the default is
os.curdir. You may use a zip file for your document root.
- mounts
- This is a list of tuples of the form [(url_path, path_translated)],
for instance, [("/log", "/var/log")]. More than one tuple may use
the same url_path or path_translated. Basically, I'll go down
the list and whoever has the file I'm looking for first wins. You can
even use "/" as your url_path. Conceptually, the first item in
mounts is implicitly ("/", doc_root). You may use a zip file
for path_translated. If url_path doesn't end in "/", I'll add
one implicitly; otherwise things get too confusing. The default value
for mounts is [].
- server_name
- This is the server name used for CGI's SERVER_NAME. The default is
whatever is received by the server (None will be used for the time
being).
- request_queue_size
- How big should the queue be for waiting requests? The default is 20.
- aquarium_entry_point
- This is the name of the entry point into Aquarium. By default, it's
aquarium.util.Aquarium. This is the hook to use if you need to
subclass that module.
Method Summary |
Inherited from ContainerClass |
|
__init__ (self,
**kargs)
Shove all of the keyword arguments into self. |
|
__repr__ (self)
|
|
update (self,
dict)
Mimics a dicts update method. |
aquarium_entry_point
-
- Type:
-
str
- Value:
|
doc_root
-
- Type:
-
str
- Value:
|
request_queue_size
-
- Type:
-
int
- Value:
|
server_name
-
- Type:
-
NoneType
- Value:
|