4.3.1 Table Object (mp_table)
The table object is a Python mapping to the Apache table. The table
object performs just like a dictionary, with the only difference that
key lookups are case insensitive.
Much of the information that Apache uses is stored in tables. For
example, Request.header_in and Request.headers_out.
All the tables that mod_python provides inside the Request
object are actual mappings to the Apache structures, so changing the
Python table also changes the underlying Apache table.
In addition to normal dictionary-like behavior, the table object also
has the following method:
- add(key, val)
-
add() allows for creating duplicate keys, which is useful
when multiple headers, such as
Set-Cookie: are required.
|