diff --git a/CREDITS b/CREDITS index 3551b892caf31c15d31b7e09d1a09dd2e25f273d..24dbf5e8221f86b71612b11c91eefac9271d3b33 100644 --- a/CREDITS +++ b/CREDITS @@ -81,4 +81,6 @@ Enrique Vaamonde <evaamo@loquesea.com> Dave Wallace <dwallace@delanet.com> +Aaron Watters <arw1961@yahoo.com> + diff --git a/Doc/Makefile.in b/Doc/Makefile.in index 0ce52c459331e565cc141adf4f2372d28865626b..ddabb783f6dddee2cdf113cdeab2482ebf7b2152 100644 --- a/Doc/Makefile.in +++ b/Doc/Makefile.in @@ -45,6 +45,7 @@ MPFILES= modpython.tex \ modpython3.tex \ modpython5.tex \ modpython6.tex \ + modpython7.tex \ appendixa.tex \ appendixb.tex diff --git a/Doc/README b/Doc/README index 1e2036108e4e9d9e4f98418daa287aeeb2b247d9..bd12b807bef19b8cdc03fe515762b4781720e919 100644 --- a/Doc/README +++ b/Doc/README @@ -23,3 +23,34 @@ make ps Good Luck! + +LaTeX Notes +----------- + +Using the tilde character in LaTex is a bit of a headache as ~ is used for +markup. + +The obvious solution of escaping it as \~ doesn't work, as this is also used +for markup and actually adds a diactrical to the immediately following +character. + +If you want a ~ enclosed in double quotes you can use \character{\~}. +So \character{\~} becomes "~" in the generated documentation. + +If you want a ~ without the quotes you can use \textasciitilde. +For example ~/foo/bar should be written as \textasciitilde/foo/bar in the +LaTeX source. + +Using \textasciitilde does not work if there is an alpha-numeric character +immediately following. For a url you can hex encode the ~ as %7e. For example: + http://people.apache.org/~jgallacher +should be written as: + http://people.apache.org/\%7ejgallacher + +Note that the ~ character is handled properly within a {verbatim} section, +so the following works without modification: + + \begin{verbatim} + path = "~/foo/bar" + \end{verbatim} + diff --git a/Doc/appendixc.tex b/Doc/appendixc.tex index 6518b66a21f37f41ec8e57f8985e8c28c4322789..caee1cca9d5355e7c7a6127a6945b265422ca00f 100644 --- a/Doc/appendixc.tex +++ b/Doc/appendixc.tex @@ -1,4 +1,535 @@ +% Let's introduce a little organization here by listing the changes +% by JIRA issue. This will make it a little easier to reorganize this +% file when an issue is backported. +% +% ### PUT ANY CURRENT CHANGES INTO THE SECTION +% ### Changes from version 3.2.10 +% +% ### DON'T PUT ANYTHING IN THIS NEXT SECTION ### +% ### It's a placeholder for use after the 3.3 release +% Put changes made in trunk here. If the change is backported +% to branches/3.3.x, move it to the following section +%\indexii{Changes from}{version 3.3.x} +% +% New Features +% +% \begin{itemize} +% \item +% NONE +% \end{itemize} +% +% Improvements +% +% \begin{itemize} +% \item +% NONE +% \end{itemize} +% +% Bug Fixes +% +% \begin{itemize} +% \item +% NONE +% \end{itemize} +% +% ### DON'T PUT ANYTHING IN THIS NEXT SECTION ### +% ### It's a placeholder for use after the 3.3 release +%\chapter{Changes from Version (3.3.n)\label{app-changes-from-3.3.n}} +% PUT BACKPORTS from trunk to branches/3.3.x in here ***ONLY*** +% DO NOT put anything in this section unless it has been +% backported from trunk to branches/3.3.x +% +%\indexii{Changes from}{version 3.3.n} +% +% New Features +% +% \begin{itemize} +% \item +% NONE +% \end{itemize} +% +% Improvements +% +% \begin{itemize} +% \item +% NONE +% \end{itemize} +% +% Bug Fixes +% +% \begin{itemize} +% \item +% NONE +% \end{itemize} + +\chapter{Changes from Version (3.2.10)\label{app-changes-from-3.2.10}} +% Comments on changes committed to svn trunk should go in this section first. +% As they are backported move them to the appropriate chapter below. + +\indexii{Changes from}{version 3.2.10} + + New Features + + \begin{itemize} + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-103]{MODPYTHON-103}) + New \code{req.add_output_filter()}, \code{req.add_input_filter()}, + \code{req.register_output_fiter()}, \code{req.register_input_filter()} + methods. These allows the dynamic registration of filters and the + attaching of filters to the current request. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-104]{MODPYTHON-104}) + Support added for using Python in content being passed through "INCLUDES" + output filter, or as more commonly referred to server side include (SSI) + mechanism. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-108]{MODPYTHON-108}) + Added support to cookies for \code{httponly} attribute, an extension + originally created by Microsoft, but now getting more widespread use + in the battle against cross site-scripting attacks. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-118]{MODPYTHON-118}) + Now possible using the \code{PythonImport} directive to specify the name + of a function contained in the module to be called once the designated + module has been imported. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-124]{MODPYTHON-124}) + New \code{req.auth_name()} and \code{req.auth_type()} methods. + These return the values associated with the AuthName and AuthType + directives respectively. The \code{req.ap_auth_type} has now also + been made writable so that it can be set by an authentication + handler. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-130]{MODPYTHON-130}) + Added \code{req.set_etag()}, \code{req.set_last_modified()} and + \code{req.update_mtime()} functions as wrappers for similar functions + provided by Apache C API. These are required to effectively use the + \code{req.meets_condition()} function. The documentation for + \code{req.meets_condition()} has also been updated as what it + previously described probably wouldn't actually work. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-132]{MODPYTHON-132}) + New \code{req.construct_url()} method. Used to construct a fully + qualified URI string incorporating correct scheme, server and port. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-144]{MODPYTHON-144}) + The \samp{apache.interpreter} and \samp{apache.main_server} attributes + have been made publically available. These were previously private and + not part of the public API. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-149]{MODPYTHON-149}) + Added support for session objects that span domains. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-153]{MODPYTHON-153}) + Added \code{req.discard_request_body()} function as wrapper for + similar function provided by Apache C API. The function tests for + and reads any message body in the request, simply discarding + whatever it receives. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-164]{MODPYTHON-164}) + The \code{req.add_handler()}, \code{req.register_input_filter()} and + \code{req.register_output_filter()} methods can now take a direct + reference to a callable object as well a string which refers to a + module or module::function combination by name. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-165]{MODPYTHON-165}) + Exported functions from mod_python module to be used in other third + party modules for Apache. The purpose of these functions is to allow + those other modules to access the mechanics of how mod_python creates + interpreters, thereby allowing other modules to also embed Python + and for there not to be a conflict with mod_python. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-170]{MODPYTHON-170}) + Added \code{req._request_rec}, \code{server._server_rec} and + \code{conn._conn_rec} semi private members for getting accessing to + underlying Apache struct as a Python CObject. These can be used for + use in implementing SWIG bindings for lower level APIs of Apache. + These members should be regarded as experimental and there are no + guarantees that they will remain present in this specific form in the + future. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-193]{MODPYTHON-193}) + Added new attribute available as \code{req.hlist.location}. For a + handler executed directly as the result of a handler directive + within a \code{Location} directive, this will be set to the value + of the \code{Location} directive. If \code{LocationMatch}, or + wildcards or regular expressions are used with \code{Location}, + the value will be the matched value in the URL and not the pattern. + \end{itemize} + + Improvements + + \begin{itemize} + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-27]{MODPYTHON-27}) + When using mod_python.publisher, the \code{__auth__()} and + \code{__access__()} functions and the \code{__auth_realm__} string + can now be nested within a class method as a well a normal function. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-90]{MODPYTHON-90}) + The \code{PythonEnablePdb} configuration option will now be ignored + if Apache hasn't been started up in single process mode. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-91]{MODPYTHON-91}) + If running Apache in single process mode with PDB enabled and the + "quit" command is used to exit that debug session, an exception + indicating that the PDB session has been aborted is raised rather + than \code{None} being returned with a subsequent error complaining + about the handler returning an invalid value. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-93]{MODPYTHON-93}) + Improved \code{util.FieldStorage} efficiency and made the interface + more dictionary like. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-101]{MODPYTHON-101}) + Force an exception when handler evaluates to something other than + \code{None} but is otherwise not callable. Previously an exception + would not be generated if the handler evaluated to \code{False}. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-107]{MODPYTHON-107}) + Neither mod_python.publisher nor mod_python.psp explicitly flush + output after writing the content of the response back to the request + object. By not flushing output it is now possible to use the + "CONTENT_LENGTH" output filter to add a "Content-Length" header. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-111]{MODPYTHON-111}) + Note made in session documentation that a save is required to avoid + session timeouts. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-125]{MODPYTHON-125}) + The \code{req.handler} attribute is now writable. This allows a handler + executing in a phase prior to the response phase to specify which + Apache module will be responsible for generating the content. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-128]{MODPYTHON-128}) + Made the \code{req.canonical_filename} attribute writable. Changed + the \code{req.finfo} attribute from being a tuple to an actual object. + For backwards compatibility the attributes of the object can still be + accessed as if they were a tuple. New code however should access + the attributes as member data. The \code{req.finfo} attribute is + also now writable and can be assigned to using the result of calling + the new function \code{apache.stat()}. This function is a wrapper + for \code{apr_stat()}. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-129]{MODPYTHON-129}) + When specifying multiple handlers for a phase, the status returned by + each handler is now treated the same as how Apache would treat the + status if the handler was registered using the low level C API. What + this means is that whereas stacked handlers of any phase would in + turn previously be executed as long as they returned \code{apache.OK}, + this is no longer the case and what happens is dependent on the + phase. Specifically, a handler returning \code{apache.DECLINED} no + longer causes the execution of subsequent handlers for the phase to + be skipped. Instead, it will move to the next of the stacked + handlers. In the case of \code{PythonTransHandler}, + \code{PythonAuthenHandler}, \code{PythonAuthzHandler} and + \code{PythonTypeHandler}, as soon as \code{apache.OK} is returned, + subsequent handlers for the phase will be skipped, as the result + indicates that any processing pertinent to that phase has been + completed. For other phases, stacked handlers will continue to be + executed if \code{apache.OK} is returned as well as when + \code{apache.DECLINED} is returned. This new interpretation of the + status returned also applies to stacked content handlers listed + against the \code{PythonHandler} directive even though Apache + notionally only ever calls at most one content handler. Where all + stacked content handlers in that phase run, the status returned from + the last handler becomes the overall status from the content phase. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-141]{MODPYTHON-141}) + The \code{req.proxyreq} and \code{req.uri} attributes are now writable. + This allows a handler to setup these values and trigger proxying of the + current request to a remote server. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-142]{MODPYTHON-142}) + The \code{req.no_cache} and \code{req.no_local_copy} attributes are + now writable. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-143]{MODPYTHON-143}) + Completely reimplemented the module importer. This is now used + whenever modules are imported corresponding to any of the + \code{Python*Handler}, \code{Python*Filter} and \code{PythonImport} + directives. The module importer is still able to be used directly + using the \code{apache.import_module()} function. The new module + importer no longer supports automatic reloading of packages/modules + that appear on the standard Python module search path as defined by + the \code{PythonPath} directive or within an application by direct + changes to \code{sys.path}. Automatic module reloading is however + still performed on file based modules (not packages) which are + located within the document tree where handlers are located. + Locations within the document tree are however no longer added to the + standard Python module search path automatically as they are + maintained within a distinct importer search path. The + \code{PythonPath} directive MUST not be used to point at directories + within the document tree. To have additional directories be searched + by the module importer, they should be listed in the + \code{mod_python.importer.path} option using the \code{PythonOption} + directive. This is a path similar to how \code{PythonPath} argument + is supplied, but MUST not reference \code{sys.path} nor contain any + directories also listed in the standard Python module search path. + If an application does not appear to work under the module importer, + the old module importer can be reenabled by setting the + \code{mod_python.legacy.importer} option using the \code{PythonOption} + directive to the value '\code{*}'. This option must be set in the + global Apache configuration. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-152]{MODPYTHON-152}) + When in a sub request, when a request is the result of an internal + redirect, or when when returning from such a request, the + \code{req.main}, \code{req.prev} and \code{req.next} members now + correctly return a reference to the original Python request object + wrapper first created for the specific \code{request_rec} instance + rather than creating a new distinct Python request object. This means + that any data added explicitly to a request object can be passed + between such requests. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-178]{MODPYTHON-178}) + When using mod_python.psp, if the PSP file which is the target of the + request doesn't actually exist, an \code{apache.HTTP_NOT_FOUND} server + error is now returned to the client rather than raising a + \code{ValueError} exception which results in a 500 internal server error. + Note that if using \code{SetHandler} and the request is against the + directory and no \code{DirectoryIndex} directive is specified which + lists a valid PSP index file, then the same \code{apache.HTTP_NOT_FOUND} + server error is returned to the client. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-196]{MODPYTHON-196}) + For completeness, added \code{req.server.log_error()} and + \code{req.connection.log_error()}. The latter wraps + \code{ap_log_cerror()} (when available), allowing client information + to be logged along with message from a connection handler. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-206]{MODPYTHON-206}) + The attribute \code{req.used_path_info} is now modifiable and can + be set from within handlers. This is equivalent to having used the + \code{AcceptPathInfo} directive. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-207]{MODPYTHON-207}) + The attribute \code{req.args} is now modifiable and can be set from + within handlers. + \end{itemize} + + Bug Fixes + + \begin{itemize} + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-38]{MODPYTHON-38}) + Fixed issue when using PSP pages in conjunction with publisher handler + or where a PSP error page was being triggered, that form parameters + coming from content of a POST request weren't available or only available + using a workaround. Specifically, the PSP page will now use any + \code{FieldStorage} object instance cached as \code{req.form} left + there by preceding code. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-43]{MODPYTHON-43}) + Nested \code{__auth__()} functions in mod_python.publisher now execute + in context of globals from the file the function is in and not that + of mod_python.publisher itself. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-47]{MODPYTHON-47}) + Fixed mod_python.publisher so it will not return a HTTP Bad Request + response when mod_auth is being used to provide Digest authentication. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-63]{MODPYTHON-63}) + When handler directives are used within \code{Directory} or + \code{DirectoryMatch} directives where wildcards or regular + expressions are used, the handler directory will be set to the + shortest directory matched by the directory pattern. Handler + directives can now also be used within \code{Files} and + \code{FilesMatch} directives and the handler directory will correctly + resolve to the directory corresponding to the enclosing + \code{Directory} or \code{DirectoryMatch} directive, or the directory + the \code{.htaccess} file is contained in. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-76]{MODPYTHON-76}) + The \code{FilterDispatch} callback should not flush the filter if it + has already been closed. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-84]{MODPYTHON-84}) + The original change to fix the symlink issue for \code{req.sendfile()} + was causing problems on Win32, plus code needed to be changed to work + with APR 1.2.7. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-100]{MODPYTHON-100}) + When using stacked handlers and a \code{SERVER_RETURN} exception was + used to return an \code{OK} status for that handler, any following + handlers weren't being run if appropriate for the phase. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-109]{MODPYTHON-109}) + The \code{Py_Finalize()} function was being called on child process + shutdown. This was being done though from within the context of a + signal handler, which is generally unsafe and would cause the process + to lock up. This function is no longer called on child process shutdown. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-112]{MODPYTHON-112}) + The \code{req.phase} attribute is no longer overwritten by an input + or output filter. The \code{filter.is_input} member should be used + to determine if a filter is an input or output filter. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-113]{MODPYTHON-113}) + The \code{PythonImport} directive now uses the + \code{apache.import_module()} function to import modules to avoid + reloading problems when same module is imported from a handler. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-114]{MODPYTHON-114}) + Fixed race conditions on setting \code{sys.path} when the + \code{PythonPath} directive is being used as well as problems with + infinite extension of path. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-120]{MODPYTHON-120}) + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-121]{MODPYTHON-121}) + Fixes to test suite so it will work on virtual hosting environments + where \code{localhost} doesn't resolve to \code{127.0.0.1} but the + actual IP address of the host. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-126]{MODPYTHON-126}) + When \code{Python*Handler} or \code{Python*Filter} directive is used + inside of a \code{Files} directive container, the handler/filter + directory value will now correctly resolve to the directory corresponding + to any parent \code{Directory} directive or the location of the + \code{.htaccess} file the \code{Files} directive is contained in. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-133]{MODPYTHON-133}) + The table object returned by \code{req.server.get_config()} was not + being populated correctly to be the state of directives set at global + scope for the server. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-134]{MODPYTHON-134}) + Setting \code{PythonDebug} to \code{Off}, wasn't overriding \code{On} + setting in parent scope. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-140]{MODPYTHON-140}) + The \code{util.redirect()} function should be returning server status of + \code{apache.DONE} and not \code{apache.OK} otherwise it will not give + desired result if used in non content handler phase or where there are + stacked content handlers. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-147]{MODPYTHON-147}) + Stopped directories being added to \code{sys.path} multiple times when + \code{PythonImport} and \code{PythonPath} directive used. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-148]{MODPYTHON-148}) + Added missing Apache contants \code{apache.PROXYREQ_RESPONSE} and + \code{apache.HTTP_UPGRADE_REQUIRED}. Also added new constants for + Apache magic mime types and values for interpreting the + \code{req.connection.keepalive} and \code{req.read_body} members. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-150]{MODPYTHON-150}) + In a multithread MPM, the \code{apache.init()} function could be called + more than once for a specific interpreter instance whereas it should + only be called once. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-151]{MODPYTHON-151}) + Debug error page returned to client when an exception in a handler + occurred wasn't escaping special HTML characters in the traceback or + the details of the exception. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-157]{MODPYTHON-157}) + Wrong interpreter name used for fixup handler phase and earlier, when + \code{PythonInterpPerDirectory} was enabled and request was against + a directory but client didn't provide the trailing slash. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-159]{MODPYTHON-159}) + Fix \code{FieldStorage} class so that it can handle multiline headers. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-160]{MODPYTHON-160}) + Using \code{PythonInterpPerDirective} when setting content handler to + run dynamically with \code{req.add_handler()} would cause Apache to + crash. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-161]{MODPYTHON-161}) + Directory argument supplied to \code{req.add_handler()} is + canonicalized and a trailing slash added automatically. This is + needed to ensure that the directory is always in POSIX path style as + used by Apache and that convention where directories associated with + directives always have trailing slash is adhered to. If this is not + done, a different interpreter can be chosen to that expected when the + \code{PythonInterpPerDirective} is used. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-166]{MODPYTHON-166}) + \code{PythonHandlerModule} was not setting up registration of the + \code{PythonFixupHandler} or \code{PythonAuthenHandler}. For the + latter this meant that using \code{Require} directive with + \code{PythonHandlerModule} would cause a 500 error and complaint in + error log about "No groups file". + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-167]{MODPYTHON-167}) + When \code{PythonDebug} was \code{On} and and exception occurred, the + response to the client had a status of \code{200} when it really should + have been a \code{500} error status indicating that an internal error + occurred. A \code{500} error status was correctly being returned when + \code{PythonDebug} was \code{Off}. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-168]{MODPYTHON-168}) + Fixed psp_parser error when CR is used as a line terminator in psp code. + This may occur with some older editors such as GoLive on Mac OS X. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-175]{MODPYTHON-175}) + Fixed problem whereby a main PSP page and an error page triggered from + that page both accessing the session object would cause a deadlock. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-176]{MODPYTHON-176}) + Fixed issue whereby PSP code would unlock session object which it had + inherited from the caller meaning caller could no longer use it safely. + PSP code will now only unlock session if it created it in the first + place. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-179]{MODPYTHON-179}) + Fixed the behaviour of req.readlines() when a size hint was provided. Previously, + it would always return a single line when a size hint was provided. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-180]{MODPYTHON-180}) + Publisher would wrongly output a warning about nothing to publish if + \code{req.write()} or \code{req.sendfile()} used and data not flushed, + and then published function returned \code{None}. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-181]{MODPYTHON-181}) + Fixed memory leak when mod_python handlers are defined for more than + one phase at the same time. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-182]{MODPYTHON-182}) + Fixed memory leak in req.readline(). + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-184]{MODPYTHON-184}) + Fix memory leak in \code{apache.make_table()}. This was used by + \code{util.FieldStorage} class so affected all code using forms. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-185]{MODPYTHON-185}) + Fixed segfault in psp.parsestring(src_string) when src_string is empty. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-187]{MODPYTHON-187}) + Table objects could crash in various ways when the value of an item + was NULL. This could occur for \code{SCRIPT_FILENAME} when the + \code{req.subprocess_env} table was accessed in the post read request + handler phase. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-189]{MODPYTHON-189}) + Fixed representation returned by calling \code{repr()} on a table object. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-191]{MODPYTHON-191}) + Session class will no longer accept a normal cookie if a signed cookie + was expected. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-194]{MODPYTHON-194}) + Fixed potential memory leak due to not clearing the state of thread state + objects before deleting them. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-195]{MODPYTHON-195}) + Fix potential Win32 resource leaks in parent Apache process when process + restarts occur. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-198]{MODPYTHON-198}) + Python 2.5 broke nested __auth__/__access__/__auth_realm__ in + mod_python.publisher. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-200]{MODPYTHON-200}) + Fixed problem whereby signed and marshalled cookies could not be used + at the same time. When expecting marshalled cookie, any signed, but + not marshalled cookies will be returned as normal cookies. + \end{itemize} + + \chapter{Changes from Version (3.2.8)\label{app-changes}} +% mod_python version 3.2.10 \indexii{Changes from}{version 3.2.8} @@ -14,23 +545,23 @@ These communicate direct with the Apache mod_ssl module, allowing it to be determined if the connection is using SSL/TLS and what the values of internal ssl variables are. + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-131]{MODPYTHON-131}) + The directory used for mutex locks can now be specified at + at compile time using \code{./configure --with-mutex-dir value} + or at run time with \code{PythonOption mod_python.mutex_directory value}. \item (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-137]{MODPYTHON-137}) New \code{req.server.get_options()} method. This returns the subset of Python options set at global scope within the Apache configuration. That is, outside of the context of any VirtualHost, Location, Directory or Files directives. - \item - (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-131]{MODPYTHON-131}) - The directory used for mutex locks can now be specified at - at compile time using \code{./configure --with-mutex-dir value} - or at run time with \code{PythonOption mod_python.mutex_directory value}. \item (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-145]{MODPYTHON-145}) The number of mutex locks can now be specified at run time with \code{PythonOption mod_python.mutex_locks value}. \item - (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-172]{MODPYTHON-172}) + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-172]{MODPYTHON-172}) Fixed three memory leaks that were found in _apachemodule.parse_qsl, req.readlines and util.cfgtree_walk. \end{itemize} @@ -58,18 +589,18 @@ Bug Fixes \begin{itemize} + \item + (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-84]{MODPYTHON-84}) + Fixed request.sendfile() bug for symlinked files on Win32. \item (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-122]{MODPYTHON-122}) Fixed configure problem when using bash 3.1.x. \item (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-173]{MODPYTHON-173}) Fixed DbmSession to create db file with mode 0640. - \item - (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-84]{MODPYTHON-84}) - Fixed request.sendfile() bug for symlinked files on Win32. \end{itemize} - -\chapter{Changes from Version (3.2.7)\label{app-changes}} + +\chapter{Changes from Version (3.2.7)\label{app-changes-from-3.2.7}} \indexii{Changes from}{version 3.2.7} @@ -78,14 +609,13 @@ \begin{itemize} \item (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-135]{MODPYTHON-135}) - Fixed possible directory traversal attack in FileSession. The session id is now checked to ensure it only contains valid characters. This check is performed for all sessions derived from the BaseSession class. \end{itemize} - -\chapter{Changes from Version (3.1.4)\label{app-changes}} + +\chapter{Changes from Version (3.1.4)\label{app-changes-from-3.1.4}} \indexii{Changes from}{version 3.1.4} @@ -225,7 +755,7 @@ Fixed potential buffer corruption bug in connection object read(). \end{itemize} -\chapter{Changes from Previous Major Version (2.x)\label{app-changes}} +\chapter{Changes from Previous Major Version (2.x)\label{app-changes-from-2.x}} \indexii{Changes from}{version 2.x} diff --git a/Doc/modpython.tex b/Doc/modpython.tex index b066da4fb703acc7d0465611d194eea4f21ea9ea..21375133158a8738f9ac0dde8f12ba1eb6287026 100644 --- a/Doc/modpython.tex +++ b/Doc/modpython.tex @@ -57,6 +57,7 @@ and a tutorial all-in-one. \input{modpython4} % Python API \input{modpython5} % Apache directives \input{modpython6} % Handlers +\input{modpython7} % Security \appendix %\input{appendixa} % Windows Install %\input{appendixb} % VMS Install diff --git a/Doc/modpython1.tex b/Doc/modpython1.tex index bb466734ab9cec5c74378c87e76a894c4ab03082..43e5505b33117e633f0f528e6076101760281ec5 100644 --- a/Doc/modpython1.tex +++ b/Doc/modpython1.tex @@ -47,12 +47,29 @@ \section{History\label{intr-history}} Mod_python originates from a project called - \citetitle[http://www.ispol.com/home/grisha/httpdapy/]{Httpdapy} + \citetitle[http://www.modpython.org/httpdapy/]{Httpdapy} (1997). For a long time Httpdapy was not called mod_python because Httpdapy was not meant to be Apache-specific. Httpdapy was designed to be cross-platform and in fact was initially written for the Netscape server (back then it was called Nsapy (1997). + Nsapy itself was based on an original concept and first code by + Aaron Watters from "Internet Programming with Python" by Aaron Watters, + Guido Van Rossum and James C. Ahlstrom, ISBN 1-55851-484-8. + + Without Aaron's inspiration, there would be no mod_python. Quoting from + the Httpdapy README file: + +\begin{verbatim} + +Although Nsapy only worked with Netscape servers, it was very generic in its +design and was based on some brilliant ideas that weren't necessarily Netscape +specific. Its design is a combination of extensibility, simplicity and +efficiency that takes advantage of many of the key benefits of Python and is +totally in the spirit of Python. + +\end{verbatim} + This excerpt from the Httpdapy README file describes well the challenges and the solution provided by embedding Python within the HTTP server: diff --git a/Doc/modpython2.tex b/Doc/modpython2.tex index 87cbb67683616b5ac1154dd20424ab95b30d04e3..decddbeb32016115ca2be364e6434d3eb39097e1 100644 --- a/Doc/modpython2.tex +++ b/Doc/modpython2.tex @@ -8,15 +8,23 @@ mod_python mailing list by sending an e-mail with the word \samp{subscribe} in the subject to \email{mod_python-request@modpython.org}. + + Also check out Graham Dumpleton's assorted articles on mod_python + at \citetitle[http://www.dscpl.com.au/wiki/ModPython/Articles]{http://www.dscpl.com.au/wiki/ModPython/Articles}. + These include alternate instructions for getting a first mod_python + handler working, as well as articles covering problems, short comings and + constraints in various versions of mod_python. \end{notice} \section{Prerequisites\label{inst-prerequisites}} \begin{itemize} \item - Python 2.2.1 or later. Earlier versions of Python will not work. + Python 2.3.4 or later. Python versions less than 2.3 will not work. \item - Apache 2.0.47 or later (For Apache 1.3.x, use mod_python version 2.7.x). + Apache 2.0.54 or later. Apache versions 2.0.47 to 2.0.53 may work + but have not been tested with this release. + (For Apache 1.3.x, use mod_python version 2.7.x). \end{itemize} In order to compile mod_python you will need to have the include files @@ -117,7 +125,7 @@ autoconf stuff, \program{./configure} does the following: \citetitle[dir-other-po.html]{PythonOption} directive. See \citetitle[inst-apacheconfig.html]{Configuring Apache}. - \emph{Back ported from version 3.3.0} + New in version 3.3.0 \item \index{./configure!\longprogramopt{with-max-locks}} @@ -283,7 +291,7 @@ autoconf stuff, \program{./configure} does the following: directive in your apache configuration file is immediately following the \strong{LoadModule} directive. - \emph{Back ported from version 3.3.0} + \emph{New in version 3.3.0} \item \strong{Mutex Locks} \indexii{apache configuration}{mutex locks} @@ -317,7 +325,7 @@ autoconf stuff, \program{./configure} does the following: directive in your apache configuration file is immediately following the \strong{LoadModule} directive. - \emph{Back ported from version 3.3.0} + \emph{New in version 3.3.0} \end{description} @@ -407,7 +415,7 @@ if you are using Apache 1.3.x), please refer to the proper documentation. \end{enumerate} \begin{seealso} - \seeurl{http://home.comcast.net/~d.popowich/mpservlets}{mpservlets} + \seeurl{http://www.astro.umass.edu/\%7edpopowich/python/mpservlets/}{mpservlets} \seeurl{http://www.dscpl.com.au/projects/vampire}{Vampire} \end{seealso} diff --git a/Doc/modpython3.tex b/Doc/modpython3.tex index 89d0e135ddf2de31b9132b98db84127279ccb4b1..fe14265a96046760b54143be45032a4b42d22c2a 100644 --- a/Doc/modpython3.tex +++ b/Doc/modpython3.tex @@ -362,6 +362,11 @@ looks like this now: </Directory> \end{verbatim} +Note that depending on which version of Apache is being used, you may need +to set either the \code{AuthAuthoritative} or \code{AuthBasicAuthoritative} +directive to \code{Off} to tell Apache that you want allow the task of +performing basic authentication to fall through to your handler. + Now we need to write an authentication handler function in \file{myscript.py}. A basic authentication handler would look like this: @@ -468,3 +473,12 @@ render your page, and then \code{return(apache.OK)}: req.write(pagebuffer) return(apache.OK) \end{verbatim} + +Note that if wishing to returning an error page from a handler phase other +than the response handler, the value \code{apache.DONE} must be returned +instead of \code{apache.OK}. If this is not done, subsequent handler phases +will still be run. The value of \code{apache.DONE} indicates that processing +of the request should be stopped immediately. If using stacked response +handlers, then \code{apache.DONE} should also be returned in that situation +to prevent subsequent handlers registered for that phase being run if +appropriate. diff --git a/Doc/modpython4.tex b/Doc/modpython4.tex index 287752bd714385d12815e2c58c27d19a80b5e858..8af90a0735e8c1311390529947e3bfe0928c64b1 100644 --- a/Doc/modpython4.tex +++ b/Doc/modpython4.tex @@ -346,24 +346,455 @@ objects. For a more in-depth look at Apache internals, see the information such as the source IP of the request to the log entry. \end{funcdesc} -\begin{funcdesc}{import_module}{module_name\optional{, autoreload=1, log=0, path=None}} - This function can be used to import modules taking advantage of - mod_python's internal mechanism which reloads modules automatically - if they have changed since last import. - - \var{module_name} is a string containing the module name (it can - contain dots, e.g. \code{mypackage.mymodule}); \var{autoreload} - indicates whether the module should be reloaded if it has changed since - last import; when \var{log} is true, a message will be written to - the logs when a module is reloaded; \var{path} allows restricting - modules to specific paths. +\begin{funcdesc}{import_module}{module_name\optional{, autoreload=None, log=None, path=None}} + This function can be used to import modules. + +\begin{notice} + This function and the module importer were completely reimplemented in + mod_python 3.3. If you are using an older version of mod_python do not + rely on this documentation and instead refer to the documentation for + the specific version you are using as the new importer does not behave + exactly the same and has additional features. + + If you are trying to port code from an older version of mod_python to + mod_python 3.3 and can't work out why the new importer is not working + for you, you can enable the old module importer for specific Python + interpreter instances by using: + + \begin{verbatim} + PythonOption mod_python.legacy.importer name + \end{verbatim} + + where 'name' is the name of the interpreter instance or '*' for it to + be applied to all interpreter instances. This option should be placed + at global context within the main Apache configuration files. +\end{notice} + + When using the \code{apache.import_module()} function, the + \var{module_name} should be a string containing either the module name, + or a path to the actual code file for the module; where a module is a + candidate for automatic module reloading, \var{autoreload} indicates + whether the module should be reloaded if it has changed since the last + import; when \var{log} is true, a message will be written to the logs + when a module is reloaded; \var{path} can be a list specifying additional + directories to be searched for modules. + + With the introduction of mod_python 3.3, the default arguments for the + \var{autoreload} and \var{log} arguments have been changed to + \code{None}, with the arguments effectively now being unnecessary except + in special circumstances. When the arguments are left as the default of + \code{None}, the Apache configuration in scope at the time of the call + will always be consulted automatically for any settings for the + \code{PythonAutoReload} and \code{PythonDebug} directives respectively. Example: \begin{verbatim} from mod_python import apache - mymodule = apache.import_module('mymodule', log=1) + module = apache.import_module('module_name') + \end{verbatim} + + The \code{apache.import_module()} function is not just a wrapper for the + standard Python module import mechanism. The purpose of the function and + the mod_python module importer in general, is to provide a means of being + able to import modules based on their exact location, with modules being + distinguished based on their location rather than just the name of the + module. Distinguishing modules in this way, rather than by name alone, + means that the same module name can be used for handlers and other code + in multiple directories and they will not interfere with each other. + + A secondary feature of the module importer is to implement a means of + having modules automatically reloaded when the corresponding code file + has been changed on disk. Having modules be able to be reloaded in this + way means that it is possible to change the code for a web application + without having to restart the whole Apache web server. Although this was + always the intent of the module importer, prior to mod_python 3.3, its + effectiveness was limited. With mod_python 3.3 however, the module + reloading feature is much more robust and will correctly reload parent + modules even when it was only a child module what was changed. + + When the \code{apache.import_module()} function is called with just the + name of the module, as opposed to a path to the actual code file for the + module, a search has to be made for the module. The first set of + directories that will be checked are those specified by the \var{path} + argument if supplied. + + Where the function is called from another module which had previously + been imported by the mod_python importer, the next directory which will + be checked will be the same directory as the parent module is located. + Where that same parent module contains a global data variable called + \code{__mp_path__} containing a list of directories, those directories + will also be searched. + + Finally, the mod_python module importer will search directories + specified by the \code{PythonOption} called \code{mod_python.importer.path}. + + For example: + + \begin{verbatim} + PythonOption mod_python.importer.path "['/some/path']" + \end{verbatim} + + The argument to the option must be in the form of a Python list. The + enclosing quotes are to ensure that Apache interprets the argument as a + single value. The list must be self contained and cannot reference any + prior value of the option. The list MUST NOT reference \code{sys.path} + nor should any directory which also appears in \code{sys.path} be + listed in the mod_python module importer search path. + + When searching for the module, a check is made for any code file with the + name specified and having a '.py' extension. Because only modules + implemented as a single file will be found, packages will not be found + nor modules contained within a package. + + In any case where a module cannot be found, control is handed off to the + standard Python module importer which will attempt to find the module or + package by searching \code{sys.path}. + + Note that only modules found by the mod_python module importer are + candidates for automatic module reloading. That is, where the mod_python + module importer could not find a module and handed the search off to the + standard Python module importer, those modules or packages will not be + able to be reloaded. + + Although true Python packages are not candidates for reloading and must + be located in a directory listed in \code{sys.path}, another form of + packaging up modules such that they can be maintained within their own + namespace is supported. When this mechanism is used, these modules will + be candidates for reloading when found by the mod_python module importer. + + In this scheme for maintaining a pseudo package, individual modules are + still placed into a directory, but the \code{__init__.py} file in the + directory has no special meaning and will not be automatically imported + as is the case with true Python packages. Instead, any module within the + directory must always be explicitly identified when performing an import. + + To import a named module contained within these pseudo packages, rather + than using a '.' to distinguish a sub module from the parent, a '/' is + used instead. For example: + + \begin{verbatim} + from mod_python import apache + module = apache.import_module('dirname/module_name') + \end{verbatim} + + If an \code{__init__.py} file is present and it was necessary to import + it to achieve the same result as importing the root of a true Python + package, then \code{__init__} can be used as the module name. For example: + + \begin{verbatim} + from mod_python import apache + module = apache.import_module('dirname/__init__') + \end{verbatim} + + As a true Python package is not being used, if a module in the directory + needs to refer to another module in the same directory, it should use + just its name, it should not use any form of dotted path name via the + root of the package as would be the case for true Python packages. + Modules in subdirectories can be imported by using a '/' separated path + where the first part of the path is the name of the subdirectory. + + As a new feature in mod_python 3.3, when using the standard Python + 'import' statement to import a module, if the import is being done from a + module which was previously imported by the mod_python module importer, + it is equivalent to having called \code{apache.import_module()} directly. + + For example: + + \begin{verbatim} + import name + \end{verbatim} + + is equivalent to: + + \begin{verbatim} + from mod_python import apache + name = apache.import_module('name') + \end{verbatim} + + It is also possible to use constructs such as: + + \begin{verbatim} + import name as module + \end{verbatim} + + and: + + \begin{verbatim} + from name import value + \end{verbatim} + + Although the 'import' statement is used, that it maps through to the + \code{apache.import_module()} function ensures that parent/child + relationships are maintained correctly and reloading of a parent will + still work when only the child has been changed. It also ensures that one + will not end up with modules which were separately imported by the + mod_python module importer and the standard Python module importer. + + With the reimplementation of the module importer in mod_python 3.3, the + \var{module_name} argument may also now be an absolute path name of an + actual Python module contained in a single file. On Windows, a drive + letter can be supplied if necessary. For example: + + \begin{verbatim} + from mod_python import apache + name = apache.import_module('/some/path/name.py') + \end{verbatim} + + or: + + \begin{verbatim} + from mod_python import apache + import os + here = os.path.dirname(__file__) + path = os.path.join(here, 'module.py') + module = apache.import_module(path) + \end{verbatim} + + Where the file has an extension, that extension must be supplied. Although + it is recommended that code files still make use of the '.py' extension, + it is not actually a requirement and an alternate extension can be used. + For example: + + \begin{verbatim} + from mod_python import apache + import os + here = os.path.dirname(__file__) + path = os.path.join(here, 'servlet.mps') + servlet = apache.import_module(path) + \end{verbatim} + + To avoid the need to use hard coded absolute path names to modules, a few + shortcuts are provided. The first of these allow for the use of relative + path names with respect to the directory the module performing the + import is located within. + + For example: + + \begin{verbatim} + from mod_python import apache + + parent = apache.import_module('../module.py') + subdir = apache.import_module('./subdir/module.py') + \end{verbatim} + + Forward slashes must always be used for the prefixes './' and '../', even + on Windows hosts where native pathname use a backslash. This convention + of using forward slashes is used as that is what Apache normalizes all + paths to internally. If you are using Windows and have been using + backward slashes with \code{Directory} directives etc, you are using + Apache contrary to what is the accepted norm. + + A further shortcut allows paths to be declared relative to what is + regarded as the handler root directory. The handler root directory is the + directory context in which the active \code{Python*Handler} directive was + specified. If the directive was specified within a \code{Location} or + \code{VirtualHost} directive, or at global server scope, the handler root + will be the relevant document root for the server. + + To express paths relative to the handler root, the '\textasciitilde/' prefix + should be used. A forward slash must again always be used, even on Windows. + + For example: + + \begin{verbatim} + from mod_python import apache + + parent = apache.import_module('~/../module.py') + subdir = apache.import_module('~/subdir/module.py') + \end{verbatim} + + In all cases where a path to the actual code file for a module is given, + the \var{path} argument is redundant as there is no need to search + through a list of directories to find the module. In these situations, + the \var{path} is instead taken to be a list of directories to use as the + initial value of the \code{__mp_path__} variable contained in the + imported modules instead of an empty path. + + This feature can be used to attach a more restrictive search path to a + set of modules rather than using the \code{PythonOption} to set a global + search path. To do this, the modules should always be imported through a + specific parent module. That module should then always import submodules + using paths and supply \code{__mp_path__} as the \var{path} argument to + subsequent calls to \code{apache.import_module()} within that module. For + example: + + \begin{verbatim} + from mod_python import apache + + module1 = apache.import_module('./module1.py', path=__mp_path__) + module2 = apache.import_module('./module2.py', path=__mp_path__) + \end{verbatim} + + with the module being imported as: + + \begin{verbatim} + from mod_python import apache + + parent = apache.import_module('~/modules/parent.py', path=['/some/path']) + \end{verbatim} + + The parent module may if required extend the value of \code{__mp_path__} + prior to using it. Any such directories will be added to those inherited + via the \var{path} argument. For example: + + \begin{verbatim} + from mod_python import apache + import os + + here = os.path.dirname(__file__) + subdir = os.path.join(here, 'subdir') + __mp_path__.append(subdir) + + module1 = apache.import_module('./module1.py', path=__mp_path__) + module2 = apache.import_module('./module2.py', path=__mp_path__) + \end{verbatim} + + In all cases where a search path is being specified which is specific + to the mod_python module importer, whether it be specified using the + \code{PythonOption} called \code{mod_python.importer.path}, using the + \var{path} argument to the \code{apache.import_module()} function or + in the \code{__mp_path__} attribute, the prefix '\textasciitilde/' + can be used in a path and that path will be taken as being relative + to handler root. For example: + + \begin{verbatim} + PythonOption mod_python.importer.path "['~/modules']" + \end{verbatim} + + If wishing to refer to the handler root directory itself, then + '\textasciitilde' can be used and the trailing slash left off. For example: + + \begin{verbatim} + PythonOption mod_python.importer.path "['~']" + \end{verbatim} + + Note that with the new module importer, as directories associated with + \code{Python*Handler} directives are no longer being added automatically + to \code{sys.path} and they are instead used directly by the module + importer only when required, some existing code which expected to be able + to import modules in the handler root directory from a module in a + subdirectory may no longer work. In these situations it will be necessary + to set the mod_python module importer path to include '\textasciitilde' + or list '\textasciitilde' in the \code{__mp_path__} attribute of the module + performing the import. + + This trick of listing '\textasciitilde' in the module importer path + will not however help in the case where Python packages were previously + being placed into the handler root directory. In this case, the Python + package should either be moved out of the document tree and the directory + where it is located listed against the \code{PythonPath} directive, or the + package converted into the pseudo packages that mod_python supports and + change the module imports used to access the package. + + Only modules which could be imported by the mod_python module importer + will be candidates for automatic reloading when changes are made to the + code file on disk. Any modules or packages which were located in a + directory listed in \code{sys.path} and which were imported using the + standard Python module importer will not be candidates for reloading. + + Even where modules are candidates for module reloading, unless a true + value was explicitly supplied as the \var{autoreload} option to the + \code{apache.import_module()} function they will only be reloaded if the + \code{PythonAutoReload} directive is \code{On}. The default value when + the directive is not specified will be \code{On}, so the directive need + only be used when wishing to set it to \code{Off} to disable automatic + reloading, such as in a production system. + + Where possible, the \code{PythonAutoReload} directive should only be + specified in one place and in the root context for a specific Python + interpreter instance. If the \code{PythonAutoReload} directive is used in + multiple places with different values, or doesn't cover all directories + pertaining to a specific Python interpreter instance, then problems can + result. This is because requests against some URLs may result in modules + being reloaded whereas others may not, even when through each URL the + same module may be imported from a common location. + + If absolute certainty is required that module reloading is disabled and + that it isn't being enabled through some subset of URLs, the + \code{PythonImport} directive should be used to import a special module + whenever an Apache child process is being created. This module should + include a call to the \code{apache.freeze_modules()} function. This + will have the effect of permanently disabling module reloading for the + complete life of that Apache child process, irrespective of what value + the \code{PythonAutoReload} directive is set to. + + Using the new ability within mod_python 3.3 to have \code{PythonImport} + call a specific function within a module after it has been imported, + one could actually dispense with creating a module and instead call + the function directory out of the \code{mod_python.apache} module. + For example: + + \begin{verbatim} + PythonImport mod_python.apache::freeze_modules interpreter_name \end{verbatim} + + Where module reloading is being undertaken, unlike the core module + importer in versions of mod_python prior to 3.3, they are not reloaded on + top of existing modules, but into a completely new module instance. This + means that any code that previously relied on state information or data + caches to be preserved across reloads will no longer work. + + If it is necessary to transfer such information from an old module to the + new module, it is necessary to provide a hook function within modules to + transfer across the data that must be preserved. The name of this hook + function is \code{__mp_clone__()}. The argument given to the hook + function will be an empty module into which the new module will subsequently + be loaded. + + When called, the hook function should copy any data from the old module + to the new module. In doing this, the code performing the copying should + be cognizant of the fact that within a multithreaded Apache MPM that + other request handlers could still be trying to access and update the + data to be copied. As such, the hook function should ensure that it uses + any thread locking mechanisms within the module as appropriate when + copying the data. Further, it should copy the actual data locks + themselves across to the new module to ensure a clean transition. + + Because copying integral values will result in the data then being + separate, it may be necessary to always store data within a dictionary so + as to provide a level of indirection which will allow the data to be + usable from both module instances while they still exist. + + For example: + + \begin{verbatim} + import threading, time + + if not globals().has_key('_lock'): + # Initial import of this module. + _lock = threading.Lock() + _data1 = { 'value1' : 0, 'value2': 0 } + _data2 = {} + + def __mp_clone__(module): + _lock.acquire() + module._lock = _lock + module._data1 = _data1 + module._data2 = _data2 + _lock.release() + \end{verbatim} + + Because the old module is about to be discarded, the data which is + transferred should not consist of data objects which are dependent on + code within the old module. Data being copied across to the new module + should consist of standard Python data types, or be instances of classes + contained within modules which themselves are not candidates for + reloading. Otherwise, data should be migrated by transforming it into + some neutral intermediate state, with the new module transforming it back + when its code executes at the time of being imported. + + If these guidelines aren't heeded and data is dependent on code objects + within the old module, it will prevent those code objects from being + unloaded and if this continues across multiple reloads, then process size + may increase over time due to old code objects being retained. + + In any case, if for some reason the hook function fails and an exception + is raised then both the old and new modules will be discarded. As a last + opportunity to release any resources when this occurs, an extra hook + function called \code{__mp_purge__()} can be supplied. This function will + be called with no arguments. + \end{funcdesc} \begin{funcdesc}{allow_methods}{\optional{*args}} @@ -412,11 +843,23 @@ objects. For a more in-depth look at Apache internals, see the parameter by calling \code{apache.exists_config_define('FOOBAR')}. \end{funcdesc} -\begin{methoddesc}[server]{register_cleanup}{handler\optional{, data}} - Registers a cleanup. Equivalent to \function{req.register_cleanup()} - or \function{req.server.register_cleanup()}, except that a server or request - object is not required. -\end{methoddesc} +\begin{funcdesc}{stat}{fname, wanted} + This function returns an instance of an \code{mp_finfo} object + describing information related to the file with name \code{fname}. + The \code{wanted} argument describes the minimum attributes which + should be filled out. The resultant object can be assigned to the + \code{req.finfo} attribute. +\end{funcdesc} + +\begin{funcdesc}{register_cleanup}{callable\optional{, data}} + Registers a cleanup that will be performed at child shutdown time. Equivalent + to \function{server.register_cleanup()}, except that a request object is not + required. + \emph{Warning:} do not pass directly or indirectly a request object in the + data parameter. Since the callable will be called at server shutdown time, + the request object won't exist anymore and any manipulation of it in the + handler will give undefined behaviour. +\end{funcdesc} \begin{funcdesc}{config_tree}{} Returns the server-level configuration tree. This tree does not @@ -472,6 +915,18 @@ else: \end{verbatim} \end{funcdesc} +\subsection{Attributes\label{pyapi-apmem}} + +\begin{memberdesc}[apache]{interpreter} + The name of the subinterpreter under which we're running. + \emph{(Read-Only)} +\end{memberdesc} + +\begin{memberdesc}[apache]{main_server} + A \code{server} object for the main server. + \emph{(Read-Only}) +\end{memberdesc} + \subsection{Table Object (mp_table)\obindex{table}\label{pyapi-mptable}} \index{table} @@ -537,19 +992,16 @@ between handlers. containing the name of any of the apache request (but not filter or connection) handler directives, e.g. \samp{PythonHandler}. \var{handler} is a string containing the - name of the module and the handler function. Optional \var{dir} is - a string containing the name of the directory to be added to the - pythonpath. If no directory is specified, then, if there is already - a handler of the same type specified, its directory is inherited, - otherwise the directory of the presently executing handler is - used. If there is a \code{PythonPath} directive in effect, then - \code{sys.path} will be set exactly according to it (no directories - added, the \var{dir} argument is ignored). - + name of the module and the handler function, or the callable object + itself. Optional \var{dir} is a string containing the name of the + directory to be added to the module search path when looking for the + handler. If no directory is specified, then the directory to search + in is inherited from the handler which is making the registration, + A handler added this way only persists throughout the life of the request. It is possible to register more handlers while inside the - handler of the same type. One has to be careful as to not to create - an infinite loop this way. + handler of the same type. One has to be careful as to not to create an + infinite loop this way. Dynamic handler registration is a useful technique that allows the code to dynamically decide what will happen next. A typical example @@ -568,6 +1020,30 @@ else: If you pass this function an invalid handler, an exception will be generated at the time an attempt is made to find the handler. \end{notice} + +\end{methoddesc} + +\begin{methoddesc}[request]{add_input_filter}{filter_name} + Adds the named filter into the input filter chain for the current request. + The filter should be added before the first attempt to read any data from + the request. +\end{methoddesc} + +\begin{methoddesc}[request]{add_output_filter}{filter_name} + Adds the named filter into the output filter chain for the current request. + The filter should be added before the first attempt to write any data for + the response. + + Provided that all data written is being buffered and not flushed, this + could be used to add the "CONTENT_LENGTH" filter into the chain of + output filters. The purpose of the "CONTENT_LENGTH" filter is to add a + \code{Content-Length:} header to the response. + + \begin{verbatim} + req.add_output_filter("CONTENT_LENGTH") + req.write("content",0) + \end{verbatim} + \end{methoddesc} \begin{methoddesc}[request]{allow_methods}{methods\optional{, reset}} @@ -583,6 +1059,31 @@ else: the list of methods is first cleared. \end{methoddesc} +\begin{methoddesc}[request]{auth_name}{} + Returns AuthName setting. +\end{methoddesc} + +\begin{methoddesc}[request]{auth_type}{} + Returns AuthType setting. +\end{methoddesc} + +\begin{methoddesc}[request]{construct_url}{uri} + This function returns a fully qualified URI string from the path specified + by uri, using the information stored in the request to determine the scheme, + server name and port. The port number is not included in the string if it + is the same as the default port 80. + + For example, imagine that the current request is directed to the virtual + server www.modpython.org at port 80. Then supplying \samp{/index.html} will + yield the string \samp{http://www.modpython.org/index.html}. + +\end{methoddesc} + +\begin{methoddesc}[request]{discard_request_body}{} + Tests for and reads any message body in the request, simply discarding + whatever it receives. +\end{methoddesc} + \begin{methoddesc}[request]{document_root}{} Returns DocumentRoot setting. \end{methoddesc} @@ -673,7 +1174,7 @@ else: \end{methoddesc} -\begin{methoddesc}{log_error}{message\optional{, level}} +\begin{methoddesc}[request]{log_error}{message\optional{, level}} An interface to the Apache \code{ap_log_rerror} function. \var{message} is a string with the error message, \var{level} is one of the following flags constants: @@ -695,19 +1196,20 @@ else: \end{methoddesc} \begin{methoddesc}[request]{meets_conditions}{} - Calls the Apache \cfunction{ap_meets_conditions()} function which - returns a status code. If \var{status} is \constant{apache.OK}, generate - the content of the response normally. If not, simply return \var{status}. - Note that \member{req.headers_out} should be set prior to calling this - function. The same goes for \member{req.status} if the status differs - from \constant{apache.OK}. + Calls the Apache \cfunction{ap_meets_conditions()} function which returns + a status code. If \var{status} is \constant{apache.OK}, generate the + content of the response normally. If not, simply return \var{status}. + Note that \var{mtime} (and possibly the ETag header) should be set as + appropriate prior to calling this function. The same goes for + \member{req.status} if the status differs from \constant{apache.OK}. Example: \begin{verbatim} ... -r.headers_out['ETag'] = "1130794f-3774-4584-a4ea-0ab19e684268" -r.headers_out['Last-Modified'] = 'Wed, 23 Feb 2005 00:00:00 GMT' +r.headers_out['ETag'] = '"1130794f-3774-4584-a4ea-0ab19e684268"' r.headers_out['Expires'] = 'Mon, 18 Apr 2005 17:30:00 GMT' +r.update_mtime(1000000000) +r.set_last_modified() status = r.meets_conditions() if status != apache.OK: @@ -765,8 +1267,10 @@ require valid-user \end{methoddesc} \begin{methoddesc}[request]{readlines}{\optional{sizehint}} - Reads all or up to \var{sizehint} bytes of lines using - \method{readline} and returns a list of the lines read. + Reads all lines using \method{readline} and returns a list of the lines read. + If the optional \var{sizehint} parameter is given in, the method will read + at least \var{sizehint} bytes of data, up to the completion of the line in + which the \var{sizehint} bytes limit is reached. \end{methoddesc} \begin{methoddesc}[request]{register_cleanup}{callable\optional{, data}} @@ -791,6 +1295,36 @@ require valid-user \end{methoddesc} +\begin{methoddesc}[request]{register_input_filter}{filter_name, filter\optional{, dir}} + + Allows dynamic registration of mod_python input filters. \var{filter_name} + is a string which would then subsequently be used to identify the filter. + \var{filter} is a string containing the name of the module and the filter + function or the callable object itself. Optional \var{dir} is a string + containing the name of the directory to be added to the module search when + looking for the module. + + The registration of the filter this way only persists for the life of the + request. To actually add the filter into the chain of input filters for + the current request \code{req.add_input_filter()} would be used. + +\end{methoddesc} + +\begin{methoddesc}[request]{register_output_filter}{filter_name, filter\optional{, dir}} + + Allows dynamic registration of mod_python output filters. \var{filter_name} + is a string which would then subsequently be used to identify the filter. + \var{filter} is a string containing the name of the module and the filter + function or the callable object itself. Optional \var{dir} is a string + containing the name of the directory to be added to the module search + path when looking for the handler. + + The registration of the filter this way only persists for the life of the + request. To actually add the filter into the chain of output filters for + the current request \code{req.add_output_filter()} would be used. + +\end{methoddesc} + \begin{methoddesc}[request]{sendfile}{path\optional{, offset, len}} Sends \var{len} bytes of file \var{path} directly to the client, starting at offset \var{offset} using the server's internal @@ -804,6 +1338,15 @@ require valid-user client. \end{methoddesc} +\begin{methoddesc}[request]{set_etag}{} + Sets the outgoing \samp{ETag} header. +\end{methoddesc} + +\begin{methoddesc}[request]{set_last_modified}{} + Sets the outgoing \samp{Last-Modified} header based on value of + \code{mtime} attribute. +\end{methoddesc} + \begin{methoddesc}[request]{ssl_var_lookup}{var_name} Looks up the value of the named SSL variable. This method queries the mod_ssl Apache module directly, and may therefore be used in @@ -838,6 +1381,11 @@ require valid-user \end{methoddesc} +\begin{methoddesc}[request]{update_mtime}{dependency_mtime} + If \var{dependency_mtime} is later than the value in the \code{mtime} + attribute, sets the attribute to the new value. +\end{methoddesc} + \begin{methoddesc}[request]{write}{string\optional{, flush=1}} Writes \var{string} directly to the client, then flushes the buffer, unless flush is 0. @@ -901,7 +1449,6 @@ require valid-user \begin{memberdesc}[request]{proxyreq} A proxy request: one of \constant{apache.PROXYREQ_*} values. - \emph{(Read-Only}) \end{memberdesc} \begin{memberdesc}[request]{header_only} @@ -1078,9 +1625,23 @@ require valid-user \end{memberdesc} \begin{memberdesc}[request]{handler} - The name of the handler currently being processed. This is the handler - set by mod_mime, not the mod_python handler. In most cases it will be - "\samp{mod_python}. \emph{(Read-Only}) + The symbolic name of the content handler (as in module, not mod_python + handler) that will service the request during the response phase. When + the SetHandler/AddHandler directives are used to trigger mod_python, this + will be set to \samp{mod_python} by mod_mime. A mod_python handler executing + prior to the response phase may also set this to \samp{mod_python} along + with calling \samp{req.add_handler()} to register a mod_python handler + for the response phase. + + \begin{verbatim} +def typehandler(req): + if os.path.splitext(req.filename)[1] == ".py": + req.handler = "mod_python" + req.add_handler("PythonHandler", "mod_python.publisher") + return apache.OK + return apache.DECLINED + \end{verbatim} + \end{memberdesc} \begin{memberdesc}[request]{content_encoding} @@ -1096,7 +1657,6 @@ require valid-user \begin{memberdesc}[request]{user} If an authentication check is made, this will hold the user name. Same as CGI \envvar{REMOTE_USER}. - \emph{(Read-Only}) \begin{notice} \method{req.get_basic_auth_pw()} must be called prior to using this value. \end{notice} @@ -1104,17 +1664,14 @@ require valid-user \begin{memberdesc}[request]{ap_auth_type} Authentication type. Same as CGI \envvar{AUTH_TYPE}. - \emph{(Read-Only}) \end{memberdesc} \begin{memberdesc}[request]{no_cache} - Boolean. No cache if true. - \emph{(Read-Only}) + Boolean. This response cannot be cached. \end{memberdesc} \begin{memberdesc}[request]{no_local_copy} Boolean. No local copy exists. - \emph{(Read-Only}) \end{memberdesc} \begin{memberdesc}[request]{unparsed_uri} @@ -1124,7 +1681,6 @@ require valid-user \begin{memberdesc}[request]{uri} The path portion of the URI. - \emph{(Read-Only}) \end{memberdesc} \begin{memberdesc}[request]{filename} @@ -1133,7 +1689,7 @@ require valid-user \begin{memberdesc}[request]{canonical_filename} String. The true filename (\member{req.filename} is canonicalized if - they don't match). \emph{(Read-Only)} + they don't match). \end{memberdesc} \begin{memberdesc}[request]{path_info} @@ -1143,20 +1699,32 @@ require valid-user \begin{memberdesc}[request]{args} String. Same as CGI \envvar{QUERY_ARGS}. - \emph{(Read-Only}) \end{memberdesc} \begin{memberdesc}[request]{finfo} - Tuple. A file information structure, analogous to POSIX stat, - describing the file pointed to by the URI. \code{(mode, ino, - dev, nlink, uid, gid, size, atime, mtime, ctime, fname, - name)}. The \code{apache} module defines a set of \constant{FINFO_*} - constants that should be used to access elements of this - tuple. Example: + A file information object with type \code{mp_finfo}, analogous to the + result of the POSIX stat function, describing the + file pointed to by the URI. The object provides the attributes + \code{fname}, \code{filetype}, \code{valid}, \code{protection}, + \code{user}, \code{group}, \code{size}, \code{inode}, \code{device}, + \code{nlink}, \code{atime}, \code{mtime}, \code{ctime} and \code{name}. + + The attribute may be assigned to using the result of \code{apache.stat()}. + For example: + \begin{verbatim} -fname = req.finfo[apache.FINFO_FNAME] +if req.finfo.filetype == apache.APR_DIR: + req.filename = posixpath.join(req.filename, 'index.html') + req.finfo = apache.stat(req.filename, apache.APR_FINFO_MIN) + \end{verbatim} + + For backward compatability, the object can also be accessed as if it + were a tuple. The \code{apache} module defines a set of \constant{FINFO_*} + constants that should be used to access elements of this tuple. + + \begin{verbatim} +user = req.finfo[apache.FINFO_USER] \end{verbatim} - \emph{(Read-Only}) \end{memberdesc} \begin{memberdesc}[request]{parsed_uri} @@ -1172,7 +1740,6 @@ fname = req.parsed_uri[apache.URI_PATH] \begin{memberdesc}[request]{used_path_info} Flag to accept or reject path_info on current request. - \emph{(Read-Only}) \end{memberdesc} \begin{memberdesc}[request]{eos_sent} @@ -1187,6 +1754,27 @@ structure. \subsubsection{Connection Methods\label{pyapi-mpconn-meth}} +\begin{methoddesc}[connection]{log_error}{message\optional{, level}} + An interface to the Apache \code{ap_log_cerror} + function. \var{message} is a string with the error message, + \var{level} is one of the following flags constants: + + \begin{verbatim} + APLOG_EMERG + APLOG_ALERT + APLOG_CRIT + APLOG_ERR + APLOG_WARNING + APLOG_NOTICE + APLOG_INFO + APLOG_DEBUG + APLOG_NOERRNO + \end{verbatim} + + If you need to write to log and do not have a reference to a connection or + request object, use the \function{apache.log_error} function. +\end{methoddesc} + \begin{methoddesc}[connection]{read}{\optional{length}} Reads at most \var{length} bytes from the client. The read blocks indefinitely until there is at least one byte to read. If length is @@ -1376,8 +1964,10 @@ server) serving the request. \subsubsection{Server Methods\label{pyapi-mpsrv-meth}} \begin{methoddesc}[server]{get_config}{} - Similar to \code{req.get_config()}, but returns a config pointed to - by \code{server->module_config} Apache config vector. + Similar to \code{req.get_config()}, but returns a table object holding + only the mod_python configuration defined at global scope within the + Apache configuration. That is, outside of the context of any VirtualHost, + Location, Directory or Files directives. \end{methoddesc} \begin{methoddesc}[server]{get_options}{} @@ -1387,10 +1977,37 @@ server) serving the request. Directory or Files directives. \end{methoddesc} +\begin{methoddesc}[server]{log_error}{message\optional{, level}} + An interface to the Apache \code{ap_log_error} + function. \var{message} is a string with the error message, + \var{level} is one of the following flags constants: + + \begin{verbatim} + APLOG_EMERG + APLOG_ALERT + APLOG_CRIT + APLOG_ERR + APLOG_WARNING + APLOG_NOTICE + APLOG_INFO + APLOG_DEBUG + APLOG_NOERRNO + \end{verbatim} + + If you need to write to log and do not have a reference to a server or + request object, use the \function{apache.log_error} function. +\end{methoddesc} + \begin{methoddesc}[server]{register_cleanup}{request, callable\optional{, data}} Registers a cleanup. Very similar to \function{req.register_cleanup()}, except this cleanup will be executed at child termination time. This function - requires one extra argument - the request object. + requires the request object be supplied to infer the interpreter name. + If you don't have any request object at hand, then you must use the + \function{apache.register_cleanup} variant. + \emph{Warning:} do not pass directly or indirectly a request object in the + data parameter. Since the callable will be called at server shutdown time, + the request object won't exist anymore and any manipulation of it in the + callable will give undefined behaviour. \end{methoddesc} \subsubsection{Server Members\label{pyapi-mpsrv-mem}} @@ -1546,16 +2163,27 @@ class. This class is similar to the standard library module consumed at this point, there should be no more than one \class{FieldStorage} class instantiated per single request, nor should you make any attempts to read client data before or after - instantiating a \class{FieldStorage}. - - The data read from the client is then parsed into separate fields and - packaged in \class{Field} objects, one per field. For HTML form inputs - of type \code{file}, a temporary file is created that can later be - accessed via the \member{file} attribute of a \class{Field} object. + instantiating a \class{FieldStorage}. A suggested strategy for dealing + with this is that any handler should first check for the existance of + a \code{form} attribute within the request object. If this exists, it + should be taken to be an existing instance of the \class{FieldStorage} + class and that should be used. If the attribute does not exist + and needs to be created, it should be cached as the \code{form} + attribute of the request object so later handler code can use it. + + When the \class{FieldStorage} class instance is created, the data read + from the client is then parsed into separate fields and packaged in + \class{Field} objects, one per field. For HTML form inputs of type + \code{file}, a temporary file is created that can later be accessed via + the \member{file} attribute of a \class{Field} object. The \class{FieldStorage} class has a mapping object interface, i.e. it - can be treated like a dictionary. When used as a mapping, the keys are - form input names, and the returned dictionary value can be: + can be treated like a dictionary in most instances, but is not strictly + compatible as is it missing some methods provided by dictionaries and + some methods don't behave entirely like their counterparts, especially + when there is more than one value associated with a form field. When used + as a mapping, the keys are form input names, and the returned dictionary + value can be: \begin{itemize} \item @@ -1591,6 +2219,35 @@ class. This class is similar to the standard library module \class{FieldStorage} methods: + \begin{methoddesc}[FieldStorage]{add_field}{name, value} + Adds an additional form field with \var{name} and \var{value}. + If a form field already exists with \var{name}, the \var{value} + will be added to the list of existing values for the form field. + This method should be used for adding additional fields in + preference to adding new fields direct to the list of fields. + + If the value associated with a field should be replaced when it + already exists, rather than an additional value being associated + with the field, the dictionary like subscript operator should + be used to set the value, or the existing field deleted altogether + first using the \code{del} operator. + \end{methoddesc} + + \begin{methoddesc}[FieldStorage]{clear}{} + Removes all form fields. Individual form fields can be deleted + using the \code{del} operator. + \end{methoddesc} + + \begin{methoddesc}[FieldStorage]{get}{name, default} + If there is only one value associated with form field \var{name}, that + single value will be returned. If there are multiple values, a list is + returned holding all values. If no such form field or value exists then + the method returns the value specified by the parameter \var{default}. + A subscript operator is also available which yields the same result + except that an exception will be raised where the form field \var{name} + does not exist. + \end{methoddesc} + \begin{methoddesc}[FieldStorage]{getfirst}{name\optional{, default}} Always returns only one value associated with form field \var{name}. If no such form field or value exists then the method @@ -1606,6 +2263,22 @@ class. This class is similar to the standard library module of one item if only one such value exists. \end{methoddesc} + \begin{methoddesc}[FieldStorage]{has_key}{name} + Returns \code{True} if \var{name} is a valid form field. The \code{in} + operator is also supported and will call this method. + \end{methoddesc} + + \begin{methoddesc}[FieldStorage]{items}{} + Returns a list consisting of tuples for each combination of form + field name and value. + \end{methoddesc} + + \begin{methoddesc}[FieldStorage]{keys}{} + This method returns the names of the form fields. The \code{len} + operator is also supported and will return the number of names + which would be returned by this method. + \end{methoddesc} + \end{classdesc} \subsection{FieldStorage Examples\label{pyapi-util-fstor-examples}} @@ -1811,10 +2484,11 @@ request_data = util.FieldStorage(request, keep_blank_values=True, If this function is called after the headers have already been sent, an \exception{IOError} is raised. - This function raises \exception{apache.SERVER_RETURN} exception to - abandon any further processing of the handle. If you do not want - this, you can wrap the call to \function{redirect} in a try/except - block catching the \exception{apache.SERVER_RETURN}. + This function raises \exception{apache.SERVER_RETURN} exception with + a value of \constant{apache.DONE} to ensuring that any later phases or + stacked handlers do not run. If you do not want this, you can wrap the + call to \function{redirect} in a try/except block catching the + \exception{apache.SERVER_RETURN}. \end{funcdesc} \section{\module{Cookie} -- HTTP State Management\label{pyapi-cookie}} @@ -1868,7 +2542,7 @@ specification published by Netscape. the cookie. The \class{Cookie} class restricts attribute names to only valid values, specifically, only the following attributes are allowed: \code{name, value, version, path, domain, secure, comment, - expires, max_age, commentURL, discard, port, __data__}. + expires, max_age, commentURL, discard, port, httponly, __data__}. The \code{__data__} attribute is a general-purpose dictionary that can be used for storing arbitrary values, when necessary (This is @@ -1933,7 +2607,7 @@ spamcookie = mycookies["spam"] \begin{notice} Always check the types of objects returned by - \method{SignedCookie.parse()}.If it is an instance of + \method{SignedCookie.parse()}. If it is an instance of \class{Cookie} (as opposed to \class{SignedCookie}), the signature verification has failed: \begin{verbatim} @@ -1994,7 +2668,20 @@ Cookie.add_cookie(req, 'spam', 'eggs', expires=time.time()+300) can be any number of keyword arguments which, will be passed to \method{parse()} (This is useful for \class{signedCookie} and \class{MarshalCookie} which require \code{secret} as an additional - argument to \method{parse}). + argument to \method{parse}). The set of cookies found is returned as + a dictionary. +\end{funcdesc} + +\begin{funcdesc}{get_cookie}{req, name \optional{, Class, data}} + This is a convenience function for retrieving a single named cookie + from incoming headers. \var{req} is a mod_python \class{Request} + object. \var{name} is the name of the cookie. \var{Class} is a class + whose \method{parse()} method will be used to parse the cookies, it + defaults to \code{Cookie}. \var{Data} can be any number of keyword + arguments which, will be passed to \method{parse()} (This is useful for + \class{signedCookie} and \class{MarshalCookie} which require + \code{secret} as an additional argument to \method{parse}). The cookie + if found is returned, otherwise \code{None} is returned. \end{funcdesc} \subsection{Examples\label{pyapi-cookie-example}} @@ -2080,19 +2767,30 @@ delay.) \function{Session()} takes the same arguments as \class{BaseSession}. This function returns a instance of the default session class. The - the session class to be used can be specified using - \var{PythonOption session value}, where \var{value} is one of - \class{DbmSession}, \class{MemorySession} or \class{FileSession}. Specifying - custom session classes using PythonOption session is not yet supported. - - If \var{PythonOption session} is not found, the function queries - the MPM and based on that returns either a new instance of - \class{DbmSession} or \class{MemorySession}. - - \class{MemorySession} will be used if the MPM is threaded and not - forked (such is the case on Windows), or if it threaded, forked, but - only one process is allowed (the worker MPM can be configured to run - this way). In all other cases \class{DbmSession} is used. + session class to be used can be specified using \var{PythonOption + mod_python.session.session_type value}, where \var{value} is one of + \class{DbmSession}, \class{MemorySession} or \class{FileSession}. + Specifying custom session classes using \code{PythonOption} session is + not yet supported. + + If session type option is not found, the function queries the MPM and + based on that returns either a new instance of \class{DbmSession} or + \class{MemorySession}. \class{MemorySession} will be used if the MPM is + threaded and not forked (such is the case on Windows), or if it threaded, + forked, but only one process is allowed (the worker MPM can be configured + to run this way). In all other cases \class{DbmSession} is used. + + Note that on Windows if you are using multiple Python interpreter + instances and you need sessions to be shared between applications + running within the context of the distinct Python interpreter + instances, you must specifically indicate that \class{DbmSession} + should be used, as \class{MemorySession} will only allow a session + to be valid within the context of the same Python interpreter instance. + + Also note that the option name \code{mod_python.session.session_type} + only started to be used from mod_python 3.3 onwards. If you need to + retain compatability with older versions of mod_python, you should + use the now obsolete \code{session} option instead. \end{funcdesc} \begin{classdesc}{BaseSession}{req\optional{, sid, secret, timeout, lock}} @@ -2114,13 +2812,30 @@ delay.) determined by calling the \method{is_new()} method. Cookies generated by sessions will have a path attribute which is - calculated by comparing the server \code{DocumentRoot} and the - directory in which the \code{PythonHandler} directive currently in - effect was specified. E.g. if document root is \file{/a/b/c} and - \code{PythonHandler} was specified in \file{/a/b/c/d/e}, the path - will be set to \file{/d/e}. You can force a specific path by using - \code{ApplicationPath} option (\samp{PythonOption ApplicationPath - /my/path} in server configuration). + calculated by comparing the server \code{DocumentRoot} and the directory + in which the \code{PythonHandler} directive currently in effect was + specified. E.g. if document root is \file{/a/b/c} and the directory + \code{PythonHandler} was specified was \file{/a/b/c/d/e}, the path will be + set to \file{/d/e}. + + The deduction of the path in this way will only work though where the + \code{Directory} directive is used and the directory is actually within + the document root. If the \code{Location} directive is used or the + directory is outside of the document root, the path will be set to + \file{/}. You can force a specific path by setting the + \code{mod_python.session.application_path} option (\samp{PythonOption + mod_python.session.application_path /my/path} in server configuration). + + Note that prior to mod_python 3.3, the option was \code{ApplicationPath}. + If your system needs to be compatible with older versions of mod_python, + you should continue to use the now obsolete option name. + + The domain of a cookie is by default not set for a session and as such + the session is only valid for the host which generated it. In order to + have a session which spans across common sub domains, you can specify the + parent domain using the \code{mod_python.session.application_domain} + option (\samp{PythonOption mod_python.session.application_domain + mod_python.org} in server configuration). When a \var{secret} is provided, \class{BaseSession} will use \class{SignedCookie} when generating cookies thereby making the @@ -2128,8 +2843,10 @@ delay.) \class{Cookie} (though even if not signed, the session id is generated to be very difficult to guess). - A session will timeout if it has not been accessed for more than - \var{timeout}, which defaults to 30 minutes. An attempt to load an + A session will timeout if it has not been accessed and a save performed, + within the \var{timeout} period. Upon a save occuring the time of last + access is updated and the period until the session will timeout be reset. + The default \var{timeout} period is 30 minutes. An attempt to load an expired session will result in a ``new'' session. The \var{lock} argument (defaults to 1) indicates whether locking @@ -2242,10 +2959,17 @@ if sess.is_new(): server restarts). By default the session information is stored in a dbmfile named \file{mp_sess.dbm} and stored in a temporary directory returned by \code{tempfile.gettempdir()} standard library - function. An alternative directory can be specified with the - \code{PythonOption session_directory} directive. - The path and filename can can be overridden by setting \code{PythonOption - session_dbm filename}. + function. An alternative directory can be specified using + \code{PythonOption mod_python.dbm_session.database_directory + /path/to/directory}. The path and filename can can be overridden by + setting \code{PythonOption mod_python.dbm_session.database_filename + filename}. + + Note that the above names for the \code{PythonOption} settings were + changed to these values in mod_python 3.3. If you need to retain + compatability with older versions of mod_python, you should continue + to use the now obsolete \code{session_directory} and \code{session_dbm} + options. The implementation uses Python \module{anydbm} module, which will default to \module{dbhash} on most systems. If you need to use a @@ -2271,15 +2995,20 @@ if sess.is_new(): The session files are saved in a directory named mp_sess in the temporary directory returned by the \code{tempfile.gettempdir()} standard library function. An alternate path can be set using - \code{PythonOption session_directory /path/to/directory}. This - directory must exist and be readable and writeable by the apache - process. - - Expired session files are periodically removed by the cleanup - mechanism. The behaviour of the cleanup can be controlled using the - \var{fast_cleanup} and \var{verify_cleanup} parameters, as well as - \var{PythonOption session_grace_period} and - \var{PythonOption session_cleanup_time_limit}. + \code{PythonOption mod_python.file_session.database_directory + /path/to/directory}. This directory must exist and be readable and + writeable by the apache process. + + Note that the above name for the \code{PythonOption} setting was + changed to these values in mod_python 3.3. If you need to retain + compatability with older versions of mod_python, you should continue + to use the now obsolete \code{session_directory} option. + + Expired session files are periodically removed by the cleanup mechanism. + The behaviour of the cleanup can be controlled using the + \var{fast_cleanup} and \var{verify_cleanup} parameters, as well as + \var{PythonOption mod_python.file_session.cleanup_time_limit} and + \var{PythonOption mod_python.file_session.cleanup_grace_period}. \begin{itemize} \item @@ -2308,7 +3037,7 @@ if sess.is_new(): \var{verify_cleanup} = True. The value of \var{fast_cleanup} can also be set using - \code{PythonOption session_fast_cleanup}. + \code{PythonOption mod_python.file_session.enable_fast_cleanup}. \item \var{verify_cleanup} @@ -2328,10 +3057,10 @@ if sess.is_new(): deleted if all the sessions are not using a the same timeout value. The value of \var{verify_cleanup} can also be set using - \code{PythonOption session_verify_cleanup} + \code{PythonOption mod_python.file_session.verify_session_timeout}. \item - \var{PythonOption session_cleanup_time_limit [value]} + \var{PythonOption mod_python.file_session.cleanup_time_limit [value]} Integer value in seconds. Default is 2 seconds. Session cleanup could potentially take a long time and be both cpu @@ -2347,7 +3076,7 @@ if sess.is_new(): is called. \item - \var{PythonOption session_grace_period [value]} + \var{PythonOption mod_python.file_session.cleanup_grace_period [value]} Integer value in seconds. Default is 240 seconds. This value is added to the session timeout in determining if a session file should be deleted. @@ -2372,7 +3101,9 @@ if sess.is_new(): This class provides session storage using a global dictionary. This class provides by far the best performance, but cannot be used in a multi-process configuration, and also consumes memory for every - active session. + active session. It also cannot be used where multiple Python interpreters + are used within the one Apache process and it is necessary to share + sessions between applications running in the distinct interpreters. Note that using this class directly is not cross-platform. For best compatibility across platforms, always use the \function{Session()} @@ -2554,10 +3285,11 @@ it has to be absolute. bsd db. You will need to check which implementation \module{anydbm} defaults to on your system as some dbm libraries impose a limit on the size of the entry making them unsuitable. Dbm caching can be - enabled via \code{PSPDbmCache} Python option, e.g.: + enabled via \code{mod_python.psp.cache_database_filename} Python + option, e.g.: \begin{verbatim} -PythonOption PSPDbmCache ``/tmp/pspcache.dbm'' +PythonOption mod_python.psp.cache_database_filename ``/tmp/pspcache.dbm'' \end{verbatim} Note that the dbm cache file is not deleted when the server restarts. @@ -2566,11 +3298,18 @@ PythonOption PSPDbmCache ``/tmp/pspcache.dbm'' cached in memory only. There is no option to cache in a dbm file at this time. - \begin{methoddesc}[PSP]{run}{\optional{vars}} + Note that the above name for the option setting was only changed to + this value in mod_python 3.3. If you need to retain backward compatability + with older versions of mod_python use the \code{PSPDbmCache} option + instead. + + \begin{methoddesc}[PSP]{run}{\optional{vars, flush}} This method will execute the code (produced at object initialization time by parsing and compiling the PSP source). Optional argument \var{vars} is a dictionary keyed by - strings that will be passed in as global variables. + strings that will be passed in as global variables. Optional + argument \var{flush} is a boolean flag indicating whether output + should be flushed. The default is not to flush output. Additionally, the PSP code will be given global variables \code{req}, \code{psp}, \code{session} and \code{form}. A session @@ -2584,7 +3323,7 @@ PythonOption PSPDbmCache ``/tmp/pspcache.dbm'' referenced in the code. The object passed in \code{psp} is an instance of - \class{PSPInstance}. + \class{PSPInterface}. \end{methoddesc} @@ -2616,12 +3355,12 @@ def handler(req): \end{classdesc} -\begin{classdesc}{PSPInstance}{} +\begin{classdesc}{PSPInterface}{} An object of this class is passed as a global variable \code{psp} to the PSP code. Objects of this class are instantiated internally and the interface to \method{__init__} is purposely undocumented. - \begin{methoddesc}[PSPInstance]{set_error_page}{filename} + \begin{methoddesc}[PSPInterface]{set_error_page}{filename} Used to set a psp page to be processed when an exception occurs. If the path is absolute, it will be appended to document root, otherwise the file is assumed to exist in the same directory @@ -2630,12 +3369,12 @@ def handler(req): \code{sys.exc_info()}. \end{methoddesc} - \begin{methoddesc}[PSPInstance]{apply_data}{object\optional{, **kw}} + \begin{methoddesc}[PSPInterface]{apply_data}{object\optional{, **kw}} This method will call the callable object \var{object}, passing form data as keyword arguments, and return the result. \end{methoddesc} - \begin{methoddesc}[PSPInstance]{redirect}{location\optional{, permanent=0}} + \begin{methoddesc}[PSPInterface]{redirect}{location\optional{, permanent=0}} This method will redirect the browser to location \var{location}. If \var{permanent} is true, then \constant{MOVED_PERMANENTLY} will be sent (as opposed to diff --git a/Doc/modpython5.tex b/Doc/modpython5.tex index ff8a4481dd69164a8dddf61141c27cf4150b38d1..622a733693c9749b6c8555fe3fe7f6e9f8da8848 100644 --- a/Doc/modpython5.tex +++ b/Doc/modpython5.tex @@ -16,8 +16,18 @@ Multiple handlers can be specified on a single line, in which case they will be called sequentially, from left to right. Same handler directives can be specified multiple times as well, with the same result - all handlers listed will be executed sequentially, from first -to last. If any handler in the sequence returns a value other than -\code{apache.OK}, then execution of all subsequent handlers is aborted. +to last. + +If any handler in the sequence returns a value other than \code{apache.OK} +or \code{apache.DECLINED}, then execution of all subsequent handlers for +that phase are aborted. What happens when either \code{apache.OK} or +\code{apache.DECLINED} is returned is dependent on which phase is +executing. + +Note that prior to mod_python 3.3, if any handler in the sequence, no +matter which phase was executing, returned a value other than +\code{apache.OK}, then execution of all subsequent handlers for that phase +was aborted. The list of handlers can optionally be followed by a \code{|} followed by one or more file extensions. This would restrict the execution of @@ -29,9 +39,13 @@ A \emph{handler} has the following syntax: \code{module[::object]} Where \var{module} can be a full module name (package dot notation is -accepted), and the optional \var{object} is the name of an object -inside the module. +accepted) or an actual path to a module code file. The module is loaded +using the mod_python module importer as implemented by the +\code{apache.import_module()} function. Reference should be made to +the documentation of that function for further details of how module +importing is managed. +The optional \var{object} is the name of an object inside the module. Object can also contain dots, in which case it will be resolved from left to right. During resolution, if mod_python encounters an object of type \code{<class>}, it will try instantiating it passing it a single @@ -75,6 +89,10 @@ This handler is called after the request has been read but before any other phases have been processed. This is useful to make decisions based upon the input header fields. +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.OK} or \code{apache.DECLINED}, then +execution of all subsequent handlers for this phase are aborted. + \begin{notice} When this phase of the request is processed, the URI has not yet been translated into a path name, therefore this directive could never @@ -109,6 +127,10 @@ This handler gives allows for an opportunity to translate the URI into an actual filename, before the server's default rules (Alias directives and the like) are followed. +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.DECLINED}, then execution of all +subsequent handlers for this phase are aborted. + \begin{notice} At the time when this phase of the request is being processed, the URI has not been translated into a path name, therefore this @@ -135,6 +157,10 @@ This handler is called to give the module a chance to look at the request headers and take any appropriate specific actions early in the processing sequence. +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.OK} or \code{apache.DECLINED}, then +execution of all subsequent handlers for this phase are aborted. + \subsection{PythonInitHandler\label{dir-handlers-pih}} \index{PythonInitHandler} @@ -151,6 +177,10 @@ This handler is the first handler called in the request processing phases that is allowed both inside and outside \file{.htaccess} and directory. +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.OK} or \code{apache.DECLINED}, then +execution of all subsequent handlers for this phase are aborted. + This handler is actually an alias to two different handlers. When specified in the main config file outside any directory tags, it is an alias to \code{PostReadRequestHandler}. When specified inside directory @@ -174,6 +204,10 @@ mod_python.c This routine is called to check for any module-specific restrictions placed upon the requested resource. +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.OK} or \code{apache.DECLINED}, then +execution of all subsequent handlers for this phase are aborted. + For example, this can be used to restrict access by IP number. To do so, you would return \code{HTTP_FORBIDDEN} or some such to indicate that access is not allowed. @@ -195,6 +229,10 @@ with the request (such as looking up the user in a database and verifying that the [encrypted] password sent matches the one in the database). +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.DECLINED}, then execution of all +subsequent handlers for this phase are aborted. + To obtain the username, use \code{req.user}. To obtain the password entered by the user, use the \code{req.get_basic_auth_pw()} function. @@ -241,6 +279,10 @@ This handler runs after AuthenHandler and is intended for checking whether a user is allowed to access a particular resource. But more often than not it is done right in the AuthenHandler. +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.DECLINED}, then execution of all +subsequent handlers for this phase are aborted. + \subsection{PythonTypeHandler\label{dir-handlers-tph}} \index{PythonTypeHandler} @@ -257,6 +299,10 @@ This routine is called to determine and/or set the various document type information bits, like Content-type (via \code{r->content_type}), language, et cetera. +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.DECLINED}, then execution of all +subsequent handlers for this phase are aborted. + \subsection{PythonFixupHandler\label{dir-handlers-fuh}} \index{PythonFixupHandler} @@ -272,6 +318,10 @@ mod_python.c This routine is called to perform any module-specific fixing of header fields, et cetera. It is invoked just before any content-handler. +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.OK} or \code{apache.DECLINED}, then +execution of all subsequent handlers for this phase are aborted. + \subsection{PythonHandler\label{dir-handlers-ph}} \index{PythonHandler} @@ -287,6 +337,16 @@ mod_python.c This is the main request handler. Many applications will only provide this one handler. +Where multiple handlers are specified, if any handler in the sequence +returns a status value other than \code{apache.OK} or +\code{apache.DECLINED}, then execution of subsequent handlers for the phase +are skipped and the return status becomes that for the whole content +handler phase. If all handlers are run, the return status of the final +handler is what becomes the return status of the whole content handler +phase. Where that final status is \code{apache.DECLINED}, Apache will fall +back to using the \code{default-handler} and attempt to serve up the target +as a static file. + \subsection{PythonLogHandler\label{dir-handlers-plh}} \index{PythonLogHandler} @@ -300,7 +360,11 @@ not None\\ mod_python.c This routine is called to perform any module-specific logging -activities. +activities. + +Where multiple handlers are specified, if any handler in the sequence +returns a value other than \code{apache.OK} or \code{apache.DECLINED}, then +execution of all subsequent handlers for this phase are aborted. \subsection{PythonCleanupHandler\label{dir-handlers-pch}} \index{PythonCleanupHandler} @@ -351,6 +415,13 @@ omitted, it will default to \samp{inputfilter}. \var{Name} is the name under which the filter is registered, by convention filter names are usually in all caps. +The \var{module} referred to by the handler can be a full module name +(package dot notation is accepted) or an actual path to a module code file. +The module is loaded using the mod_python module importer as implemented by +the \code{apache.import_module()} function. Reference should be made to the +documentation of that function for further details of how module importing +is managed. + To activate the filter, use the \code{AddInputFilter} directive. \subsection{PythonOutputFilter\label{dir-filter-of}} @@ -370,6 +441,13 @@ omitted, it will default to \samp{outputfilter}. \var{Name} is the name under which the filter is registered, by convention filter names are usually in all caps. +The \var{module} referred to by the handler can be a full module name +(package dot notation is accepted) or an actual path to a module code file. +The module is loaded using the mod_python module importer as implemented by +the \code{apache.import_module()} function. Reference should be made to the +documentation of that function for further details of how module importing +is managed. + To activate the filter, use the \code{AddOutputFilter} directive. \section{Connection Handler\label{dir-conn}} @@ -392,6 +470,13 @@ the connection object. callable object name. If callable object name is omitted, it will default to \samp{connectionhandler}. +The \var{module} can be a full module name (package dot notation is +accepted) or an absolute path to a module code file. The module is loaded +using the mod_python module importer as implemented by the +\code{apache.import_module()} function. Reference should be made to the +documentation of that function for further details of how module importing +is managed. + \section{Other Directives\label{dir-other}} \subsection{PythonEnablePdb\label{dir-other-epd}} @@ -452,13 +537,27 @@ server config\\ mod_python.c Tells the server to import the Python module module at process startup -under the specified interpreter name. This is useful for -initialization tasks that could be time consuming and should not be -done at the request processing time, e.g. initializing a database -connection. +under the specified interpreter name. The import takes place at child +process initialization, so the module will actually be imported once for +every child process spawned. -The import takes place at child process initialization, so the module -will actually be imported once for every child process spawned. +The \var{module} can be a full module name (package dot notation is +accepted) or an absolute path to a module code file. The module is loaded +using the mod_python module importer as implemented by the +\code{apache.import_module()} function. Reference should be made to +the documentation of that function for further details of how module +importing is managed. + +The \code{PythonImport} directive is useful for initialization tasks that +could be time consuming and should not be done at the time of processing a +request, e.g. initializing a database connection. Where such initialization +code could fail and cause the importing of the module to fail, it should be +placed in its own function and the alternate syntax used: + +\code{PythonImport \emph{module::function} \emph{interpreter_name}} + +The named function will be called only after the module has been imported +successfully. The function will be called with no arguments. \begin{notice} At the time when the import takes place, the configuration is not @@ -665,6 +764,50 @@ between the apache configuration files (\file{httpd.conf}, \file{.htaccess}, etc) and the Python programs. If the value is omitted or empty (\code{""}), then the key is removed from the local configuration. +\strong{Reserved PythonOption Keywords} + +Some PythonOption keywords are used for configuring various aspects of +mod_python. Any keyword starting with mod_python.* should be considered +as reserved for internal mod_python use. + +Users are encouraged to use their own namespace qualifiers when creating +add-on modules, and not pollute the global namespace. + +The following PythonOption keys are currently used by mod_python. + +% Note - Make sure you put a space character in any empty tables cells. +% Otherwise the formatting will be messed up. +\begin{tableiii}{l|c|l}{textrm}{Key}{Required Value}{Notes} + \lineiii{mod_python.legacy.importer}{*}{Enables the obsolete importer.} + \lineiii{mod_python.mutex_directory}{ }{ } + \lineiii{mod_python.mutex_locks}{ }{ } + \lineiii{mod_python.psp.cache_database_filename}{ }{ } + \lineiii{mod_python.session.session_type}{ }{ } + \lineiii{mod_python.session.cookie_name}{ }{ } + \lineiii{mod_python.session.application_domain}{ }{ } + \lineiii{mod_python.session.application_path}{ }{ } + \lineiii{mod_python.session.database_directory}{ }{ } + \lineiii{mod_python.dbm_session.database_filename}{ }{ } + \lineiii{mod_python.dbm_session.database_directory}{ }{ } + \lineiii{mod_python.file_session.enable_fast_cleanup}{ }{ } + \lineiii{mod_python.file_session.verify_session_timeout}{ }{ } + \lineiii{mod_python.file_session.cleanup_grace_period}{ }{ } + \lineiii{mod_python.file_session.cleanup_time_limit}{ }{ } + \lineiii{mod_python.file_session.database_directory}{ }{ } + + \lineiii{session}{ }{Deprecated in 3.3, use mod_python.session.session_type} + \lineiii{ApplicationPath}{ }{Deprecated in 3.3, use mod_python.session.application_path} + \lineiii{session_cookie_name}{ }{Deprecated in 3.3, use mod_python.session.cookie_name} + \lineiii{session_directory}{ }{Deprecated in 3.3, use mod_python.session.database_directory} + \lineiii{session_dbm}{ }{Deprecated in 3.3, use mod_python.dbm_session.database_filename} + \lineiii{session_cleanup_time_limit}{ }{Deprecated in 3.3, use mod_python.file_session.cleanup_time_limit} + \lineiii{session_fast_cleanup}{ }{Deprecated in 3.3, use mod_python.file_session.enable_fast_cleanup} + \lineiii{session_grace_period}{ }{Deprecated in 3.3, use mod_python.file_session.cleanup_grace_period} + \lineiii{session_verify_cleanup}{ }{Deprecated in 3.3, use mod_python.file_session.cleanup_session_timeout} + \lineiii{PSPDbmCache}{ }{Deprecated in 3.3, use mod_python.psp.cache_database_filename} +\end{tableiii} + + \subsection{PythonPath\label{dir-other-pp}} \index{PythonPath} diff --git a/Doc/modpython6.tex b/Doc/modpython6.tex index a628352435ac51ff51ef7674e1dc58f1aa09af8f..0040c640b84c2e844ca8c679d27d0e80a09c34dd 100644 --- a/Doc/modpython6.tex +++ b/Doc/modpython6.tex @@ -1,3 +1,264 @@ +\chapter{Server Side Includes\label{ssi}} + +\section{Overview of SSI\label{ssi-overview}} + +SSI (Server Side Includes) are directives that are placed in HTML pages, +and evaluated on the server while the pages are being served. They let you +add dynamically generated content to an existing HTML page, without having +to serve the entire page via a CGI program, or other dynamic technology +such as a mod_python handler. + +SSI directives have the following syntax: + +\begin{verbatim} +<!--#element attribute=value attribute=value ... --> +\end{verbatim} + +It is formatted like an HTML comment, so if you don't have SSI correctly +enabled, the browser will ignore it, but it will still be visible in the +HTML source. If you have SSI correctly configured, the directive will be +replaced with its results. + +For a more thorough description of the SSI mechanism and how to enable it, +see the \citetitle[http://httpd.apache.org/docs/2.0/howto/ssi.html]{SSI +tutorial} provided with the Apache documentation. + +Version 3.3 of mod_python introduces support for using Python code within +SSI files. Note that mod_python honours the intent of the Apache +\code{IncludesNOEXEC} option to the \code{Options} directive. That is, if +\code{IncludesNOEXEC} is enabled, then Python code within a SSI file will +not be executed. + +\section{Using Python Code\label{ssi-python-code}} + +The extensions to mod_python to allow Python code to be used in conjunction +with SSI introduces the new SSI directive called 'python'. This directive +can be used in two forms, these being 'eval' and 'exec' modes. In the case +of 'eval', a Python expression is used and it is the result of that +expression which is substituted in place into the page. + +\begin{verbatim} +<!--#python eval="10*'HELLO '" --> +<!--#python eval="len('HELLO')" --> +\end{verbatim} + +Where the result of the expression is not a string, the value will be +automatically converted to a string by applying \code{str()} to the value. + +In the case of 'exec' a block of Python code may be included. For any +output from this code to appear in the page, it must be written back +explicitly as being part of the response. As SSI are processed by an Apache +output filter, this is done by using an instance of the mod_python +\code{filter} object which is pushed into the global data set available to +the code. + +\begin{verbatim} +<!--#python exec=" +filter.write(10*'HELLO ') +filter.write(str(len('HELLO'))) +" --> +\end{verbatim} + +Any Python code within the 'exec' block must have a zero first level +indent. You cannot start the code block with an arbitrary level of indent +such that it lines up with any indenting used for surrounding HTML +elements. + +Although the mod_python \code{filter} object is not a true file object, that +it provides the \code{write()} method is sufficient to allow the \code{print} +statement to be used on it directly. This will avoid the need to explicitly +convert non string objects to a string before being output. + +\begin{verbatim} +<!--#python exec=" +print >> filter, len('HELLO') +" --> +\end{verbatim} + +\section{Scope of Global Data\label{ssi-data-scope}} + +Multiple instances of 'eval' or 'exec' code blocks may be used within the +one page. Any changes to or creation of global data which is performed +within one code block will be reflected in any following code blocks. +Global data constitutes variables as well as module imports, function and +class definitions. + +\begin{verbatim} +<!--#python exec=" +import cgi, time, os +def _escape(object): + return cgi.escape(str(object)) +now = time.time() +" --> +<html> +<body> +<pre> +<!--#python eval="_escape(time.asctime(time.localtime(now)))"--> + +<!--#python exec=" +keys = os.environ.keys() +keys.sort() +for key in keys: + print >> filter, _escape(key), + print >> filter, '=', + print >> filter, _escape(repr(os.environ.get(key))) +" --> +</pre> +</body> +</html> +\end{verbatim} + +The lifetime of any global data is for the current request only. If data +must persist between requests, it must reside in external modules and as +necessary be protected against multithreaded access in the event that a +multithreaded Apache MPM is used. + +\section{Pre-propulating Globals\label{ssi-globals}} + +Any Python code which appears within the page has to be compiled each time +the page is accessed before it is executed. In other words, the compiled +code is not cached between requests. To limit such recompilation and to +avoid duplication of common code amongst many pages, it is preferable to +pre-populate the global data from within a mod_python handler prior to the +page being processed. + +In most cases, a fixup handler would be used for this purpose. For this to +work, first need to configure Apache so that it knows to call the fixup +handler. + +\begin{verbatim} +PythonFixupHandler _handlers +\end{verbatim} + +The implementation of the fixup handler contained in \code{_handlers.py} +then needs to create an instance of a Python dictionary, store that in the +mod_python request object as \code{ssi_globals} and then populate that +dictionary with any data to be available to the Python code executing +within the page. + +\begin{verbatim} +from mod_python import apache + +import cgi, time + +def _escape(object): + return cgi.escape(str(object)) + +def _header(filter): + print >> filter, '...' + +def _footer(filter): + print >> filter, '...' + +def fixuphandler(req): + req.ssi_globals = {} + req.ssi_globals['time'] = time + req.ssi_globals['_escape'] = _escape + req.ssi_globals['_header'] = _header + req.ssi_globals['_footer'] = _footer + return apache.OK +\end{verbatim} + +This is most useful where it is necessary to insert common information such +as headers, footers or menu panes which are dynamically generated into many +pages. + +\begin{verbatim} +<!--#python exec=" +now = time.time() +" --> +<html> +<body> +<!--#python exec="_header(filter)" --> +<pre> +<!--#python eval="_escape(time.asctime(time.localtime(now)))"--> +</pre> +<!--#python exec="_footer(filter)" --> +</body> +</html> +\end{verbatim} + +\section{Conditional Expressions\label{ssi-conditionals}} + +SSI allows for some programmability in its own right through the use of +conditional expressions. The structure of this conditional construct is: + +\begin{verbatim} +<!--#if expr="test_condition" --> +<!--#elif expr="test_condition" --> +<!--#else --> +<!--#endif --> +\end{verbatim} + +A test condition can be any sort of logical comparison, either comparing +values to one another, or testing the 'truth' of a particular value. + +The source of variables used in conditional expressions is distinct from +the set of global data used by the Python code executed within a page. +Instead, the variables are sourced from the \code{subprocess_env} table +object contained within the request object. The values of these variables +can be set from within a page using the SSI 'set' directive, or by a range +of other Apache directives within the Apache configuration files such as +\code{BrowserMatchNoCase} and \code{SetEnvIf}. + +To set these variables from within a mod_python handler, the +\code{subprocess_env} table object would be manipulated directly through +the request object. + +\begin{verbatim} +from mod_python import apache + +def fixuphandler(req): + debug = req.get_config().get('PythonDebug', '0') + req.subprocess_env['DEBUG'] = debug + return apache.OK +\end{verbatim} + +If being done from within Python code contained within the page itself, the +request object would first have to be accessed via the filter object. + +\begin{verbatim} +<!--#python exec=" +debug = filter.req.get_config().get('PythonDebug', '0') +filter.req.subprocess_env['DEBUG'] = debug +" --> +<html> +<body> +<!--#if expr="${DEBUG} != 0" --> +DEBUG ENABLED +<!--#else --> +DEBUG DISABLED +<!--#endif --> +</body> +</html> +\end{verbatim} + +\section{Enabling INCLUDES Filter\label{ssi-output-filter}} + +SSI is traditionally enabled using the \code{AddOutputFilter} directive in +the Apache configuration files. Normally this would be where the request +mapped to a static file. + +\begin{verbatim} +AddOutputFilter INCLUDES .shtml +\end{verbatim} + +When mod_python is being used, the ability to dynamically enable output +filters for the current request can instead be used. This could be done +just for where the request maps to a static file, but may just as easily be +carried out where the content of a response is generated dynamically. In +either case, to enable SSI for the current request, the +\code{add_output_filter()} method of the mod_python request object would be +used. + +\begin{verbatim} +from mod_python import apache + +def fixuphandler(req): + req.add_output_filter('INCLUDES') + return apache.OK +\end{verbatim} + \chapter{Standard Handlers\label{handlers}} \section{Publisher Handler\label{hand-pub}} @@ -13,7 +274,7 @@ To use the handler, you need the following lines in your configuration <Directory /some/path> SetHandler mod_python PythonHandler mod_python.publisher - </Directory> + </Directory> \end{verbatim} This handler allows access to functions and variables within a module @@ -24,7 +285,7 @@ via URL's. For example, if you have the following module, called """ Publisher example """ def say(req, what="NOTHING"): - return "I am saying %s" % what + return "I am saying %s" % what \end{verbatim} @@ -87,8 +348,8 @@ For example, given the following configuration: DocumentRoot /some/dir <Directory /some/dir> - SetHandler mod_python - PythonHandler mod_python.publisher + SetHandler mod_python + PythonHandler mod_python.publisher </Directory> \end{verbatim} @@ -96,12 +357,11 @@ And the following \file{/some/dir/index.py} file: \begin{verbatim} def index(req): - - return "We are in index()" + return "We are in index()" def hello(req): + return "We are in hello()" - return "We are in hello()" \end{verbatim} Then: @@ -183,20 +443,20 @@ can access the \code{hello} function: def __auth__(req, user, passwd): - if user == "eggs" and passwd == "spam" or \ - user == "joe" and passwd == "eoj": - return 1 - else: - return 0 + if user == "eggs" and passwd == "spam" or \ + user == "joe" and passwd == "eoj": + return 1 + else: + return 0 def __access__(req, user): - if user == "eggs": - return 1 - else: - return 0 + if user == "eggs": + return 1 + else: + return 0 def hello(req): - return "hello" + return "hello" \end{verbatim} @@ -209,7 +469,7 @@ Here is the same functionality, but using an alternative technique: __access__ = ["eggs"] def hello(req): - return "hello" + return "hello" \end{verbatim} @@ -220,16 +480,16 @@ the function, e.g.: \begin{verbatim} def sensitive(req): - def __auth__(req, user, password): - if user == 'spam' and password == 'eggs': - # let them in - return 1 - else: - # no access - return 0 + def __auth__(req, user, password): + if user == 'spam' and password == 'eggs': + # let them in + return 1 + else: + # no access + return 0 - # something involving sensitive information - return 'sensitive information` + # something involving sensitive information + return 'sensitive information` \end{verbatim} Note that this technique will also work if \code{__auth__} or @@ -284,7 +544,13 @@ If \code{PythonDebug} server configuration is \code{On}, then by appending an underscore (\samp{_}) to the end of the url you can get a nice side-by-side listing of original PSP code and resulting Python code generated by the \code{psp} module. This is very useful for -debugging. +debugging. You'll need to adjust your httpd configuration: + +\begin{verbatim} + AddHandler mod_python .psp .psp_ + PythonHandler mod_python.psp + PythonDebug On +\end{verbatim} \begin{notice} Leaving debug on in a production environment will allow remote users diff --git a/Doc/modpython7.tex b/Doc/modpython7.tex new file mode 100644 index 0000000000000000000000000000000000000000..dff3241f9ee3f246278c429e1c169772e5892326 --- /dev/null +++ b/Doc/modpython7.tex @@ -0,0 +1,5 @@ +\chapter{Security\label{security}} + +Considerations on using mod_python in a secure manner can be found +in the \citetitle[http://wiki.apache.org/mod_python]{mod_python wiki} +at \citetitle[http://wiki.apache.org/mod_python/CategorySecurity]{CategorySecurity}. diff --git a/Makefile.in b/Makefile.in index bdd98cd8afc0befd04cc9e7740f9ad7d5af35507..9dcaadb88928928711061a943ccb2c5bd80d1a41 100644 --- a/Makefile.in +++ b/Makefile.in @@ -74,12 +74,16 @@ install_py_lib: clean: cd src && $(MAKE) clean cd dist && $(MAKE) clean + cd test && $(MAKE) clean rm -f core distclean: clean cd src && $(MAKE) distclean cd Doc && $(MAKE) distclean cd dist && $(MAKE) distclean + cd test && $(MAKE) distclean rm -rf Makefile config.h config.status config.cache config.log \ test/testconf.py +check: + cd test && $(MAKE) check diff --git a/NEWS b/NEWS index 1aab00be125189a19c2b9c9d261d12db075206eb..1b1b07087fb297f06f5c61a8228209ee3ed79169 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,10 @@ -July 19 2006 - 3.2.10 is being tagged +Jan 29 2007 - 3.3.1 is being tagged + +Dec 9 2006 - 3.3.0b is being tagged + +Aug 7 2006 - 3.2.10 released + +July 19 2006 - 3.2.10 is being tagged from branches/3.2.x July 19 2006 - The public release of 3.2.9 is being abandoned due to some recently reported memory leaks. Although 3.2.9 is ready for @@ -6,12 +12,15 @@ July 19 2006 - The public release of 3.2.9 is being abandoned due to some and proceed immediately to 3.2.10. See MODPYTHON-172 for on the specific details on the issues. -June 29 2006 - 3.2.9 is being tagged +June 29 2006 - 3.2.9 is being tagged from branches/3.2.x -Feb 19 2006 - 3.2.8 is being tagged +Feb 19 2006 - 3.2.8 is being tagged from branches/3.2.x 3.2.8 is a security release to fix the possible directory traversal attack in FileSession. +Feb 9 2006 - Created 3.2.x stable bugfix branch in svn as + branches/3.2.x + Feb 3 2006 - 3.2.7 is being tagged Jan 16 2006 - 3.2.6 final is being tagged (no changes from 3.2.6b) diff --git a/README b/README index 3f4bee7966ca391f4f1ca15bd2b938c900ec17e2..b51e8f5fb1ac65475582b19042a729d4a986748f 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ This is the Mod_Python README file. It consists of the following parts: 1. Getting Started 2. Flex -3. New in 3.2 +3. New in 3.3 4. New in 3.0 5. Migrating from Mod_Python 2.7.8 6. OS Hints @@ -23,14 +23,17 @@ If you can't read instructions: $ su # make install - Edit httpd.conf like instructions at the end of "make install" - tell you. + Edit httpd.conf as instructed at the end of "make install". If the above worked - read the tutorial in the doc directory. 2. ./configure will generate a WARNING if it cannot find flex, or it is the wrong version. Generally you can ignore this warning and still -successfully compile mod_python. +successfully compile mod_python as the timestamp of the src/psp_parser.c +file will be newer than that for the src/psp_parser.l file. If for some +reason it still tries to run flex to regenerate the src/psp_parser.c +file, running 'touch src/psp_parser.c' to update the timestamp should +stop this and it will use the provided file. The parser used by psp is written in C generated using flex. This requires a reentrant version of flex, which at this time is 2.5.31. @@ -42,7 +45,7 @@ src/psp_parser.c file, you must get the correct flex version. You can specify the path the flex binary by using ./configure --with-flex=/path/to/flex/binary. -3. New in 3.2 +3. New in 3.3 Please refer to doc-html/ for more information. 4. New in 3.0 diff --git a/configure b/configure index 262bfe5d5c3bb43bacfe9eff5c904f0113ee02be..9dae5406e123fd79de8eb9adedba27ab6a120691 100755 --- a/configure +++ b/configure @@ -3213,7 +3213,7 @@ echo "$as_me: WARNING: flex $LEX not found See the README for more information." >&2;} fi - ac_config_files="$ac_config_files Makefile src/Makefile Doc/Makefile src/include/mod_python.h test/testconf.py dist/setup.py dist/Makefile" + ac_config_files="$ac_config_files Makefile src/Makefile Doc/Makefile src/include/mod_python.h test/Makefile test/testconf.py dist/setup.py dist/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -3769,6 +3769,7 @@ do "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "Doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES Doc/Makefile" ;; "src/include/mod_python.h" ) CONFIG_FILES="$CONFIG_FILES src/include/mod_python.h" ;; + "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/testconf.py" ) CONFIG_FILES="$CONFIG_FILES test/testconf.py" ;; "dist/setup.py" ) CONFIG_FILES="$CONFIG_FILES dist/setup.py" ;; "dist/Makefile" ) CONFIG_FILES="$CONFIG_FILES dist/Makefile" ;; diff --git a/configure.in b/configure.in index 41fa90f551f59a03dc24e46068f3067e63a302bd..f97af1d4047db198a2ba174e847b91bdf6abd38b 100644 --- a/configure.in +++ b/configure.in @@ -383,7 +383,7 @@ else See the README for more information.]) fi -AC_OUTPUT(Makefile src/Makefile Doc/Makefile src/include/mod_python.h test/testconf.py dist/setup.py dist/Makefile) +AC_OUTPUT(Makefile src/Makefile Doc/Makefile src/include/mod_python.h test/Makefile test/testconf.py dist/setup.py dist/Makefile) diff --git a/dist/build_installer.bat b/dist/build_installer.bat index 8f6f2f4351f019efe005bd60b3535e89e169e376..0fe443200822b74c2613576514ae44da73789aef 100644 --- a/dist/build_installer.bat +++ b/dist/build_installer.bat @@ -15,7 +15,7 @@ rem limitations under the License. rem rem Originally developed by Gregory Trubetskoy. rem -rem $Id: build_installer.bat 345063 2005-11-16 17:16:41Z nlehuen $ +rem $Id: build_installer.bat 420292 2006-07-09 13:09:28Z nlehuen $ rem rem This script builds the installer for Windows @@ -25,10 +25,20 @@ if not exist "%APACHESRC%\include" GOTO BADAPACHESRC rem Cleanup rmdir /s /q build -del ..\src\*.obj ..\src\*.lib ..\src\*.exp ..\src\*.res +del /s ..\src\*.obj ..\src\*.lib ..\src\*.exp ..\src\*.res rem Build python setup.py.in bdist_wininst --install-script win32_postinstall.py +GOTO END + +rem Use this instead of the previous line to create a debug build +rem For this you need a Python debug build. The .py files will be installed +rem directly in the Python debug build's site-packages. The .so file will remain +rem in build/lib.win32-2.4, so you'll have to make sure your testconf.py file +rem points to it instead of the copy that may already reside in LIBEXECDIR. + +rem python_d setup.py.in build --debug install +rem GOTO END rem Compress the installer if possible upx.exe --no-color --no-progress --best dist\*.exe @@ -36,7 +46,8 @@ GOTO END :BADAPACHESRC echo Currently APACHESRC points to %APACHESRC% -echo This value seems wrong as we could not find a proper Apache installation here. +echo This value seems wrong as we could not find a proper +echo Apache installation here. :NOAPACHESRC echo Please set the APACHESRC variable to point to your Apache setup diff --git a/dist/setup.py.in b/dist/setup.py.in index c0c4f0eba02529dc7e879672018ff91cfb39270c..dbb39bffe6cabae8862142edb04483a113137938 100644 --- a/dist/setup.py.in +++ b/dist/setup.py.in @@ -13,7 +13,7 @@ # limitations under the License. # # - # $Id: setup.py.in 374030 2006-02-01 09:48:37Z nlehuen $ + # $Id: setup.py.in 475516 2006-11-16 01:12:40Z grahamd $ from distutils.core import setup, Extension @@ -115,7 +115,7 @@ PSPModule = PSPExtension(getmp_srcdir(), [getmp_includedir()]) modpy_src_files = ("mod_python.c", "_apachemodule.c", "connobject.c", "filterobject.c", "hlist.c", "hlistobject.c", "requestobject.c", "serverobject.c", "tableobject.c", - "util.c") + "util.c", "finfoobject.c") class finallist(list): """this represents a list that cannot be appended to...""" @@ -126,7 +126,14 @@ class ModPyExtension(Extension): """a class that actually builds the mod_python.so extension for Apache (yikes)""" def __init__(self, source_dir, include_dirs, library_dirs): if winbuild: - libraries = ['libhttpd', 'libapr', 'libaprutil', 'ws2_32'] + apr1 = 0 + for dir in library_dirs: + if os.path.exists(os.path.join(dir, 'libapr-1.lib')): + apr1 = 1 + if apr1: + libraries = ['libhttpd', 'libapr-1', 'libaprutil-1', 'ws2_32'] + else: + libraries = ['libhttpd', 'libapr', 'libaprutil', 'ws2_32'] else: libraries = ['apr-0', 'aprutil-0'] diff --git a/doc-html/about.html b/doc-html/about.html index 7ca4a4ad0d3187e610fb47a3686898e025421f85..c36c9eb5285053d4e519cfd4de294683aa5b1d0d 100644 --- a/doc-html/about.html +++ b/doc-html/about.html @@ -1,56 +1,55 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="genindex.html"> -<LINK REL="parent" HREF="modpython.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="About this document ..."> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="genindex.html" /> +<link rel="parent" href="modpython.html" /> +<meta name='aesop' content='information' /> <title>About this document ...</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="Index" - href="genindex.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> +<td class='online-navigation'><a rel="prev" title="Index" + href="genindex.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="genindex.html">Index</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> -<br><hr> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION0014000000000000000000"> +<H1><A NAME="SECTION0017000000000000000000"> About this document ...</A> </H1> <strong>Mod_python Manual</strong>, -July 19, 2006, Release 3.2.10 +January 29, 2007, Release 3.3.1 <p> This document was generated using the <a href="http://saftsack.fs.uni-bayreuth.de/~latex2ht/"> <strong>LaTeX</strong>2<tt>HTML</tt></a> translator. @@ -77,37 +76,37 @@ July 19, 2006, Release 3.2.10 </p> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="Index" - rel="prev" title="Index" - href="genindex.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> +<td class='online-navigation'><a rel="prev" title="Index" + href="genindex.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="genindex.html">Index</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/app-changes-from-2.x.html b/doc-html/app-changes-from-2.x.html new file mode 100644 index 0000000000000000000000000000000000000000..4b83f797503bbefedfc9163fe569bd1a933b16df --- /dev/null +++ b/doc-html/app-changes-from-2.x.html @@ -0,0 +1,130 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="genindex.html" /> +<link rel="prev" href="app-changes-from-3.1.4.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="genindex.html" /> +<meta name='aesop' content='information' /> +<title>E. Changes from Previous Major Version (2.x)</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="D. Changes from Version" + href="app-changes-from-3.1.4.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="Index" + href="genindex.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="app-changes-from-3.1.4.html">D. Changes from Version</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="genindex.html">Index</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION0015000000000000000000"></A><A NAME="app-changes-from-2.x"></A> +<BR> +E. Changes from Previous Major Version (2.x) +</H1> + +<P> +<a id='l2h-301' xml:id='l2h-301'></a> +<P> + +<UL> +<LI>Mod_python 3.0 no longer works with Apache 1.3, only Apache 2.x is + supported. +</LI> +<LI>Mod_python no longer works with Python versions less than 2.2.1 +</LI> +<LI>Mod_python now supports Apache filters. +</LI> +<LI>Mod_python now supports Apache connection handlers. +</LI> +<LI>Request object supports internal_redirect(). +</LI> +<LI>Connection object has read(), readline() and write(). +</LI> +<LI>Server object has get_config(). +</LI> +<LI><a id='l2h-302' xml:id='l2h-302'></a> + Httpdapi handler has been deprecated. +</LI> +<LI><a id='l2h-303' xml:id='l2h-303'></a> + Zpublisher handler has been deprecated. +</LI> +<LI>Username is now in req.user instead of req.connection.user + +</LI> +</UL> + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="D. Changes from Version" + href="app-changes-from-3.1.4.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="Index" + href="genindex.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="app-changes-from-3.1.4.html">D. Changes from Version</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="genindex.html">Index</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/node100.html b/doc-html/app-changes-from-3.1.4.html similarity index 62% rename from doc-html/node100.html rename to doc-html/app-changes-from-3.1.4.html index ace98f5327ce4af68aa11109fbf86b77fa0d043b..1667d7640cf35be183e8f3f15032aaafd3508096 100644 --- a/doc-html/node100.html +++ b/doc-html/app-changes-from-3.1.4.html @@ -1,63 +1,62 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="app-changes.html"> -<LINK REL="prev" HREF="node99.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="app-changes.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="C. Changes from Version (3.1.4)"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>C. Changes from Version (3.1.4)</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="app-changes-from-2.x.html" /> +<link rel="prev" href="app-changes-from-3.2.7.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="app-changes-from-2.x.html" /> +<meta name='aesop' content='information' /> +<title>D. Changes from Version (3.1.4)</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="B. Changes from Version" - HREF="node99.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="D. Changes from Previous" - href="app-changes.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="C. Changes from Version" + href="app-changes-from-3.2.7.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="E. Changes from Previous" + href="app-changes-from-2.x.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="node99.html">B. Changes from Version</A> +<a class="sectref" rel="prev" href="app-changes-from-3.2.7.html">C. Changes from Version</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="app-changes.html">D. Changes from Previous</A> -<br><hr> +<a class="sectref" rel="next" href="app-changes-from-2.x.html">E. Changes from Previous</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION0011000000000000000000"> </A> +<H1><A NAME="SECTION0014000000000000000000"></A><A NAME="app-changes-from-3.1.4"></A> <BR> -C. Changes from Version (3.1.4) +D. Changes from Version (3.1.4) </H1> <P> -<a name="l2h-276"> </a> +<a id='l2h-300' xml:id='l2h-300'></a> <P> New Features @@ -208,41 +207,40 @@ Bug Fixes <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="B. Changes from Version" - rel="prev" title="B. Changes from Version" - HREF="node99.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="D. Changes from Previous" - rel="next" title="D. Changes from Previous" - href="app-changes.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="C. Changes from Version" + href="app-changes-from-3.2.7.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="E. Changes from Previous" + href="app-changes-from-2.x.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="node99.html">B. Changes from Version</A> +<a class="sectref" rel="prev" href="app-changes-from-3.2.7.html">C. Changes from Version</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="app-changes.html">D. Changes from Previous</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="app-changes-from-2.x.html">E. Changes from Previous</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/app-changes-from-3.2.10.html b/doc-html/app-changes-from-3.2.10.html new file mode 100644 index 0000000000000000000000000000000000000000..b1e2141ad856c2b603c11b8fa8361eb8921bc488 --- /dev/null +++ b/doc-html/app-changes-from-3.2.10.html @@ -0,0 +1,797 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="app-changes.html" /> +<link rel="prev" href="security.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="app-changes.html" /> +<meta name='aesop' content='information' /> +<title>A. Changes from Version (3.2.10)</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="8. Security" + href="security.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="B. Changes from Version" + href="app-changes.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="security.html">8. Security</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="app-changes.html">B. Changes from Version</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION0011000000000000000000"></A><A NAME="app-changes-from-3.2.10"></A> +<BR> +A. Changes from Version (3.2.10) +</H1> + +<P> +<a id='l2h-297' xml:id='l2h-297'></a> +<P> +New Features + +<P> + +<UL> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-103" + title="MODPYTHON-103" + >MODPYTHON-103</a></em>) + New <code>req.add_output_filter()</code>, <code>req.add_input_filter()</code>, + <code>req.register_output_fiter()</code>, <code>req.register_input_filter()</code> + methods. These allows the dynamic registration of filters and the + attaching of filters to the current request. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-104" + title="MODPYTHON-104" + >MODPYTHON-104</a></em>) + Support added for using Python in content being passed through "INCLUDES" + output filter, or as more commonly referred to server side include (SSI) + mechanism. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-108" + title="MODPYTHON-108" + >MODPYTHON-108</a></em>) + Added support to cookies for <code>httponly</code> attribute, an extension + originally created by Microsoft, but now getting more widespread use + in the battle against cross site-scripting attacks. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-118" + title="MODPYTHON-118" + >MODPYTHON-118</a></em>) + Now possible using the <code>PythonImport</code> directive to specify the name + of a function contained in the module to be called once the designated + module has been imported. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-124" + title="MODPYTHON-124" + >MODPYTHON-124</a></em>) + New <code>req.auth_name()</code> and <code>req.auth_type()</code> methods. + These return the values associated with the AuthName and AuthType + directives respectively. The <code>req.ap_auth_type</code> has now also + been made writable so that it can be set by an authentication + handler. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-130" + title="MODPYTHON-130" + >MODPYTHON-130</a></em>) + Added <code>req.set_etag()</code>, <code>req.set_last_modified()</code> and + <code>req.update_mtime()</code> functions as wrappers for similar functions + provided by Apache C API. These are required to effectively use the + <code>req.meets_condition()</code> function. The documentation for + <code>req.meets_condition()</code> has also been updated as what it + previously described probably wouldn't actually work. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-132" + title="MODPYTHON-132" + >MODPYTHON-132</a></em>) + New <code>req.construct_url()</code> method. Used to construct a fully + qualified URI string incorporating correct scheme, server and port. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-144" + title="MODPYTHON-144" + >MODPYTHON-144</a></em>) + The "<tt class="samp">apache.interpreter</tt>" and "<tt class="samp">apache.main_server</tt>" attributes + have been made publically available. These were previously private and + not part of the public API. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-149" + title="MODPYTHON-149" + >MODPYTHON-149</a></em>) + Added support for session objects that span domains. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-153" + title="MODPYTHON-153" + >MODPYTHON-153</a></em>) + Added <code>req.discard_request_body()</code> function as wrapper for + similar function provided by Apache C API. The function tests for + and reads any message body in the request, simply discarding + whatever it receives. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-164" + title="MODPYTHON-164" + >MODPYTHON-164</a></em>) + The <code>req.add_handler()</code>, <code>req.register_input_filter()</code> and + <code>req.register_output_filter()</code> methods can now take a direct + reference to a callable object as well a string which refers to a + module or module::function combination by name. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-165" + title="MODPYTHON-165" + >MODPYTHON-165</a></em>) + Exported functions from mod_python module to be used in other third + party modules for Apache. The purpose of these functions is to allow + those other modules to access the mechanics of how mod_python creates + interpreters, thereby allowing other modules to also embed Python + and for there not to be a conflict with mod_python. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-170" + title="MODPYTHON-170" + >MODPYTHON-170</a></em>) + Added <code>req._request_rec</code>, <code>server._server_rec</code> and + <code>conn._conn_rec</code> semi private members for getting accessing to + underlying Apache struct as a Python CObject. These can be used for + use in implementing SWIG bindings for lower level APIs of Apache. + These members should be regarded as experimental and there are no + guarantees that they will remain present in this specific form in the + future. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-193" + title="MODPYTHON-193" + >MODPYTHON-193</a></em>) + Added new attribute available as <code>req.hlist.location</code>. For a + handler executed directly as the result of a handler directive + within a <code>Location</code> directive, this will be set to the value + of the <code>Location</code> directive. If <code>LocationMatch</code>, or + wildcards or regular expressions are used with <code>Location</code>, + the value will be the matched value in the URL and not the pattern. + +</LI> +</UL> + +<P> +Improvements + +<P> + +<UL> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-27" + title="MODPYTHON-27" + >MODPYTHON-27</a></em>) + When using mod_python.publisher, the <code>__auth__()</code> and + <code>__access__()</code> functions and the <code>__auth_realm__</code> string + can now be nested within a class method as a well a normal function. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-90" + title="MODPYTHON-90" + >MODPYTHON-90</a></em>) + The <code>PythonEnablePdb</code> configuration option will now be ignored + if Apache hasn't been started up in single process mode. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-91" + title="MODPYTHON-91" + >MODPYTHON-91</a></em>) + If running Apache in single process mode with PDB enabled and the + "quit" command is used to exit that debug session, an exception + indicating that the PDB session has been aborted is raised rather + than <code>None</code> being returned with a subsequent error complaining + about the handler returning an invalid value. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-93" + title="MODPYTHON-93" + >MODPYTHON-93</a></em>) + Improved <code>util.FieldStorage</code> efficiency and made the interface + more dictionary like. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-101" + title="MODPYTHON-101" + >MODPYTHON-101</a></em>) + Force an exception when handler evaluates to something other than + <code>None</code> but is otherwise not callable. Previously an exception + would not be generated if the handler evaluated to <code>False</code>. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-107" + title="MODPYTHON-107" + >MODPYTHON-107</a></em>) + Neither mod_python.publisher nor mod_python.psp explicitly flush + output after writing the content of the response back to the request + object. By not flushing output it is now possible to use the + "CONTENT_LENGTH" output filter to add a "Content-Length" header. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-111" + title="MODPYTHON-111" + >MODPYTHON-111</a></em>) + Note made in session documentation that a save is required to avoid + session timeouts. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-125" + title="MODPYTHON-125" + >MODPYTHON-125</a></em>) + The <code>req.handler</code> attribute is now writable. This allows a handler + executing in a phase prior to the response phase to specify which + Apache module will be responsible for generating the content. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-128" + title="MODPYTHON-128" + >MODPYTHON-128</a></em>) + Made the <code>req.canonical_filename</code> attribute writable. Changed + the <code>req.finfo</code> attribute from being a tuple to an actual object. + For backwards compatibility the attributes of the object can still be + accessed as if they were a tuple. New code however should access + the attributes as member data. The <code>req.finfo</code> attribute is + also now writable and can be assigned to using the result of calling + the new function <code>apache.stat()</code>. This function is a wrapper + for <code>apr_stat()</code>. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-129" + title="MODPYTHON-129" + >MODPYTHON-129</a></em>) + When specifying multiple handlers for a phase, the status returned by + each handler is now treated the same as how Apache would treat the + status if the handler was registered using the low level C API. What + this means is that whereas stacked handlers of any phase would in + turn previously be executed as long as they returned <code>apache.OK</code>, + this is no longer the case and what happens is dependent on the + phase. Specifically, a handler returning <code>apache.DECLINED</code> no + longer causes the execution of subsequent handlers for the phase to + be skipped. Instead, it will move to the next of the stacked + handlers. In the case of <code>PythonTransHandler</code>, + <code>PythonAuthenHandler</code>, <code>PythonAuthzHandler</code> and + <code>PythonTypeHandler</code>, as soon as <code>apache.OK</code> is returned, + subsequent handlers for the phase will be skipped, as the result + indicates that any processing pertinent to that phase has been + completed. For other phases, stacked handlers will continue to be + executed if <code>apache.OK</code> is returned as well as when + <code>apache.DECLINED</code> is returned. This new interpretation of the + status returned also applies to stacked content handlers listed + against the <code>PythonHandler</code> directive even though Apache + notionally only ever calls at most one content handler. Where all + stacked content handlers in that phase run, the status returned from + the last handler becomes the overall status from the content phase. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-141" + title="MODPYTHON-141" + >MODPYTHON-141</a></em>) + The <code>req.proxyreq</code> and <code>req.uri</code> attributes are now writable. + This allows a handler to setup these values and trigger proxying of the + current request to a remote server. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-142" + title="MODPYTHON-142" + >MODPYTHON-142</a></em>) + The <code>req.no_cache</code> and <code>req.no_local_copy</code> attributes are + now writable. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-143" + title="MODPYTHON-143" + >MODPYTHON-143</a></em>) + Completely reimplemented the module importer. This is now used + whenever modules are imported corresponding to any of the + <code>Python*Handler</code>, <code>Python*Filter</code> and <code>PythonImport</code> + directives. The module importer is still able to be used directly + using the <code>apache.import_module()</code> function. The new module + importer no longer supports automatic reloading of packages/modules + that appear on the standard Python module search path as defined by + the <code>PythonPath</code> directive or within an application by direct + changes to <code>sys.path</code>. Automatic module reloading is however + still performed on file based modules (not packages) which are + located within the document tree where handlers are located. + Locations within the document tree are however no longer added to the + standard Python module search path automatically as they are + maintained within a distinct importer search path. The + <code>PythonPath</code> directive MUST not be used to point at directories + within the document tree. To have additional directories be searched + by the module importer, they should be listed in the + <code>mod_python.importer.path</code> option using the <code>PythonOption</code> + directive. This is a path similar to how <code>PythonPath</code> argument + is supplied, but MUST not reference <code>sys.path</code> nor contain any + directories also listed in the standard Python module search path. + If an application does not appear to work under the module importer, + the old module importer can be reenabled by setting the + <code>mod_python.legacy.importer</code> option using the <code>PythonOption</code> + directive to the value '<code>*</code>'. This option must be set in the + global Apache configuration. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-152" + title="MODPYTHON-152" + >MODPYTHON-152</a></em>) + When in a sub request, when a request is the result of an internal + redirect, or when when returning from such a request, the + <code>req.main</code>, <code>req.prev</code> and <code>req.next</code> members now + correctly return a reference to the original Python request object + wrapper first created for the specific <code>request_rec</code> instance + rather than creating a new distinct Python request object. This means + that any data added explicitly to a request object can be passed + between such requests. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-178" + title="MODPYTHON-178" + >MODPYTHON-178</a></em>) + When using mod_python.psp, if the PSP file which is the target of the + request doesn't actually exist, an <code>apache.HTTP_NOT_FOUND</code> server + error is now returned to the client rather than raising a + <code>ValueError</code> exception which results in a 500 internal server error. + Note that if using <code>SetHandler</code> and the request is against the + directory and no <code>DirectoryIndex</code> directive is specified which + lists a valid PSP index file, then the same <code>apache.HTTP_NOT_FOUND</code> + server error is returned to the client. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-196" + title="MODPYTHON-196" + >MODPYTHON-196</a></em>) + For completeness, added <code>req.server.log_error()</code> and + <code>req.connection.log_error()</code>. The latter wraps + <code>ap_log_cerror()</code> (when available), allowing client information + to be logged along with message from a connection handler. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-206" + title="MODPYTHON-206" + >MODPYTHON-206</a></em>) + The attribute <code>req.used_path_info</code> is now modifiable and can + be set from within handlers. This is equivalent to having used the + <code>AcceptPathInfo</code> directive. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-207" + title="MODPYTHON-207" + >MODPYTHON-207</a></em>) + The attribute <code>req.args</code> is now modifiable and can be set from + within handlers. + +</LI> +</UL> + +<P> +Bug Fixes + +<P> + +<UL> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-38" + title="MODPYTHON-38" + >MODPYTHON-38</a></em>) + Fixed issue when using PSP pages in conjunction with publisher handler + or where a PSP error page was being triggered, that form parameters + coming from content of a POST request weren't available or only available + using a workaround. Specifically, the PSP page will now use any + <code>FieldStorage</code> object instance cached as <code>req.form</code> left + there by preceding code. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-43" + title="MODPYTHON-43" + >MODPYTHON-43</a></em>) + Nested <code>__auth__()</code> functions in mod_python.publisher now execute + in context of globals from the file the function is in and not that + of mod_python.publisher itself. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-47" + title="MODPYTHON-47" + >MODPYTHON-47</a></em>) + Fixed mod_python.publisher so it will not return a HTTP Bad Request + response when mod_auth is being used to provide Digest authentication. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-63" + title="MODPYTHON-63" + >MODPYTHON-63</a></em>) + When handler directives are used within <code>Directory</code> or + <code>DirectoryMatch</code> directives where wildcards or regular + expressions are used, the handler directory will be set to the + shortest directory matched by the directory pattern. Handler + directives can now also be used within <code>Files</code> and + <code>FilesMatch</code> directives and the handler directory will correctly + resolve to the directory corresponding to the enclosing + <code>Directory</code> or <code>DirectoryMatch</code> directive, or the directory + the <code>.htaccess</code> file is contained in. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-76" + title="MODPYTHON-76" + >MODPYTHON-76</a></em>) + The <code>FilterDispatch</code> callback should not flush the filter if it + has already been closed. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-84" + title="MODPYTHON-84" + >MODPYTHON-84</a></em>) + The original change to fix the symlink issue for <code>req.sendfile()</code> + was causing problems on Win32, plus code needed to be changed to work + with APR 1.2.7. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-100" + title="MODPYTHON-100" + >MODPYTHON-100</a></em>) + When using stacked handlers and a <code>SERVER_RETURN</code> exception was + used to return an <code>OK</code> status for that handler, any following + handlers weren't being run if appropriate for the phase. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-109" + title="MODPYTHON-109" + >MODPYTHON-109</a></em>) + The <code>Py_Finalize()</code> function was being called on child process + shutdown. This was being done though from within the context of a + signal handler, which is generally unsafe and would cause the process + to lock up. This function is no longer called on child process shutdown. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-112" + title="MODPYTHON-112" + >MODPYTHON-112</a></em>) + The <code>req.phase</code> attribute is no longer overwritten by an input + or output filter. The <code>filter.is_input</code> member should be used + to determine if a filter is an input or output filter. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-113" + title="MODPYTHON-113" + >MODPYTHON-113</a></em>) + The <code>PythonImport</code> directive now uses the + <code>apache.import_module()</code> function to import modules to avoid + reloading problems when same module is imported from a handler. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-114" + title="MODPYTHON-114" + >MODPYTHON-114</a></em>) + Fixed race conditions on setting <code>sys.path</code> when the + <code>PythonPath</code> directive is being used as well as problems with + infinite extension of path. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-120" + title="MODPYTHON-120" + >MODPYTHON-120</a></em>) + (<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-121" + title="MODPYTHON-121" + >MODPYTHON-121</a></em>) + Fixes to test suite so it will work on virtual hosting environments + where <code>localhost</code> doesn't resolve to <code>127.0.0.1</code> but the + actual IP address of the host. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-126" + title="MODPYTHON-126" + >MODPYTHON-126</a></em>) + When <code>Python*Handler</code> or <code>Python*Filter</code> directive is used + inside of a <code>Files</code> directive container, the handler/filter + directory value will now correctly resolve to the directory corresponding + to any parent <code>Directory</code> directive or the location of the + <code>.htaccess</code> file the <code>Files</code> directive is contained in. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-133" + title="MODPYTHON-133" + >MODPYTHON-133</a></em>) + The table object returned by <code>req.server.get_config()</code> was not + being populated correctly to be the state of directives set at global + scope for the server. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-134" + title="MODPYTHON-134" + >MODPYTHON-134</a></em>) + Setting <code>PythonDebug</code> to <code>Off</code>, wasn't overriding <code>On</code> + setting in parent scope. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-140" + title="MODPYTHON-140" + >MODPYTHON-140</a></em>) + The <code>util.redirect()</code> function should be returning server status of + <code>apache.DONE</code> and not <code>apache.OK</code> otherwise it will not give + desired result if used in non content handler phase or where there are + stacked content handlers. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-147" + title="MODPYTHON-147" + >MODPYTHON-147</a></em>) + Stopped directories being added to <code>sys.path</code> multiple times when + <code>PythonImport</code> and <code>PythonPath</code> directive used. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-148" + title="MODPYTHON-148" + >MODPYTHON-148</a></em>) + Added missing Apache contants <code>apache.PROXYREQ_RESPONSE</code> and + <code>apache.HTTP_UPGRADE_REQUIRED</code>. Also added new constants for + Apache magic mime types and values for interpreting the + <code>req.connection.keepalive</code> and <code>req.read_body</code> members. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-150" + title="MODPYTHON-150" + >MODPYTHON-150</a></em>) + In a multithread MPM, the <code>apache.init()</code> function could be called + more than once for a specific interpreter instance whereas it should + only be called once. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-151" + title="MODPYTHON-151" + >MODPYTHON-151</a></em>) + Debug error page returned to client when an exception in a handler + occurred wasn't escaping special HTML characters in the traceback or + the details of the exception. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-157" + title="MODPYTHON-157" + >MODPYTHON-157</a></em>) + Wrong interpreter name used for fixup handler phase and earlier, when + <code>PythonInterpPerDirectory</code> was enabled and request was against + a directory but client didn't provide the trailing slash. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-159" + title="MODPYTHON-159" + >MODPYTHON-159</a></em>) + Fix <code>FieldStorage</code> class so that it can handle multiline headers. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-160" + title="MODPYTHON-160" + >MODPYTHON-160</a></em>) + Using <code>PythonInterpPerDirective</code> when setting content handler to + run dynamically with <code>req.add_handler()</code> would cause Apache to + crash. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-161" + title="MODPYTHON-161" + >MODPYTHON-161</a></em>) + Directory argument supplied to <code>req.add_handler()</code> is + canonicalized and a trailing slash added automatically. This is + needed to ensure that the directory is always in POSIX path style as + used by Apache and that convention where directories associated with + directives always have trailing slash is adhered to. If this is not + done, a different interpreter can be chosen to that expected when the + <code>PythonInterpPerDirective</code> is used. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-166" + title="MODPYTHON-166" + >MODPYTHON-166</a></em>) + <code>PythonHandlerModule</code> was not setting up registration of the + <code>PythonFixupHandler</code> or <code>PythonAuthenHandler</code>. For the + latter this meant that using <code>Require</code> directive with + <code>PythonHandlerModule</code> would cause a 500 error and complaint in + error log about "No groups file". +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-167" + title="MODPYTHON-167" + >MODPYTHON-167</a></em>) + When <code>PythonDebug</code> was <code>On</code> and and exception occurred, the + response to the client had a status of <code>200</code> when it really should + have been a <code>500</code> error status indicating that an internal error + occurred. A <code>500</code> error status was correctly being returned when + <code>PythonDebug</code> was <code>Off</code>. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-168" + title="MODPYTHON-168" + >MODPYTHON-168</a></em>) + Fixed psp_parser error when CR is used as a line terminator in psp code. + This may occur with some older editors such as GoLive on Mac OS X. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-175" + title="MODPYTHON-175" + >MODPYTHON-175</a></em>) + Fixed problem whereby a main PSP page and an error page triggered from + that page both accessing the session object would cause a deadlock. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-176" + title="MODPYTHON-176" + >MODPYTHON-176</a></em>) + Fixed issue whereby PSP code would unlock session object which it had + inherited from the caller meaning caller could no longer use it safely. + PSP code will now only unlock session if it created it in the first + place. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-179" + title="MODPYTHON-179" + >MODPYTHON-179</a></em>) + Fixed the behaviour of req.readlines() when a size hint was provided. Previously, + it would always return a single line when a size hint was provided. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-180" + title="MODPYTHON-180" + >MODPYTHON-180</a></em>) + Publisher would wrongly output a warning about nothing to publish if + <code>req.write()</code> or <code>req.sendfile()</code> used and data not flushed, + and then published function returned <code>None</code>. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-181" + title="MODPYTHON-181" + >MODPYTHON-181</a></em>) + Fixed memory leak when mod_python handlers are defined for more than + one phase at the same time. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-182" + title="MODPYTHON-182" + >MODPYTHON-182</a></em>) + Fixed memory leak in req.readline(). +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-184" + title="MODPYTHON-184" + >MODPYTHON-184</a></em>) + Fix memory leak in <code>apache.make_table()</code>. This was used by + <code>util.FieldStorage</code> class so affected all code using forms. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-185" + title="MODPYTHON-185" + >MODPYTHON-185</a></em>) + Fixed segfault in psp.parsestring(src_string) when src_string is empty. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-187" + title="MODPYTHON-187" + >MODPYTHON-187</a></em>) + Table objects could crash in various ways when the value of an item + was NULL. This could occur for <code>SCRIPT_FILENAME</code> when the + <code>req.subprocess_env</code> table was accessed in the post read request + handler phase. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-189" + title="MODPYTHON-189" + >MODPYTHON-189</a></em>) + Fixed representation returned by calling <code>repr()</code> on a table object. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-191" + title="MODPYTHON-191" + >MODPYTHON-191</a></em>) + Session class will no longer accept a normal cookie if a signed cookie + was expected. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-194" + title="MODPYTHON-194" + >MODPYTHON-194</a></em>) + Fixed potential memory leak due to not clearing the state of thread state + objects before deleting them. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-195" + title="MODPYTHON-195" + >MODPYTHON-195</a></em>) + Fix potential Win32 resource leaks in parent Apache process when process + restarts occur. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-198" + title="MODPYTHON-198" + >MODPYTHON-198</a></em>) + Python 2.5 broke nested __auth__/__access__/__auth_realm__ in + mod_python.publisher. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-200" + title="MODPYTHON-200" + >MODPYTHON-200</a></em>) + Fixed problem whereby signed and marshalled cookies could not be used + at the same time. When expecting marshalled cookie, any signed, but + not marshalled cookies will be returned as normal cookies. + +</LI> +</UL> + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="8. Security" + href="security.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="B. Changes from Version" + href="app-changes.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="security.html">8. Security</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="app-changes.html">B. Changes from Version</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/app-changes-from-3.2.7.html b/doc-html/app-changes-from-3.2.7.html new file mode 100644 index 0000000000000000000000000000000000000000..1b6e3fc122641f3963644f2cc85eb38dcf8deca4 --- /dev/null +++ b/doc-html/app-changes-from-3.2.7.html @@ -0,0 +1,119 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="app-changes-from-3.1.4.html" /> +<link rel="prev" href="app-changes.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="app-changes-from-3.1.4.html" /> +<meta name='aesop' content='information' /> +<title>C. Changes from Version (3.2.7)</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="B. Changes from Version" + href="app-changes.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="D. Changes from Version" + href="app-changes-from-3.1.4.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="app-changes.html">B. Changes from Version</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="app-changes-from-3.1.4.html">D. Changes from Version</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION0013000000000000000000"></A><A NAME="app-changes-from-3.2.7"></A> +<BR> +C. Changes from Version (3.2.7) +</H1> + +<P> +<a id='l2h-299' xml:id='l2h-299'></a> +<P> +Security Fix + +<P> + +<UL> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-135" + title="MODPYTHON-135" + >MODPYTHON-135</a></em>) + Fixed possible directory traversal attack in FileSession. The session + id is now checked to ensure it only contains valid characters. This + check is performed for all sessions derived from the BaseSession + class. + +</LI> +</UL> + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="B. Changes from Version" + href="app-changes.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="D. Changes from Version" + href="app-changes-from-3.1.4.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="app-changes.html">B. Changes from Version</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="app-changes-from-3.1.4.html">D. Changes from Version</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/app-changes.html b/doc-html/app-changes.html index 3f153f71a881fbb2a028798e63aa5e897d8e6e1c..18d3b2dbe7fa76030edb0a8987aa9abfeadf98d9 100644 --- a/doc-html/app-changes.html +++ b/doc-html/app-changes.html @@ -1,130 +1,214 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="genindex.html"> -<LINK REL="prev" HREF="node100.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="genindex.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="D. Changes from Previous Major Version (2.x)"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>D. Changes from Previous Major Version (2.x)</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="app-changes-from-3.2.7.html" /> +<link rel="prev" href="app-changes-from-3.2.10.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="app-changes-from-3.2.7.html" /> +<meta name='aesop' content='information' /> +<title>B. Changes from Version (3.2.8)</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="C. Changes from Version" - HREF="node100.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="Index" - href="genindex.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="A. Changes from Version" + href="app-changes-from-3.2.10.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="C. Changes from Version" + href="app-changes-from-3.2.7.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="node100.html">C. Changes from Version</A> +<a class="sectref" rel="prev" href="app-changes-from-3.2.10.html">A. Changes from Version</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="genindex.html">Index</A> -<br><hr> +<a class="sectref" rel="next" href="app-changes-from-3.2.7.html">C. Changes from Version</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION0012000000000000000000"> </A> +<H1><A NAME="SECTION0012000000000000000000"></A><A NAME="app-changes"></A> <BR> -D. Changes from Previous Major Version (2.x) +B. Changes from Version (3.2.8) </H1> <P> -<a name="l2h-277"> </a> +<a id='l2h-298' xml:id='l2h-298'></a> +<P> +New Features + <P> <UL> -<LI>Mod_python 3.0 no longer works with Apache 1.3, only Apache 2.x is - supported. +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-78" + title="MODPYTHON-78" + >MODPYTHON-78</a></em>) + Added support for Apache 2.2. </LI> -<LI>Mod_python no longer works with Python versions less than 2.2.1 +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-94" + title="MODPYTHON-94" + >MODPYTHON-94</a></em>) + New <code>req.is_https()</code> and <code>req.ssl_var_lookup()</code> methods. + These communicate direct with the Apache mod_ssl module, allowing + it to be determined if the connection is using SSL/TLS and what the + values of internal ssl variables are. </LI> -<LI>Mod_python now supports Apache filters. +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-131" + title="MODPYTHON-131" + >MODPYTHON-131</a></em>) + The directory used for mutex locks can now be specified at + at compile time using <code>./configure --with-mutex-dir value</code> + or at run time with <code>PythonOption mod_python.mutex_directory value</code>. </LI> -<LI>Mod_python now supports Apache connection handlers. +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-137" + title="MODPYTHON-137" + >MODPYTHON-137</a></em>) + New <code>req.server.get_options()</code> method. This returns the subset + of Python options set at global scope within the Apache configuration. + That is, outside of the context of any VirtualHost, Location, Directory + or Files directives. </LI> -<LI>Request object supports internal_redirect(). +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-145" + title="MODPYTHON-145" + >MODPYTHON-145</a></em>) + The number of mutex locks can now be specified at run time with + <code>PythonOption mod_python.mutex_locks value</code>. </LI> -<LI>Connection object has read(), readline() and write(). +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-172" + title="MODPYTHON-172" + >MODPYTHON-172</a></em>) + Fixed three memory leaks that were found in _apachemodule.parse_qsl, req.readlines + and util.cfgtree_walk. + </LI> -<LI>Server object has get_config(). +</UL> + +<P> +Improvements + +<P> + +<UL> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-77" + title="MODPYTHON-77" + >MODPYTHON-77</a></em>) + Third party C modules that use the simplified API for the Global + Interpreter Lock (GIL), as described in PEP 311, can now be used. The + only requirement is that such modules can only be used in the context + of the "<tt class="samp">main_interpreter</tt>". </LI> -<LI><a name="l2h-278"> </a> - Httpdapi handler has been deprecated. +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-119" + title="MODPYTHON-119" + >MODPYTHON-119</a></em>) + DbmSession unit test no longer uses the default directory for the dbm file, + so the test will not interfer with the user's current apache instance. </LI> -<LI><a name="l2h-279"> </a> - Zpublisher handler has been deprecated. +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-158" + title="MODPYTHON-158" + >MODPYTHON-158</a></em>) + Added additional debugging and logging output for where mod_python + cannot initialise itself properly due to Python or mod_python version + mismatches or missing Python module code files. + </LI> -<LI>Username is now in req.user instead of req.connection.user +</UL> + +<P> +Bug Fixes + +<P> + +<UL> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-84" + title="MODPYTHON-84" + >MODPYTHON-84</a></em>) + Fixed request.sendfile() bug for symlinked files on Win32. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-122" + title="MODPYTHON-122" + >MODPYTHON-122</a></em>) + Fixed configure problem when using bash 3.1.x. +</LI> +<LI>(<em class="citetitle"><a + href="http://issues.apache.org/jira/browse/MODPYTHON-173" + title="MODPYTHON-173" + >MODPYTHON-173</a></em>) + Fixed DbmSession to create db file with mode 0640. </LI> </UL> <P> - + <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="C. Changes from Version" - rel="prev" title="C. Changes from Version" - HREF="node100.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="Index" - rel="next" title="Index" - href="genindex.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="A. Changes from Version" + href="app-changes-from-3.2.10.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="C. Changes from Version" + href="app-changes-from-3.2.7.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="node100.html">C. Changes from Version</A> +<a class="sectref" rel="prev" href="app-changes-from-3.2.10.html">A. Changes from Version</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="genindex.html">Index</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="app-changes-from-3.2.7.html">C. Changes from Version</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/blank.gif b/doc-html/blank.gif deleted file mode 100644 index 2e31f4ed50ee9a3dc57f62d88392e7928d262c07..0000000000000000000000000000000000000000 Binary files a/doc-html/blank.gif and /dev/null differ diff --git a/doc-html/blank.png b/doc-html/blank.png new file mode 100644 index 0000000000000000000000000000000000000000..2af5639b9ec6f5c74d9bc85d695eb1120a578844 Binary files /dev/null and b/doc-html/blank.png differ diff --git a/doc-html/contents.gif b/doc-html/contents.gif deleted file mode 100644 index 6d299c4c1cb1bb8504d10236a805f877af94002a..0000000000000000000000000000000000000000 Binary files a/doc-html/contents.gif and /dev/null differ diff --git a/doc-html/contents.html b/doc-html/contents.html index 28965a3e8fc1f24629774b4ebf3d5f66b744fae9..678460739ea3939bb18d6fe702b7fe038d58d121 100644 --- a/doc-html/contents.html +++ b/doc-html/contents.html @@ -1,56 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="introduction.html"> -<LINK REL="prev" href="front.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="introduction.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Contents"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="introduction.html" /> +<link rel="prev" href="front.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="introduction.html" /> +<meta name='aesop' content='information' /> <title>Contents</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="Front Matter" - href="front.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="1. Introduction" - href="introduction.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="Front Matter" + href="front.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="1. Introduction" + href="introduction.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="front.html">Front Matter</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="introduction.html">1. Introduction</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<BR> -<BR><H2><A NAME="SECTION002000000000000000000"> +<BR><h2><A NAME="SECTION002000000000000000000"> Contents</A> -</H2> +</h2> <!--Table of Contents--> <UL CLASS="TofC"> @@ -93,11 +93,12 @@ Contents</A> <LI><A href="module-apache.html">4.5 apache - Access to Apache Internals.</a> <UL> <LI><A href="pyapi-apmeth.html">4.5.1 Functions</a> -<LI><A href="pyapi-mptable.html">4.5.2 Table Object (mp_table) </a> -<LI><A href="pyapi-mprequest.html">4.5.3 Request Object </a> -<LI><A href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </a> -<LI><A href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </a> -<LI><A href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </a> +<LI><A href="pyapi-apmem.html">4.5.2 Attributes</a> +<LI><A href="pyapi-mptable.html">4.5.3 Table Object (mp_table)</a> +<LI><A href="pyapi-mprequest.html">4.5.4 Request Object</a> +<LI><A href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</a> +<LI><A href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</a> +<LI><A href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</a> </ul> <LI><A href="pyapi-util.html">4.6 util - Miscellaneous Utilities</a> <UL> @@ -161,58 +162,71 @@ Contents</A> <LI><A href="dir-other-pp.html">5.4.11 PythonPath</a> </ul> </ul> -<LI><A href="handlers.html">6. Standard Handlers</a> +<LI><A href="ssi.html">6. Server Side Includes</a> <UL> -<LI><A href="hand-pub.html">6.1 Publisher Handler</a> +<LI><A href="ssi-overview.html">6.1 Overview of SSI</a> +<LI><A href="ssi-python-code.html">6.2 Using Python Code</a> +<LI><A href="ssi-data-scope.html">6.3 Scope of Global Data</a> +<LI><A href="ssi-globals.html">6.4 Pre-propulating Globals</a> +<LI><A href="ssi-conditionals.html">6.5 Conditional Expressions</a> +<LI><A href="ssi-output-filter.html">6.6 Enabling INCLUDES Filter</a> +</ul> +<LI><A href="handlers.html">7. Standard Handlers</a> +<UL> +<LI><A href="hand-pub.html">7.1 Publisher Handler</a> <UL> -<LI><A href="hand-pub-intro.html">6.1.1 Introduction</a> -<LI><A href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</a> -<LI><A href="node95.html">6.1.3 Form Data</a> +<LI><A href="hand-pub-intro.html">7.1.1 Introduction</a> +<LI><A href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</a> +<LI><A href="node103.html">7.1.3 Form Data</a> </ul> -<LI><A href="hand-psp.html">6.2 PSP Handler</a> -<LI><A href="hand-cgi.html">6.3 CGI Handler</a> +<LI><A href="hand-psp.html">7.2 PSP Handler</a> +<LI><A href="hand-cgi.html">7.3 CGI Handler</a> </ul> -<LI><A href="node98.html">A. Changes from Version (3.2.8)</a> -<LI><A href="node99.html">B. Changes from Version (3.2.7)</a> -<LI><A href="node100.html">C. Changes from Version (3.1.4)</a> -<LI><A href="app-changes.html">D. Changes from Previous Major Version (2.x)</a> +<LI><A href="security.html">8. Security</a> +<LI><A href="app-changes-from-3.2.10.html">A. Changes from Version (3.2.10)</a> +<LI><A href="app-changes.html">B. Changes from Version (3.2.8)</a> +<LI><A href="app-changes-from-3.2.7.html">C. Changes from Version (3.2.7)</a> +<LI><A href="app-changes-from-3.1.4.html">D. Changes from Version (3.1.4)</a> +<LI><A href="app-changes-from-2.x.html">E. Changes from Previous Major Version (2.x)</a> <LI><A href="genindex.html">Index</a> </ul> <!--End of Table of Contents--> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="Front Matter" - rel="prev" title="Front Matter" - href="front.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="1. Introduction" - rel="next" title="1. Introduction" - href="introduction.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="Front Matter" + href="front.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="1. Introduction" + href="introduction.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="front.html">Front Matter</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="introduction.html">1. Introduction</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/contents.png b/doc-html/contents.png new file mode 100644 index 0000000000000000000000000000000000000000..3429be0c1d45d9b1f0816da78621c029f512de1e Binary files /dev/null and b/doc-html/contents.png differ diff --git a/doc-html/dir-conn-ch.html b/doc-html/dir-conn-ch.html index f6f8b934a400c893e6b1617811456fde1fd8ce2c..6d563db5176246c0ed00280d7b507d2c8507769e 100644 --- a/doc-html/dir-conn-ch.html +++ b/doc-html/dir-conn-ch.html @@ -1,66 +1,65 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="dir-conn.html"> -<LINK REL="parent" href="dir-conn.html"> -<LINK REL="next" href="dir-other.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonConnectionHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="dir-conn.html" /> +<link rel="parent" href="dir-conn.html" /> +<link rel="next" href="dir-other.html" /> +<meta name='aesop' content='information' /> <title>5.3.1 PythonConnectionHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.3 Connection Handler" - href="dir-conn.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.3 Connection Handler" - href="dir-conn.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4 Other Directives" - href="dir-other.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.3 Connection Handler" + href="dir-conn.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.3 Connection Handler" + href="dir-conn.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4 Other Directives" + href="dir-other.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-conn.html">5.3 Connection Handler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-conn.html">5.3 Connection Handler</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other.html">5.4 Other Directives</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007310000000000000000"> </A> -<a name="l2h-260"> </a> +<H2><A NAME="SECTION007310000000000000000"></A><A NAME="dir-conn-ch"></A> +<a id='l2h-283' xml:id='l2h-283'></a> <BR> 5.3.1 PythonConnectionHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonConnectionHandler handler <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" @@ -83,44 +82,51 @@ the connection object. callable object name. If callable object name is omitted, it will default to "<tt class="samp">connectionhandler</tt>". +<P> +The <var>module</var> can be a full module name (package dot notation is +accepted) or an absolute path to a module code file. The module is loaded +using the mod_python module importer as implemented by the +<code>apache.import_module()</code> function. Reference should be made to the +documentation of that function for further details of how module importing +is managed. + <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.3 Connection Handler" - rel="prev" title="5.3 Connection Handler" - href="dir-conn.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.3 Connection Handler" - rel="parent" title="5.3 Connection Handler" - href="dir-conn.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4 Other Directives" - rel="next" title="5.4 Other Directives" - href="dir-other.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.3 Connection Handler" + href="dir-conn.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.3 Connection Handler" + href="dir-conn.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4 Other Directives" + href="dir-other.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-conn.html">5.3 Connection Handler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-conn.html">5.3 Connection Handler</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other.html">5.4 Other Directives</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-conn.html b/doc-html/dir-conn.html index 0d651e919700aa1d2172d26a2d15f39ff33c47e4..782317d39f338b0769c3196aab3c83ced907d9b9 100644 --- a/doc-html/dir-conn.html +++ b/doc-html/dir-conn.html @@ -1,64 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other.html"> -<LINK REL="prev" href="dir-filter.html"> -<LINK REL="parent" href="directives.html"> -<LINK REL="next" href="dir-conn-ch.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Connection Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other.html" /> +<link rel="prev" href="dir-filter.html" /> +<link rel="parent" href="directives.html" /> +<link rel="next" href="dir-conn-ch.html" /> +<meta name='aesop' content='information' /> <title>5.3 Connection Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.2.2 PythonOutputFilter" - href="dir-filter-of.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5. Apache Configuration Directives" - href="directives.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.3.1 PythonConnectionHandler" - href="dir-conn-ch.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.2.2 PythonOutputFilter" + href="dir-filter-of.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5. Apache Configuration Directives" + href="directives.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.3.1 PythonConnectionHandler" + href="dir-conn-ch.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-filter-of.html">5.2.2 PythonOutputFilter</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-conn-ch.html">5.3.1 PythonConnectionHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION007300000000000000000"> </A> +<H1><A NAME="SECTION007300000000000000000"></A><A NAME="dir-conn"></A> <BR> 5.3 Connection Handler </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -66,43 +66,43 @@ <LI><A href="dir-conn-ch.html">5.3.1 PythonConnectionHandler</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.2.2 PythonOutputFilter" - rel="prev" title="5.2.2 PythonOutputFilter" - href="dir-filter-of.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5. Apache Configuration Directives" - rel="parent" title="5. Apache Configuration Directives" - href="directives.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.3.1 PythonConnectionHandler" - rel="next" title="5.3.1 PythonConnectionHandler" - href="dir-conn-ch.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.2.2 PythonOutputFilter" + href="dir-filter-of.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5. Apache Configuration Directives" + href="directives.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.3.1 PythonConnectionHandler" + href="dir-conn-ch.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-filter-of.html">5.2.2 PythonOutputFilter</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-conn-ch.html">5.3.1 PythonConnectionHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-filter-if.html b/doc-html/dir-filter-if.html index 690d77510a8b29d64c5af5d2412d4ffe950e9b72..6adfe51246dd6e49563b6bd2f0dd97e4aa750ff4 100644 --- a/doc-html/dir-filter-if.html +++ b/doc-html/dir-filter-if.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-filter-of.html"> -<LINK REL="prev" href="dir-filter.html"> -<LINK REL="parent" href="dir-filter.html"> -<LINK REL="next" href="dir-filter-of.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonInputFilter"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-filter-of.html" /> +<link rel="prev" href="dir-filter.html" /> +<link rel="parent" href="dir-filter.html" /> +<link rel="next" href="dir-filter-of.html" /> +<meta name='aesop' content='information' /> <title>5.2.1 PythonInputFilter</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.2 Filters" - href="dir-filter.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.2 Filters" - href="dir-filter.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.2.2 PythonOutputFilter" - href="dir-filter-of.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.2 Filters" + href="dir-filter.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.2 Filters" + href="dir-filter.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.2.2 PythonOutputFilter" + href="dir-filter-of.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-filter.html">5.2 Filters</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-filter.html">5.2 Filters</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-filter-of.html">5.2.2 PythonOutputFilter</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007210000000000000000"> </A> -<a name="l2h-258"> </a> +<H2><A NAME="SECTION007210000000000000000"></A><A NAME="dir-filter-if"></A> +<a id='l2h-281' xml:id='l2h-281'></a> <BR> 5.2.1 PythonInputFilter </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonInputFilter handler name <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" @@ -82,47 +81,54 @@ omitted, it will default to "<tt class="samp">inputfilter</tt>". <var>Name</var> which the filter is registered, by convention filter names are usually in all caps. +<P> +The <var>module</var> referred to by the handler can be a full module name +(package dot notation is accepted) or an actual path to a module code file. +The module is loaded using the mod_python module importer as implemented by +the <code>apache.import_module()</code> function. Reference should be made to the +documentation of that function for further details of how module importing +is managed. + <P> To activate the filter, use the <code>AddInputFilter</code> directive. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.2 Filters" - rel="prev" title="5.2 Filters" - href="dir-filter.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.2 Filters" - rel="parent" title="5.2 Filters" - href="dir-filter.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.2.2 PythonOutputFilter" - rel="next" title="5.2.2 PythonOutputFilter" - href="dir-filter-of.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.2 Filters" + href="dir-filter.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.2 Filters" + href="dir-filter.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.2.2 PythonOutputFilter" + href="dir-filter-of.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-filter.html">5.2 Filters</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-filter.html">5.2 Filters</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-filter-of.html">5.2.2 PythonOutputFilter</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-filter-of.html b/doc-html/dir-filter-of.html index c91bff408cf004ca6ba74c40959023b4571ce0a7..68d8ee3bf89396cbd019290413b30f09037a7492 100644 --- a/doc-html/dir-filter-of.html +++ b/doc-html/dir-filter-of.html @@ -1,66 +1,65 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="dir-filter-if.html"> -<LINK REL="parent" href="dir-filter.html"> -<LINK REL="next" href="dir-conn.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonOutputFilter"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="dir-filter-if.html" /> +<link rel="parent" href="dir-filter.html" /> +<link rel="next" href="dir-conn.html" /> +<meta name='aesop' content='information' /> <title>5.2.2 PythonOutputFilter</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.2.1 PythonInputFilter" - href="dir-filter-if.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.2 Filters" - href="dir-filter.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.3 Connection Handler" - href="dir-conn.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.2.1 PythonInputFilter" + href="dir-filter-if.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.2 Filters" + href="dir-filter.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.3 Connection Handler" + href="dir-conn.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-filter-if.html">5.2.1 PythonInputFilter</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-filter.html">5.2 Filters</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-conn.html">5.3 Connection Handler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007220000000000000000"> </A> -<a name="l2h-259"> </a> +<H2><A NAME="SECTION007220000000000000000"></A><A NAME="dir-filter-of"></A> +<a id='l2h-282' xml:id='l2h-282'></a> <BR> 5.2.2 PythonOutputFilter </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonOutputFilter handler name <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" @@ -81,47 +80,54 @@ omitted, it will default to "<tt class="samp">outputfilter</tt>". <var>Name</var which the filter is registered, by convention filter names are usually in all caps. +<P> +The <var>module</var> referred to by the handler can be a full module name +(package dot notation is accepted) or an actual path to a module code file. +The module is loaded using the mod_python module importer as implemented by +the <code>apache.import_module()</code> function. Reference should be made to the +documentation of that function for further details of how module importing +is managed. + <P> To activate the filter, use the <code>AddOutputFilter</code> directive. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.2.1 PythonInputFilter" - rel="prev" title="5.2.1 PythonInputFilter" - href="dir-filter-if.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.2 Filters" - rel="parent" title="5.2 Filters" - href="dir-filter.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.3 Connection Handler" - rel="next" title="5.3 Connection Handler" - href="dir-conn.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.2.1 PythonInputFilter" + href="dir-filter-if.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.2 Filters" + href="dir-filter.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.3 Connection Handler" + href="dir-conn.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-filter-if.html">5.2.1 PythonInputFilter</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-filter.html">5.2 Filters</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-conn.html">5.3 Connection Handler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-filter.html b/doc-html/dir-filter.html index 3956088d71e146dccab3c84e011e7a6f915ff5bc..19b7ca81b93f73dd5bbdfa8de5d7ab09ae6690bf 100644 --- a/doc-html/dir-filter.html +++ b/doc-html/dir-filter.html @@ -1,64 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-conn.html"> -<LINK REL="prev" href="dir-handlers.html"> -<LINK REL="parent" href="directives.html"> -<LINK REL="next" href="dir-filter-if.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Filters"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-conn.html" /> +<link rel="prev" href="dir-handlers.html" /> +<link rel="parent" href="directives.html" /> +<link rel="next" href="dir-filter-if.html" /> +<meta name='aesop' content='information' /> <title>5.2 Filters</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.13 PythonCleanupHandler" - href="dir-handlers-pch.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5. Apache Configuration Directives" - href="directives.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.2.1 PythonInputFilter" - href="dir-filter-if.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.13 PythonCleanupHandler" + href="dir-handlers-pch.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5. Apache Configuration Directives" + href="directives.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.2.1 PythonInputFilter" + href="dir-filter-if.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-pch.html">5.1.13 PythonCleanupHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-filter-if.html">5.2.1 PythonInputFilter</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION007200000000000000000"> </A> +<H1><A NAME="SECTION007200000000000000000"></A><A NAME="dir-filter"></A> <BR> 5.2 Filters </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -67,43 +67,43 @@ <LI><A href="dir-filter-of.html">5.2.2 PythonOutputFilter</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.13 PythonCleanupHandler" - rel="prev" title="5.1.13 PythonCleanupHandler" - href="dir-handlers-pch.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5. Apache Configuration Directives" - rel="parent" title="5. Apache Configuration Directives" - href="directives.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.2.1 PythonInputFilter" - rel="next" title="5.2.1 PythonInputFilter" - href="dir-filter-if.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.13 PythonCleanupHandler" + href="dir-handlers-pch.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5. Apache Configuration Directives" + href="directives.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.2.1 PythonInputFilter" + href="dir-filter-if.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-pch.html">5.1.13 PythonCleanupHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-filter-if.html">5.2.1 PythonInputFilter</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-ach.html b/doc-html/dir-handlers-ach.html index 261c8be00c1c83db55a8957044f483ac29246e6c..819f06b0d4211605edc09d7b2be700fbca028f68 100644 --- a/doc-html/dir-handlers-ach.html +++ b/doc-html/dir-handlers-ach.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-auh.html"> -<LINK REL="prev" href="dir-handlers-pih.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-auh.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonAccessHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-auh.html" /> +<link rel="prev" href="dir-handlers-pih.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-auh.html" /> +<meta name='aesop' content='information' /> <title>5.1.6 PythonAccessHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.5 PythonInitHandler" - href="dir-handlers-pih.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.7 PythonAuthenHandler" - href="dir-handlers-auh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.5 PythonInitHandler" + href="dir-handlers-pih.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.7 PythonAuthenHandler" + href="dir-handlers-auh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-pih.html">5.1.5 PythonInitHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-auh.html">5.1.7 PythonAuthenHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007160000000000000000"> </A> -<a name="l2h-250"> </a> +<H2><A NAME="SECTION007160000000000000000"></A><A NAME="dir-handlers-ach"></A> +<a id='l2h-273' xml:id='l2h-273'></a> <BR> 5.1.6 PythonAccessHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -83,6 +82,11 @@ mod_python.c This routine is called to check for any module-specific restrictions placed upon the requested resource. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.OK</code> or <code>apache.DECLINED</code>, then +execution of all subsequent handlers for this phase are aborted. + <P> For example, this can be used to restrict access by IP number. To do so, you would return <code>HTTP_FORBIDDEN</code> or some such to indicate @@ -91,41 +95,40 @@ that access is not allowed. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.5 PythonInitHandler" - rel="prev" title="5.1.5 PythonInitHandler" - href="dir-handlers-pih.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.7 PythonAuthenHandler" - rel="next" title="5.1.7 PythonAuthenHandler" - href="dir-handlers-auh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.5 PythonInitHandler" + href="dir-handlers-pih.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.7 PythonAuthenHandler" + href="dir-handlers-auh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-pih.html">5.1.5 PythonInitHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-auh.html">5.1.7 PythonAuthenHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-auh.html b/doc-html/dir-handlers-auh.html index 8f98a35f06cd5a27dbe4b6495bd800dcf0fcdad0..d0fb45c585e511f6d1044b1729a43071dfd00869 100644 --- a/doc-html/dir-handlers-auh.html +++ b/doc-html/dir-handlers-auh.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-auzh.html"> -<LINK REL="prev" href="dir-handlers-ach.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-auzh.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonAuthenHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-auzh.html" /> +<link rel="prev" href="dir-handlers-ach.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-auzh.html" /> +<meta name='aesop' content='information' /> <title>5.1.7 PythonAuthenHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.6 PythonAccessHandler" - href="dir-handlers-ach.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.8 PythonAuthzHandler" - href="dir-handlers-auzh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.6 PythonAccessHandler" + href="dir-handlers-ach.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.8 PythonAuthzHandler" + href="dir-handlers-auzh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-ach.html">5.1.6 PythonAccessHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-auzh.html">5.1.8 PythonAuthzHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007170000000000000000"> </A> -<a name="l2h-251"> </a> +<H2><A NAME="SECTION007170000000000000000"></A><A NAME="dir-handlers-auh"></A> +<a id='l2h-274' xml:id='l2h-274'></a> <BR> 5.1.7 PythonAuthenHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -85,6 +84,11 @@ with the request (such as looking up the user in a database and verifying that the [encrypted] password sent matches the one in the database). +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.DECLINED</code>, then execution of all +subsequent handlers for this phase are aborted. + <P> To obtain the username, use <code>req.user</code>. To obtain the password entered by the user, use the <code>req.get_basic_auth_pw()</code> function. @@ -123,41 +127,40 @@ def authenhandler(req): <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.6 PythonAccessHandler" - rel="prev" title="5.1.6 PythonAccessHandler" - href="dir-handlers-ach.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.8 PythonAuthzHandler" - rel="next" title="5.1.8 PythonAuthzHandler" - href="dir-handlers-auzh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.6 PythonAccessHandler" + href="dir-handlers-ach.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.8 PythonAuthzHandler" + href="dir-handlers-auzh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-ach.html">5.1.6 PythonAccessHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-auzh.html">5.1.8 PythonAuthzHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-auzh.html b/doc-html/dir-handlers-auzh.html index 99ab5e25358969d70ace115c85063965923e43be..ba145fe7b06b7f7ca93167eb3c09a713ac81cd96 100644 --- a/doc-html/dir-handlers-auzh.html +++ b/doc-html/dir-handlers-auzh.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-tph.html"> -<LINK REL="prev" href="dir-handlers-auh.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-tph.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonAuthzHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-tph.html" /> +<link rel="prev" href="dir-handlers-auh.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-tph.html" /> +<meta name='aesop' content='information' /> <title>5.1.8 PythonAuthzHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.7 PythonAuthenHandler" - href="dir-handlers-auh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.9 PythonTypeHandler" - href="dir-handlers-tph.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.7 PythonAuthenHandler" + href="dir-handlers-auh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.9 PythonTypeHandler" + href="dir-handlers-tph.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-auh.html">5.1.7 PythonAuthenHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-tph.html">5.1.9 PythonTypeHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007180000000000000000"> </A> -<a name="l2h-252"> </a> +<H2><A NAME="SECTION007180000000000000000"></A><A NAME="dir-handlers-auzh"></A> +<a id='l2h-275' xml:id='l2h-275'></a> <BR> 5.1.8 PythonAuthzHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -84,44 +83,48 @@ This handler runs after AuthenHandler and is intended for checking whether a user is allowed to access a particular resource. But more often than not it is done right in the AuthenHandler. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.DECLINED</code>, then execution of all +subsequent handlers for this phase are aborted. + <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.7 PythonAuthenHandler" - rel="prev" title="5.1.7 PythonAuthenHandler" - href="dir-handlers-auh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.9 PythonTypeHandler" - rel="next" title="5.1.9 PythonTypeHandler" - href="dir-handlers-tph.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.7 PythonAuthenHandler" + href="dir-handlers-auh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.9 PythonTypeHandler" + href="dir-handlers-tph.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-auh.html">5.1.7 PythonAuthenHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-tph.html">5.1.9 PythonTypeHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-fuh.html b/doc-html/dir-handlers-fuh.html index 4a62f53f8fca061b4a732b3da3e1af745ec29731..cb1632487b83ffb09498cec8a412f3d0788bc032 100644 --- a/doc-html/dir-handlers-fuh.html +++ b/doc-html/dir-handlers-fuh.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-ph.html"> -<LINK REL="prev" href="dir-handlers-tph.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-ph.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonFixupHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-ph.html" /> +<link rel="prev" href="dir-handlers-tph.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-ph.html" /> +<meta name='aesop' content='information' /> <title>5.1.10 PythonFixupHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.9 PythonTypeHandler" - href="dir-handlers-tph.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.11 PythonHandler" - href="dir-handlers-ph.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.9 PythonTypeHandler" + href="dir-handlers-tph.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.11 PythonHandler" + href="dir-handlers-ph.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-tph.html">5.1.9 PythonTypeHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-ph.html">5.1.11 PythonHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION0071100000000000000000"> </A> -<a name="l2h-254"> </a> +<H2><A NAME="SECTION0071100000000000000000"></A><A NAME="dir-handlers-fuh"></A> +<a id='l2h-277' xml:id='l2h-277'></a> <BR> 5.1.10 PythonFixupHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -83,44 +82,48 @@ mod_python.c This routine is called to perform any module-specific fixing of header fields, et cetera. It is invoked just before any content-handler. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.OK</code> or <code>apache.DECLINED</code>, then +execution of all subsequent handlers for this phase are aborted. + <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.9 PythonTypeHandler" - rel="prev" title="5.1.9 PythonTypeHandler" - href="dir-handlers-tph.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.11 PythonHandler" - rel="next" title="5.1.11 PythonHandler" - href="dir-handlers-ph.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.9 PythonTypeHandler" + href="dir-handlers-tph.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.11 PythonHandler" + href="dir-handlers-ph.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-tph.html">5.1.9 PythonTypeHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-ph.html">5.1.11 PythonHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-hph.html b/doc-html/dir-handlers-hph.html index 1a9825dc6943c619ba7c23a6c2de405932cd77ef..20561081d500b5f0f8f11e79a7665e6a917a7fac 100644 --- a/doc-html/dir-handlers-hph.html +++ b/doc-html/dir-handlers-hph.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-pih.html"> -<LINK REL="prev" href="dir-handlers-th.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-pih.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonHeaderParserHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-pih.html" /> +<link rel="prev" href="dir-handlers-th.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-pih.html" /> +<meta name='aesop' content='information' /> <title>5.1.4 PythonHeaderParserHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.3 PythonTransHandler" - href="dir-handlers-th.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.5 PythonInitHandler" - href="dir-handlers-pih.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.3 PythonTransHandler" + href="dir-handlers-th.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.5 PythonInitHandler" + href="dir-handlers-pih.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-th.html">5.1.3 PythonTransHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-pih.html">5.1.5 PythonInitHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007140000000000000000"> </A> -<a name="l2h-248"> </a> +<H2><A NAME="SECTION007140000000000000000"></A><A NAME="dir-handlers-hph"></A> +<a id='l2h-271' xml:id='l2h-271'></a> <BR> 5.1.4 PythonHeaderParserHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -84,44 +83,48 @@ This handler is called to give the module a chance to look at the request headers and take any appropriate specific actions early in the processing sequence. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.OK</code> or <code>apache.DECLINED</code>, then +execution of all subsequent handlers for this phase are aborted. + <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.3 PythonTransHandler" - rel="prev" title="5.1.3 PythonTransHandler" - href="dir-handlers-th.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.5 PythonInitHandler" - rel="next" title="5.1.5 PythonInitHandler" - href="dir-handlers-pih.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.3 PythonTransHandler" + href="dir-handlers-th.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.5 PythonInitHandler" + href="dir-handlers-pih.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-th.html">5.1.3 PythonTransHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-pih.html">5.1.5 PythonInitHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-pch.html b/doc-html/dir-handlers-pch.html index 6b5d9afb9e7e23ac3befb4d0204b22e6b0dbb13d..a23dd02eeab065aff6c7bd68c98f4162bddfbe67 100644 --- a/doc-html/dir-handlers-pch.html +++ b/doc-html/dir-handlers-pch.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="dir-handlers-plh.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-filter.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonCleanupHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="dir-handlers-plh.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-filter.html" /> +<meta name='aesop' content='information' /> <title>5.1.13 PythonCleanupHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.12 PythonLogHandler" - href="dir-handlers-plh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.2 Filters" - href="dir-filter.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.12 PythonLogHandler" + href="dir-handlers-plh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.2 Filters" + href="dir-filter.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-plh.html">5.1.12 PythonLogHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-filter.html">5.2 Filters</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION0071130000000000000000"> </A> -<a name="l2h-257"> </a> +<H2><A NAME="SECTION0071130000000000000000"></A><A NAME="dir-handlers-pch"></A> +<a id='l2h-280' xml:id='l2h-280'></a> <BR> 5.1.13 PythonCleanupHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -98,47 +97,46 @@ them. Therefore, <code>req.register_cleanup()</code> has no effect within this handler. <P> -Cleanups registered with this directive will execute <i>after</i> cleanups +Cleanups registered with this directive will execute <em>after</em> cleanups registered with <code>req.register_cleanup()</code>. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.12 PythonLogHandler" - rel="prev" title="5.1.12 PythonLogHandler" - href="dir-handlers-plh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.2 Filters" - rel="next" title="5.2 Filters" - href="dir-filter.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.12 PythonLogHandler" + href="dir-handlers-plh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.2 Filters" + href="dir-filter.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-plh.html">5.1.12 PythonLogHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-filter.html">5.2 Filters</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-ph.html b/doc-html/dir-handlers-ph.html index 722b5ce11dd4bfff4c2ce56e848f86d58e0b237c..564501be8363ec0cf853522d3f737836077c81b5 100644 --- a/doc-html/dir-handlers-ph.html +++ b/doc-html/dir-handlers-ph.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-plh.html"> -<LINK REL="prev" href="dir-handlers-fuh.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-plh.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-plh.html" /> +<link rel="prev" href="dir-handlers-fuh.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-plh.html" /> +<meta name='aesop' content='information' /> <title>5.1.11 PythonHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.10 PythonFixupHandler" - href="dir-handlers-fuh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.12 PythonLogHandler" - href="dir-handlers-plh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.10 PythonFixupHandler" + href="dir-handlers-fuh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.12 PythonLogHandler" + href="dir-handlers-plh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-fuh.html">5.1.10 PythonFixupHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-plh.html">5.1.12 PythonLogHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION0071110000000000000000"> </A> -<a name="l2h-255"> </a> +<H2><A NAME="SECTION0071110000000000000000"></A><A NAME="dir-handlers-ph"></A> +<a id='l2h-278' xml:id='l2h-278'></a> <BR> 5.1.11 PythonHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -83,44 +82,54 @@ mod_python.c This is the main request handler. Many applications will only provide this one handler. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a status value other than <code>apache.OK</code> or +<code>apache.DECLINED</code>, then execution of subsequent handlers for the phase +are skipped and the return status becomes that for the whole content +handler phase. If all handlers are run, the return status of the final +handler is what becomes the return status of the whole content handler +phase. Where that final status is <code>apache.DECLINED</code>, Apache will fall +back to using the <code>default-handler</code> and attempt to serve up the target +as a static file. + <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.10 PythonFixupHandler" - rel="prev" title="5.1.10 PythonFixupHandler" - href="dir-handlers-fuh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.12 PythonLogHandler" - rel="next" title="5.1.12 PythonLogHandler" - href="dir-handlers-plh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.10 PythonFixupHandler" + href="dir-handlers-fuh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.12 PythonLogHandler" + href="dir-handlers-plh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-fuh.html">5.1.10 PythonFixupHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-plh.html">5.1.12 PythonLogHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-pih.html b/doc-html/dir-handlers-pih.html index 5c84f2c79ef6a4ed24c2be8f0b32f56d3ae05e04..5ac862c5a66145b8554d201eb571d9fa8572b51a 100644 --- a/doc-html/dir-handlers-pih.html +++ b/doc-html/dir-handlers-pih.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-ach.html"> -<LINK REL="prev" href="dir-handlers-hph.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-ach.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonInitHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-ach.html" /> +<link rel="prev" href="dir-handlers-hph.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-ach.html" /> +<meta name='aesop' content='information' /> <title>5.1.5 PythonInitHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.4 PythonHeaderParserHandler" - href="dir-handlers-hph.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.6 PythonAccessHandler" - href="dir-handlers-ach.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.4 PythonHeaderParserHandler" + href="dir-handlers-hph.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.6 PythonAccessHandler" + href="dir-handlers-ach.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-hph.html">5.1.4 PythonHeaderParserHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-ach.html">5.1.6 PythonAccessHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007150000000000000000"> </A> -<a name="l2h-249"> </a> +<H2><A NAME="SECTION007150000000000000000"></A><A NAME="dir-handlers-pih"></A> +<a id='l2h-272' xml:id='l2h-272'></a> <BR> 5.1.5 PythonInitHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -84,6 +83,11 @@ This handler is the first handler called in the request processing phases that is allowed both inside and outside <span class="file">.htaccess</span> and directory. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.OK</code> or <code>apache.DECLINED</code>, then +execution of all subsequent handlers for this phase are aborted. + <P> This handler is actually an alias to two different handlers. When specified in the main config file outside any directory tags, it is an @@ -92,46 +96,45 @@ alias to <code>PostReadRequestHandler</code>. When specified inside directory <code>PythonHeaderParserHandler</code>. <P> -<i>(This idea was borrowed from mod_perl)</i> +<em>(This idea was borrowed from mod_perl)</em> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.4 PythonHeaderParserHandler" - rel="prev" title="5.1.4 PythonHeaderParserHandler" - href="dir-handlers-hph.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.6 PythonAccessHandler" - rel="next" title="5.1.6 PythonAccessHandler" - href="dir-handlers-ach.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.4 PythonHeaderParserHandler" + href="dir-handlers-hph.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.6 PythonAccessHandler" + href="dir-handlers-ach.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-hph.html">5.1.4 PythonHeaderParserHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-ach.html">5.1.6 PythonAccessHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-plh.html b/doc-html/dir-handlers-plh.html index 9a99b2bbfac6a8a7957eddaab0def560e39f8dc5..596f47eff653b8cd26bfe386092e48c49932ff8f 100644 --- a/doc-html/dir-handlers-plh.html +++ b/doc-html/dir-handlers-plh.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-pch.html"> -<LINK REL="prev" href="dir-handlers-ph.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-pch.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonLogHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-pch.html" /> +<link rel="prev" href="dir-handlers-ph.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-pch.html" /> +<meta name='aesop' content='information' /> <title>5.1.12 PythonLogHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.11 PythonHandler" - href="dir-handlers-ph.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.13 PythonCleanupHandler" - href="dir-handlers-pch.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.11 PythonHandler" + href="dir-handlers-ph.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.13 PythonCleanupHandler" + href="dir-handlers-pch.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-ph.html">5.1.11 PythonHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-pch.html">5.1.13 PythonCleanupHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION0071120000000000000000"> </A> -<a name="l2h-256"> </a> +<H2><A NAME="SECTION0071120000000000000000"></A><A NAME="dir-handlers-plh"></A> +<a id='l2h-279' xml:id='l2h-279'></a> <BR> 5.1.12 PythonLogHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -81,46 +80,50 @@ mod_python.c <P> This routine is called to perform any module-specific logging -activities. +activities. + +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.OK</code> or <code>apache.DECLINED</code>, then +execution of all subsequent handlers for this phase are aborted. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.11 PythonHandler" - rel="prev" title="5.1.11 PythonHandler" - href="dir-handlers-ph.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.13 PythonCleanupHandler" - rel="next" title="5.1.13 PythonCleanupHandler" - href="dir-handlers-pch.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.11 PythonHandler" + href="dir-handlers-ph.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.13 PythonCleanupHandler" + href="dir-handlers-pch.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-ph.html">5.1.11 PythonHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-pch.html">5.1.13 PythonCleanupHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-prrh.html b/doc-html/dir-handlers-prrh.html index 384dae18de78daa8c13c82fec29df41a64790fd2..559a36028e165efbe11aba635b145109eff08684 100644 --- a/doc-html/dir-handlers-prrh.html +++ b/doc-html/dir-handlers-prrh.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-th.html"> -<LINK REL="prev" href="dir-handlers-syn.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-th.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonPostReadRequestHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-th.html" /> +<link rel="prev" href="dir-handlers-syn.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-th.html" /> +<meta name='aesop' content='information' /> <title>5.1.2 PythonPostReadRequestHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.1 Python*Handler Directive Syntax" - href="dir-handlers-syn.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.3 PythonTransHandler" - href="dir-handlers-th.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.1 Python*Handler Directive Syntax" + href="dir-handlers-syn.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.3 PythonTransHandler" + href="dir-handlers-th.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-syn.html">5.1.1 Python*Handler Directive Syntax</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-th.html">5.1.3 PythonTransHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007120000000000000000"> </A> -<a name="l2h-245"> </a> +<H2><A NAME="SECTION007120000000000000000"></A><A NAME="dir-handlers-prrh"></A> +<a id='l2h-268' xml:id='l2h-268'></a> <BR> 5.1.2 PythonPostReadRequestHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -84,6 +83,11 @@ This handler is called after the request has been read but before any other phases have been processed. This is useful to make decisions based upon the input header fields. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.OK</code> or <code>apache.DECLINED</code>, then +execution of all subsequent handlers for this phase are aborted. + <P> <div class="note"><b class="label">Note:</b> When this phase of the request is processed, the URI has not yet @@ -95,53 +99,52 @@ configuration file, and the code for it will execute in the main interpreter. And because this phase happens before any identification of the type of content being requested is done (i.e. is this a python program or a gif?), the python routine specified with this handler -will be called for <i>ALL</i> requests on this server (not just python +will be called for <em>ALL</em> requests on this server (not just python programs), which is an important consideration if performance is a priority. </div> <P> -<a name="l2h-246"> </a> The handlers below are documented in order in +<a id='l2h-269' xml:id='l2h-269'></a> The handlers below are documented in order in which phases are processed by Apache. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.1 Python*Handler Directive Syntax" - rel="prev" title="5.1.1 Python*Handler Directive Syntax" - href="dir-handlers-syn.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.3 PythonTransHandler" - rel="next" title="5.1.3 PythonTransHandler" - href="dir-handlers-th.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.1 Python*Handler Directive Syntax" + href="dir-handlers-syn.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.3 PythonTransHandler" + href="dir-handlers-th.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-syn.html">5.1.1 Python*Handler Directive Syntax</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-th.html">5.1.3 PythonTransHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-syn.html b/doc-html/dir-handlers-syn.html index ac2973ec503a7498649ce4617ab83df243a21713..3c9f7ec6b2e699f70aacba417b4c842472032d6c 100644 --- a/doc-html/dir-handlers-syn.html +++ b/doc-html/dir-handlers-syn.html @@ -1,58 +1,57 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-prrh.html"> -<LINK REL="prev" href="dir-handlers.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-prrh.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Python*Handler Directive Syntax"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-prrh.html" /> +<link rel="prev" href="dir-handlers.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-prrh.html" /> +<meta name='aesop' content='information' /> <title>5.1.1 Python*Handler Directive Syntax</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.2 PythonPostReadRequestHandler" - href="dir-handlers-prrh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.2 PythonPostReadRequestHandler" + href="dir-handlers-prrh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-prrh.html">5.1.2 PythonPostReadRequestHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007110000000000000000"> </A> -<a name="l2h-244"> </a> +<H2><A NAME="SECTION007110000000000000000"></A><A NAME="dir-handlers-syn"></A> +<a id='l2h-267' xml:id='l2h-267'></a> <BR> 5.1.1 Python*Handler Directive Syntax </H2> @@ -61,7 +60,7 @@ All request handler directives have the following syntax: <P> -<code>Python*Handler <i>handler [handler ...] [ | .ext [.ext ...] ] </i> </code> +<code>Python*Handler <em>handler [handler ...] [ | .ext [.ext ...] ] </em> </code> <P> Where <var>handler</var> is a callable object that accepts a single @@ -72,8 +71,20 @@ Multiple handlers can be specified on a single line, in which case they will be called sequentially, from left to right. Same handler directives can be specified multiple times as well, with the same result - all handlers listed will be executed sequentially, from first -to last. If any handler in the sequence returns a value other than -<code>apache.OK</code>, then execution of all subsequent handlers is aborted. +to last. + +<P> +If any handler in the sequence returns a value other than <code>apache.OK</code> +or <code>apache.DECLINED</code>, then execution of all subsequent handlers for +that phase are aborted. What happens when either <code>apache.OK</code> or +<code>apache.DECLINED</code> is returned is dependent on which phase is +executing. + +<P> +Note that prior to mod_python 3.3, if any handler in the sequence, no +matter which phase was executing, returned a value other than +<code>apache.OK</code>, then execution of all subsequent handlers for that phase +was aborted. <P> The list of handlers can optionally be followed by a <code>|</code> followed @@ -82,17 +93,21 @@ the handler to those file extensions only. This feature only works for handlers executed after the trans phase. <P> -A <i>handler</i> has the following syntax: +A <em>handler</em> has the following syntax: <P> <code>module[::object]</code> <P> Where <var>module</var> can be a full module name (package dot notation is -accepted), and the optional <var>object</var> is the name of an object -inside the module. +accepted) or an actual path to a module code file. The module is loaded +using the mod_python module importer as implemented by the +<code>apache.import_module()</code> function. Reference should be made to +the documentation of that function for further details of how module +importing is managed. <P> +The optional <var>object</var> is the name of an object inside the module. Object can also contain dots, in which case it will be resolved from left to right. During resolution, if mod_python encounters an object of type <code><class></code>, it will try instantiating it passing it a single @@ -127,41 +142,40 @@ from mod_python resulting in a modest performance gain. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1 Request Handlers" - rel="prev" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.2 PythonPostReadRequestHandler" - rel="next" title="5.1.2 PythonPostReadRequestHandler" - href="dir-handlers-prrh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.2 PythonPostReadRequestHandler" + href="dir-handlers-prrh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-prrh.html">5.1.2 PythonPostReadRequestHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-th.html b/doc-html/dir-handlers-th.html index fe13070d02d50b73d32cd3994c97c317114fd4ff..cd74e62e4014f3364c6682fb41f99af37f3fbc7e 100644 --- a/doc-html/dir-handlers-th.html +++ b/doc-html/dir-handlers-th.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-hph.html"> -<LINK REL="prev" href="dir-handlers-prrh.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-hph.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonTransHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-hph.html" /> +<link rel="prev" href="dir-handlers-prrh.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-hph.html" /> +<meta name='aesop' content='information' /> <title>5.1.3 PythonTransHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.2 PythonPostReadRequestHandler" - href="dir-handlers-prrh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.4 PythonHeaderParserHandler" - href="dir-handlers-hph.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.2 PythonPostReadRequestHandler" + href="dir-handlers-prrh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.4 PythonHeaderParserHandler" + href="dir-handlers-hph.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-prrh.html">5.1.2 PythonPostReadRequestHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-hph.html">5.1.4 PythonHeaderParserHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007130000000000000000"> </A> -<a name="l2h-247"> </a> +<H2><A NAME="SECTION007130000000000000000"></A><A NAME="dir-handlers-th"></A> +<a id='l2h-270' xml:id='l2h-270'></a> <BR> 5.1.3 PythonTransHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -84,6 +83,11 @@ This handler gives allows for an opportunity to translate the URI into an actual filename, before the server's default rules (Alias directives and the like) are followed. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.DECLINED</code>, then execution of all +subsequent handlers for this phase are aborted. + <P> <div class="note"><b class="label">Note:</b> At the time when this phase of the request is being processed, the @@ -98,41 +102,40 @@ At the time when this phase of the request is being processed, the <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.2 PythonPostReadRequestHandler" - rel="prev" title="5.1.2 PythonPostReadRequestHandler" - href="dir-handlers-prrh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.4 PythonHeaderParserHandler" - rel="next" title="5.1.4 PythonHeaderParserHandler" - href="dir-handlers-hph.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.2 PythonPostReadRequestHandler" + href="dir-handlers-prrh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.4 PythonHeaderParserHandler" + href="dir-handlers-hph.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-prrh.html">5.1.2 PythonPostReadRequestHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-hph.html">5.1.4 PythonHeaderParserHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers-tph.html b/doc-html/dir-handlers-tph.html index 3397ffbe3c21be2e8917fade5828212d63aa8600..eccd5ddb25421563bcf67f6ab87d3f0722ffc0c0 100644 --- a/doc-html/dir-handlers-tph.html +++ b/doc-html/dir-handlers-tph.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-handlers-fuh.html"> -<LINK REL="prev" href="dir-handlers-auzh.html"> -<LINK REL="parent" href="dir-handlers.html"> -<LINK REL="next" href="dir-handlers-fuh.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonTypeHandler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-handlers-fuh.html" /> +<link rel="prev" href="dir-handlers-auzh.html" /> +<link rel="parent" href="dir-handlers.html" /> +<link rel="next" href="dir-handlers-fuh.html" /> +<meta name='aesop' content='information' /> <title>5.1.9 PythonTypeHandler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.8 PythonAuthzHandler" - href="dir-handlers-auzh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.10 PythonFixupHandler" - href="dir-handlers-fuh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.8 PythonAuthzHandler" + href="dir-handlers-auzh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.10 PythonFixupHandler" + href="dir-handlers-fuh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-auzh.html">5.1.8 PythonAuthzHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-fuh.html">5.1.10 PythonFixupHandler</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007190000000000000000"> </A> -<a name="l2h-253"> </a> +<H2><A NAME="SECTION007190000000000000000"></A><A NAME="dir-handlers-tph"></A> +<a id='l2h-276' xml:id='l2h-276'></a> <BR> 5.1.9 PythonTypeHandler </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -<i>Python*Handler Syntax</i> + >Syntax:</a></em></strong> +<em>Python*Handler Syntax</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -84,44 +83,48 @@ This routine is called to determine and/or set the various document type information bits, like Content-type (via <code>r->content_type</code>), language, et cetera. +<P> +Where multiple handlers are specified, if any handler in the sequence +returns a value other than <code>apache.DECLINED</code>, then execution of all +subsequent handlers for this phase are aborted. + <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.1.8 PythonAuthzHandler" - rel="prev" title="5.1.8 PythonAuthzHandler" - href="dir-handlers-auzh.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.1 Request Handlers" - rel="parent" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.10 PythonFixupHandler" - rel="next" title="5.1.10 PythonFixupHandler" - href="dir-handlers-fuh.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.1.8 PythonAuthzHandler" + href="dir-handlers-auzh.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.10 PythonFixupHandler" + href="dir-handlers-fuh.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-handlers-auzh.html">5.1.8 PythonAuthzHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-handlers.html">5.1 Request Handlers</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-fuh.html">5.1.10 PythonFixupHandler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-handlers.html b/doc-html/dir-handlers.html index 83e574cb42c16c212feb5b80be00d3668ab8bfc4..28564530a76d361e314b0e6734873cee657a1bc2 100644 --- a/doc-html/dir-handlers.html +++ b/doc-html/dir-handlers.html @@ -1,64 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-filter.html"> -<LINK REL="prev" href="directives.html"> -<LINK REL="parent" href="directives.html"> -<LINK REL="next" href="dir-handlers-syn.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Request Handlers"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-filter.html" /> +<link rel="prev" href="directives.html" /> +<link rel="parent" href="directives.html" /> +<link rel="next" href="dir-handlers-syn.html" /> +<meta name='aesop' content='information' /> <title>5.1 Request Handlers</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5. Apache Configuration Directives" - href="directives.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5. Apache Configuration Directives" - href="directives.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.1 Python*Handler Directive Syntax" - href="dir-handlers-syn.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5. Apache Configuration Directives" + href="directives.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5. Apache Configuration Directives" + href="directives.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.1 Python*Handler Directive Syntax" + href="dir-handlers-syn.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-syn.html">5.1.1 Python*Handler Directive Syntax</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION007100000000000000000"> </A> +<H1><A NAME="SECTION007100000000000000000"></A><A NAME="dir-handlers"></A> <BR> 5.1 Request Handlers </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -78,43 +78,43 @@ <LI><A href="dir-handlers-pch.html">5.1.13 PythonCleanupHandler</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5. Apache Configuration Directives" - rel="prev" title="5. Apache Configuration Directives" - href="directives.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5. Apache Configuration Directives" - rel="parent" title="5. Apache Configuration Directives" - href="directives.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1.1 Python*Handler Directive Syntax" - rel="next" title="5.1.1 Python*Handler Directive Syntax" - href="dir-handlers-syn.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5. Apache Configuration Directives" + href="directives.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5. Apache Configuration Directives" + href="directives.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1.1 Python*Handler Directive Syntax" + href="dir-handlers-syn.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers-syn.html">5.1.1 Python*Handler Directive Syntax</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-epd.html b/doc-html/dir-other-epd.html index 9fbe08b6e0bc6d6791688491e64f218d6f2388e4..915f21facd89e854c30a50f58407acbf06cf1a5d 100644 --- a/doc-html/dir-other-epd.html +++ b/doc-html/dir-other-epd.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-pd.html"> -<LINK REL="prev" href="dir-other.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-pd.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonEnablePdb"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-pd.html" /> +<link rel="prev" href="dir-other.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-pd.html" /> +<meta name='aesop' content='information' /> <title>5.4.1 PythonEnablePdb</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4 Other Directives" - href="dir-other.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.2 PythonDebug" - href="dir-other-pd.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4 Other Directives" + href="dir-other.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.2 PythonDebug" + href="dir-other-pd.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pd.html">5.4.2 PythonDebug</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007410000000000000000"> </A> -<a name="l2h-261"> </a> +<H2><A NAME="SECTION007410000000000000000"></A><A NAME="dir-other-epd"></A> +<a id='l2h-284' xml:id='l2h-284'></a> <BR> 5.4.1 PythonEnablePdb </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonEnablePdb {On, Off} <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Default" @@ -97,41 +96,40 @@ to step through the code and examine variables. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4 Other Directives" - rel="prev" title="5.4 Other Directives" - href="dir-other.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.2 PythonDebug" - rel="next" title="5.4.2 PythonDebug" - href="dir-other-pd.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4 Other Directives" + href="dir-other.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.2 PythonDebug" + href="dir-other-pd.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pd.html">5.4.2 PythonDebug</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-ipd.html b/doc-html/dir-other-ipd.html index 83e7ed45031a702421c7b3edb7674be367b7fdae..8e9b98811aa30a5447b2d98269a9b27ef59715f1 100644 --- a/doc-html/dir-other-ipd.html +++ b/doc-html/dir-other-ipd.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-ipdv.html"> -<LINK REL="prev" href="dir-other-pimp.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-ipdv.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonInterpPerDirectory"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-ipdv.html" /> +<link rel="prev" href="dir-other-pimp.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-ipdv.html" /> +<meta name='aesop' content='information' /> <title>5.4.4 PythonInterpPerDirectory</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.3 PythonImport" - href="dir-other-pimp.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.5 PythonInterpPerDirective" - href="dir-other-ipdv.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.3 PythonImport" + href="dir-other-pimp.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.5 PythonInterpPerDirective" + href="dir-other-ipdv.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-pimp.html">5.4.3 PythonImport</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-ipdv.html">5.4.5 PythonInterpPerDirective</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007440000000000000000"> </A> -<a name="l2h-264"> </a> +<H2><A NAME="SECTION007440000000000000000"></A><A NAME="dir-other-ipd"></A> +<a id='l2h-287' xml:id='l2h-287'></a> <BR> 5.4.4 PythonInterpPerDirectory </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonInterpPerDirectory {On, Off} <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Default" @@ -114,53 +113,52 @@ In early phases of the request prior to the URI translation <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="pyapi-interps.html" - >Section <A href="pyapi-interps.html#pyapi-interps">4.1</A> Multiple Interpreters</a></em> - <dd>for more information + >Section <A href="pyapi-interps.html#pyapi-interps">4.1</A> Multiple Interpreters</a></em></dt> + <dd>for more information</dd> </dl> </div> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.3 PythonImport" - rel="prev" title="5.4.3 PythonImport" - href="dir-other-pimp.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.5 PythonInterpPerDirective" - rel="next" title="5.4.5 PythonInterpPerDirective" - href="dir-other-ipdv.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.3 PythonImport" + href="dir-other-pimp.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.5 PythonInterpPerDirective" + href="dir-other-ipdv.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-pimp.html">5.4.3 PythonImport</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-ipdv.html">5.4.5 PythonInterpPerDirective</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-ipdv.html b/doc-html/dir-other-ipdv.html index e01c35b0a0719e23c9d2335f05fcb712473eb3db..ca9821a4f2f6fe7eb77b7ef57c02056e3e7efd73 100644 --- a/doc-html/dir-other-ipdv.html +++ b/doc-html/dir-other-ipdv.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-pi.html"> -<LINK REL="prev" href="dir-other-ipd.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-pi.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonInterpPerDirective"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-pi.html" /> +<link rel="prev" href="dir-other-ipd.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-pi.html" /> +<meta name='aesop' content='information' /> <title>5.4.5 PythonInterpPerDirective</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.4 PythonInterpPerDirectory" - href="dir-other-ipd.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.6 PythonInterpreter" - href="dir-other-pi.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.4 PythonInterpPerDirectory" + href="dir-other-ipd.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.6 PythonInterpreter" + href="dir-other-pi.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-ipd.html">5.4.4 PythonInterpPerDirectory</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pi.html">5.4.6 PythonInterpreter</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007450000000000000000"> </A> -<a name="l2h-265"> </a> +<H2><A NAME="SECTION007450000000000000000"></A><A NAME="dir-other-ipdv"></A> +<a id='l2h-288' xml:id='l2h-288'></a> <BR> 5.4.5 PythonInterpPerDirective </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonInterpPerDirective {On, Off} <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Default" @@ -102,53 +101,52 @@ one for each directive. <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="pyapi-interps.html" - >Section <A href="pyapi-interps.html#pyapi-interps">4.1</A> Multiple Interpreters</a></em> - <dd>for more information + >Section <A href="pyapi-interps.html#pyapi-interps">4.1</A> Multiple Interpreters</a></em></dt> + <dd>for more information</dd> </dl> </div> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.4 PythonInterpPerDirectory" - rel="prev" title="5.4.4 PythonInterpPerDirectory" - href="dir-other-ipd.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.6 PythonInterpreter" - rel="next" title="5.4.6 PythonInterpreter" - href="dir-other-pi.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.4 PythonInterpPerDirectory" + href="dir-other-ipd.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.6 PythonInterpreter" + href="dir-other-pi.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-ipd.html">5.4.4 PythonInterpPerDirectory</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pi.html">5.4.6 PythonInterpreter</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-par.html b/doc-html/dir-other-par.html index 4deb8125560a22cc8feb854a6d65657df76402d2..fb6e9d8bb3b1a7719262f31b4df9ca86316a446c 100644 --- a/doc-html/dir-other-par.html +++ b/doc-html/dir-other-par.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-pomz.html"> -<LINK REL="prev" href="dir-other-phm.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-pomz.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonAutoReload"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-pomz.html" /> +<link rel="prev" href="dir-other-phm.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-pomz.html" /> +<meta name='aesop' content='information' /> <title>5.4.8 PythonAutoReload</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.7 PythonHandlerModule" - href="dir-other-phm.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.9 PythonOptimize" - href="dir-other-pomz.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.7 PythonHandlerModule" + href="dir-other-phm.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.9 PythonOptimize" + href="dir-other-pomz.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-phm.html">5.4.7 PythonHandlerModule</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pomz.html">5.4.9 PythonOptimize</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007480000000000000000"> </A> -<a name="l2h-268"> </a> +<H2><A NAME="SECTION007480000000000000000"></A><A NAME="dir-other-par"></A> +<a id='l2h-291' xml:id='l2h-291'></a> <BR> 5.4.8 PythonAutoReload </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonAutoReload {On, Off} <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Default" @@ -103,41 +102,40 @@ small performance gain. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.7 PythonHandlerModule" - rel="prev" title="5.4.7 PythonHandlerModule" - href="dir-other-phm.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.9 PythonOptimize" - rel="next" title="5.4.9 PythonOptimize" - href="dir-other-pomz.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.7 PythonHandlerModule" + href="dir-other-phm.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.9 PythonOptimize" + href="dir-other-pomz.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-phm.html">5.4.7 PythonHandlerModule</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pomz.html">5.4.9 PythonOptimize</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-pd.html b/doc-html/dir-other-pd.html index 3fa3ccba826ee13502d4c5ff7d8005fceaa335af..cb975b948bfbd686827585f169a2d443dcf8af22 100644 --- a/doc-html/dir-other-pd.html +++ b/doc-html/dir-other-pd.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-pimp.html"> -<LINK REL="prev" href="dir-other-epd.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-pimp.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonDebug"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-pimp.html" /> +<link rel="prev" href="dir-other-epd.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-pimp.html" /> +<meta name='aesop' content='information' /> <title>5.4.2 PythonDebug</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.1 PythonEnablePdb" - href="dir-other-epd.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.3 PythonImport" - href="dir-other-pimp.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.1 PythonEnablePdb" + href="dir-other-epd.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.3 PythonImport" + href="dir-other-pimp.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-epd.html">5.4.1 PythonEnablePdb</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pimp.html">5.4.3 PythonImport</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007420000000000000000"> </A> -<a name="l2h-262"> </a> +<H2><A NAME="SECTION007420000000000000000"></A><A NAME="dir-other-pd"></A> +<a id='l2h-285' xml:id='l2h-285'></a> <BR> 5.4.2 PythonDebug </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonDebug {On, Off} <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Default" @@ -100,41 +99,40 @@ information. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.1 PythonEnablePdb" - rel="prev" title="5.4.1 PythonEnablePdb" - href="dir-other-epd.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.3 PythonImport" - rel="next" title="5.4.3 PythonImport" - href="dir-other-pimp.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.1 PythonEnablePdb" + href="dir-other-epd.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.3 PythonImport" + href="dir-other-pimp.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-epd.html">5.4.1 PythonEnablePdb</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pimp.html">5.4.3 PythonImport</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-phm.html b/doc-html/dir-other-phm.html index d9f9ea794f2f86569cd9ce6dfd8132c788724888..1ab2d9f3aee46046d5431efefb2de026fea79d02 100644 --- a/doc-html/dir-other-phm.html +++ b/doc-html/dir-other-phm.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-par.html"> -<LINK REL="prev" href="dir-other-pi.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-par.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonHandlerModule"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-par.html" /> +<link rel="prev" href="dir-other-pi.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-par.html" /> +<meta name='aesop' content='information' /> <title>5.4.7 PythonHandlerModule</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.6 PythonInterpreter" - href="dir-other-pi.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.8 PythonAutoReload" - href="dir-other-par.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.6 PythonInterpreter" + href="dir-other-pi.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.8 PythonAutoReload" + href="dir-other-par.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-pi.html">5.4.6 PythonInterpreter</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-par.html">5.4.8 PythonAutoReload</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007470000000000000000"> </A> -<a name="l2h-267"> </a> +<H2><A NAME="SECTION007470000000000000000"></A><A NAME="dir-other-phm"></A> +<a id='l2h-290' xml:id='l2h-290'></a> <BR> 5.4.7 PythonHandlerModule </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonHandlerModule module <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" @@ -102,41 +101,40 @@ one can simply say <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.6 PythonInterpreter" - rel="prev" title="5.4.6 PythonInterpreter" - href="dir-other-pi.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.8 PythonAutoReload" - rel="next" title="5.4.8 PythonAutoReload" - href="dir-other-par.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.6 PythonInterpreter" + href="dir-other-pi.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.8 PythonAutoReload" + href="dir-other-par.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-pi.html">5.4.6 PythonInterpreter</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-par.html">5.4.8 PythonAutoReload</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-pi.html b/doc-html/dir-other-pi.html index bf4ce96df65d7d5a2bb5263fc2ef1559e37cebfa..ebe0908a2c9ff053f99efb614be1a86fbf690f11 100644 --- a/doc-html/dir-other-pi.html +++ b/doc-html/dir-other-pi.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-phm.html"> -<LINK REL="prev" href="dir-other-ipdv.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-phm.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonInterpreter"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-phm.html" /> +<link rel="prev" href="dir-other-ipdv.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-phm.html" /> +<meta name='aesop' content='information' /> <title>5.4.6 PythonInterpreter</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.5 PythonInterpPerDirective" - href="dir-other-ipdv.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.7 PythonHandlerModule" - href="dir-other-phm.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.5 PythonInterpPerDirective" + href="dir-other-ipdv.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.7 PythonHandlerModule" + href="dir-other-phm.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-ipdv.html">5.4.5 PythonInterpPerDirective</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-phm.html">5.4.7 PythonHandlerModule</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007460000000000000000"> </A> -<a name="l2h-266"> </a> +<H2><A NAME="SECTION007460000000000000000"></A><A NAME="dir-other-pi"></A> +<a id='l2h-289' xml:id='l2h-289'></a> <BR> 5.4.6 PythonInterpreter </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonInterpreter name <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" @@ -80,7 +79,7 @@ not None mod_python.c <P> -Forces mod_python to use interpreter named <i>name</i>, overriding the +Forces mod_python to use interpreter named <em>name</em>, overriding the default behaviour or behaviour dictated by <em class="citetitle"><a href="dir-other-ipd.html" @@ -99,53 +98,52 @@ subinterpreter. <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="pyapi-interps.html" - >Section <A href="pyapi-interps.html#pyapi-interps">4.1</A> Multiple Interpreters</a></em> - <dd>for more information + >Section <A href="pyapi-interps.html#pyapi-interps">4.1</A> Multiple Interpreters</a></em></dt> + <dd>for more information</dd> </dl> </div> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.5 PythonInterpPerDirective" - rel="prev" title="5.4.5 PythonInterpPerDirective" - href="dir-other-ipdv.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.7 PythonHandlerModule" - rel="next" title="5.4.7 PythonHandlerModule" - href="dir-other-phm.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.5 PythonInterpPerDirective" + href="dir-other-ipdv.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.7 PythonHandlerModule" + href="dir-other-phm.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-ipdv.html">5.4.5 PythonInterpPerDirective</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-phm.html">5.4.7 PythonHandlerModule</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-pimp.html b/doc-html/dir-other-pimp.html index 17bffead060021ef2c4a2be432d4e6a92e57daba..024bbe3b35044fa21ed2867a67d08b7bf7e0dc9e 100644 --- a/doc-html/dir-other-pimp.html +++ b/doc-html/dir-other-pimp.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-ipd.html"> -<LINK REL="prev" href="dir-other-pd.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-ipd.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonImport"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-ipd.html" /> +<link rel="prev" href="dir-other-pd.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-ipd.html" /> +<meta name='aesop' content='information' /> <title>5.4.3 PythonImport</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.2 PythonDebug" - href="dir-other-pd.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.4 PythonInterpPerDirectory" - href="dir-other-ipd.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.2 PythonDebug" + href="dir-other-pd.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.4 PythonInterpPerDirectory" + href="dir-other-ipd.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-pd.html">5.4.2 PythonDebug</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-ipd.html">5.4.4 PythonInterpPerDirectory</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007430000000000000000"> </A> -<a name="l2h-263"> </a> +<H2><A NAME="SECTION007430000000000000000"></A><A NAME="dir-other-pimp"></A> +<a id='l2h-286' xml:id='l2h-286'></a> <BR> 5.4.3 PythonImport </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -PythonImport <i>module</i> <i>interpreter_name</i> + >Syntax:</a></em></strong> +PythonImport <em>module</em> <em>interpreter_name</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -76,14 +75,31 @@ mod_python.c <P> Tells the server to import the Python module module at process startup -under the specified interpreter name. This is useful for -initialization tasks that could be time consuming and should not be -done at the request processing time, e.g. initializing a database -connection. +under the specified interpreter name. The import takes place at child +process initialization, so the module will actually be imported once for +every child process spawned. + +<P> +The <var>module</var> can be a full module name (package dot notation is +accepted) or an absolute path to a module code file. The module is loaded +using the mod_python module importer as implemented by the +<code>apache.import_module()</code> function. Reference should be made to +the documentation of that function for further details of how module +importing is managed. + +<P> +The <code>PythonImport</code> directive is useful for initialization tasks that +could be time consuming and should not be done at the time of processing a +request, e.g. initializing a database connection. Where such initialization +code could fail and cause the importing of the module to fail, it should be +placed in its own function and the alternate syntax used: <P> -The import takes place at child process initialization, so the module -will actually be imported once for every child process spawned. +<code>PythonImport <em>module::function</em> <em>interpreter_name</em></code> + +<P> +The named function will be called only after the module has been imported +successfully. The function will be called with no arguments. <P> <div class="note"><b class="label">Note:</b> @@ -103,41 +119,40 @@ See also Multiple Interpreters. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.2 PythonDebug" - rel="prev" title="5.4.2 PythonDebug" - href="dir-other-pd.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.4 PythonInterpPerDirectory" - rel="next" title="5.4.4 PythonInterpPerDirectory" - href="dir-other-ipd.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.2 PythonDebug" + href="dir-other-pd.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.4 PythonInterpPerDirectory" + href="dir-other-ipd.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-pd.html">5.4.2 PythonDebug</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-ipd.html">5.4.4 PythonInterpPerDirectory</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-po.html b/doc-html/dir-other-po.html index 6232b0c58d74560955ef07d18b0d3fcb3d4ac627..54c57f925bbf74c7a98f56040b181c2835712bf3 100644 --- a/doc-html/dir-other-po.html +++ b/doc-html/dir-other-po.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-pp.html"> -<LINK REL="prev" href="dir-other-pomz.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-pp.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonOption"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-pp.html" /> +<link rel="prev" href="dir-other-pomz.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-pp.html" /> +<meta name='aesop' content='information' /> <title>5.4.10 PythonOption</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.9 PythonOptimize" - href="dir-other-pomz.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.11 PythonPath" - href="dir-other-pp.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.9 PythonOptimize" + href="dir-other-pomz.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.11 PythonPath" + href="dir-other-pp.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-pomz.html">5.4.9 PythonOptimize</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pp.html">5.4.11 PythonPath</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION0074100000000000000000"> </A> -<a name="l2h-270"> </a> +<H2><A NAME="SECTION0074100000000000000000"></A><A NAME="dir-other-po"></A> +<a id='l2h-293' xml:id='l2h-293'></a> <BR> 5.4.10 PythonOption </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonOption key [value] <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" @@ -86,44 +85,149 @@ between the apache configuration files (<span class="file">httpd.conf</span>, <span class="file">.htaccess</span>, etc) and the Python programs. If the value is omitted or empty (<code>""</code>), then the key is removed from the local configuration. +<P> +<strong>Reserved PythonOption Keywords</strong> + +<P> +Some PythonOption keywords are used for configuring various aspects of +mod_python. Any keyword starting with mod_python.* should be considered +as reserved for internal mod_python use. + +<P> +Users are encouraged to use their own namespace qualifiers when creating +add-on modules, and not pollute the global namespace. + +<P> +The following PythonOption keys are currently used by mod_python. + +<P> +<div class="center"><table class="realtable"> + <thead> + <tr> + <th class="left" >Key</th> + <th class="center">Required Value</th> + <th class="left" >Notes</th> + </tr> + </thead> + <tbody> + <tr><td class="left" valign="baseline">mod_python.legacy.importer</td> + <td class="center">*</td> + <td class="left" >Enables the obsolete importer.</td></tr> + <tr><td class="left" valign="baseline">mod_python.mutex_directory</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.mutex_locks</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.psp.cache_database_filename</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.session.session_type</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.session.cookie_name</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.session.application_domain</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.session.application_path</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.session.database_directory</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.dbm_session.database_filename</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.dbm_session.database_directory</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.file_session.enable_fast_cleanup</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.file_session.verify_session_timeout</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.file_session.cleanup_grace_period</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.file_session.cleanup_time_limit</td> + <td class="center"> </td> + <td class="left" > </td></tr> + <tr><td class="left" valign="baseline">mod_python.file_session.database_directory</td> + <td class="center"> </td> + <td class="left" > </td></tr><P> + + <tr><td class="left" valign="baseline">session</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.session.session_type</td></tr> + <tr><td class="left" valign="baseline">ApplicationPath</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.session.application_path</td></tr> + <tr><td class="left" valign="baseline">session_cookie_name</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.session.cookie_name</td></tr> + <tr><td class="left" valign="baseline">session_directory</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.session.database_directory</td></tr> + <tr><td class="left" valign="baseline">session_dbm</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.dbm_session.database_filename</td></tr> + <tr><td class="left" valign="baseline">session_cleanup_time_limit</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.file_session.cleanup_time_limit</td></tr> + <tr><td class="left" valign="baseline">session_fast_cleanup</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.file_session.enable_fast_cleanup</td></tr> + <tr><td class="left" valign="baseline">session_grace_period</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.file_session.cleanup_grace_period</td></tr> + <tr><td class="left" valign="baseline">session_verify_cleanup</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.file_session.cleanup_session_timeout</td></tr> + <tr><td class="left" valign="baseline">PSPDbmCache</td> + <td class="center"> </td> + <td class="left" >Deprecated in 3.3, use mod_python.psp.cache_database_filename</td></tr></tbody> +</table></div> + <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.9 PythonOptimize" - rel="prev" title="5.4.9 PythonOptimize" - href="dir-other-pomz.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.11 PythonPath" - rel="next" title="5.4.11 PythonPath" - href="dir-other-pp.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.9 PythonOptimize" + href="dir-other-pomz.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.11 PythonPath" + href="dir-other-pp.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-pomz.html">5.4.9 PythonOptimize</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-pp.html">5.4.11 PythonPath</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-pomz.html b/doc-html/dir-other-pomz.html index f184dd522fa62897006a19606d867907a052ccf8..7c60324524e0b76f1777901a66f7eef5021f330a 100644 --- a/doc-html/dir-other-pomz.html +++ b/doc-html/dir-other-pomz.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="dir-other-po.html"> -<LINK REL="prev" href="dir-other-par.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="dir-other-po.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonOptimize"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="dir-other-po.html" /> +<link rel="prev" href="dir-other-par.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="dir-other-po.html" /> +<meta name='aesop' content='information' /> <title>5.4.9 PythonOptimize</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.8 PythonAutoReload" - href="dir-other-par.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.10 PythonOption" - href="dir-other-po.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.8 PythonAutoReload" + href="dir-other-par.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.10 PythonOption" + href="dir-other-po.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-par.html">5.4.8 PythonAutoReload</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-po.html">5.4.10 PythonOption</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION007490000000000000000"> </A> -<a name="l2h-269"> </a> +<H2><A NAME="SECTION007490000000000000000"></A><A NAME="dir-other-pomz"></A> +<a id='l2h-292' xml:id='l2h-292'></a> <BR> 5.4.9 PythonOptimize </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> + >Syntax:</a></em></strong> PythonOptimize {On, Off} <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Default" @@ -85,41 +84,40 @@ Enables Python optimization. Same as the Python <b class="programopt">-O</b> opt <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.8 PythonAutoReload" - rel="prev" title="5.4.8 PythonAutoReload" - href="dir-other-par.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.10 PythonOption" - rel="next" title="5.4.10 PythonOption" - href="dir-other-po.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.8 PythonAutoReload" + href="dir-other-par.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.10 PythonOption" + href="dir-other-po.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-par.html">5.4.8 PythonAutoReload</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-po.html">5.4.10 PythonOption</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other-pp.html b/doc-html/dir-other-pp.html index 155545baeaebdce4720f14c28ce9f5684eed4793..b0239a6a4ac36197b2adbcfa0107ff58081ee540 100644 --- a/doc-html/dir-other-pp.html +++ b/doc-html/dir-other-pp.html @@ -1,67 +1,66 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="dir-other-po.html"> -<LINK REL="parent" href="dir-other.html"> -<LINK REL="next" href="handlers.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PythonPath"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="dir-other-po.html" /> +<link rel="parent" href="dir-other.html" /> +<link rel="next" href="ssi.html" /> +<meta name='aesop' content='information' /> <title>5.4.11 PythonPath</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.10 PythonOption" - href="dir-other-po.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6. Standard Handlers" - href="handlers.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.10 PythonOption" + href="dir-other-po.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6. Server Side Includes" + href="ssi.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-po.html">5.4.10 PythonOption</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="handlers.html">6. Standard Handlers</A> -<br><hr> +<a class="sectref" rel="next" href="ssi.html">6. Server Side Includes</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION0074110000000000000000"> </A> -<a name="l2h-271"> </a> +<H2><A NAME="SECTION0074110000000000000000"></A><A NAME="dir-other-pp"></A> +<a id='l2h-294' xml:id='l2h-294'></a> <BR> 5.4.11 PythonPath </H2> <P> -<b><em class="citetitle"><a +<strong><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Syntax" title="Syntax:" - >Syntax:</a></em></b> -PythonPath <i>path</i> + >Syntax:</a></em></strong> +PythonPath <em>path</em> <BR><em class="citetitle"><a href="http://httpd.apache.org/docs-2.0/mod/directive-dict.html#Context" title="Context:" @@ -115,41 +114,40 @@ This directive should not be used as a security measure since the </div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.10 PythonOption" - rel="prev" title="5.4.10 PythonOption" - href="dir-other-po.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5.4 Other Directives" - rel="parent" title="5.4 Other Directives" - href="dir-other.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6. Standard Handlers" - rel="next" title="6. Standard Handlers" - href="handlers.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.4.10 PythonOption" + href="dir-other-po.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5.4 Other Directives" + href="dir-other.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6. Server Side Includes" + href="ssi.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-other-po.html">5.4.10 PythonOption</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="dir-other.html">5.4 Other Directives</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="handlers.html">6. Standard Handlers</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="ssi.html">6. Server Side Includes</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/dir-other.html b/doc-html/dir-other.html index c56f3676a189dd99d78806070a34fddc65173032..d8e71e952e6b92436ac2c2bb67d3ec98f63858b5 100644 --- a/doc-html/dir-other.html +++ b/doc-html/dir-other.html @@ -1,63 +1,63 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="dir-conn.html"> -<LINK REL="parent" href="directives.html"> -<LINK REL="next" href="dir-other-epd.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Other Directives"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="dir-conn.html" /> +<link rel="parent" href="directives.html" /> +<link rel="next" href="dir-other-epd.html" /> +<meta name='aesop' content='information' /> <title>5.4 Other Directives</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.3.1 PythonConnectionHandler" - href="dir-conn-ch.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5. Apache Configuration Directives" - href="directives.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.1 PythonEnablePdb" - href="dir-other-epd.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.3.1 PythonConnectionHandler" + href="dir-conn-ch.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5. Apache Configuration Directives" + href="directives.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.1 PythonEnablePdb" + href="dir-other-epd.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-conn-ch.html">5.3.1 PythonConnectionHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-epd.html">5.4.1 PythonEnablePdb</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION007400000000000000000"> </A> +<H1><A NAME="SECTION007400000000000000000"></A><A NAME="dir-other"></A> <BR> 5.4 Other Directives </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -75,43 +75,43 @@ <LI><A href="dir-other-pp.html">5.4.11 PythonPath</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.3.1 PythonConnectionHandler" - rel="prev" title="5.3.1 PythonConnectionHandler" - href="dir-conn-ch.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="5. Apache Configuration Directives" - rel="parent" title="5. Apache Configuration Directives" - href="directives.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.4.1 PythonEnablePdb" - rel="next" title="5.4.1 PythonEnablePdb" - href="dir-other-epd.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="5.3.1 PythonConnectionHandler" + href="dir-conn-ch.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="5. Apache Configuration Directives" + href="directives.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.4.1 PythonEnablePdb" + href="dir-other-epd.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="dir-conn-ch.html">5.3.1 PythonConnectionHandler</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="directives.html">5. Apache Configuration Directives</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-other-epd.html">5.4.1 PythonEnablePdb</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/directives.html b/doc-html/directives.html index 9fedd7d3ceadd57bf07fcac478ee5f32008f67ee..ff3d356f235bcb59d1d006f66b5dd34df181b9e8 100644 --- a/doc-html/directives.html +++ b/doc-html/directives.html @@ -1,64 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="handlers.html"> -<LINK REL="prev" href="pythonapi.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="dir-handlers.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT=". Apache Configuration Directives"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="ssi.html" /> +<link rel="prev" href="pythonapi.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="dir-handlers.html" /> +<meta name='aesop' content='information' /> <title>5. Apache Configuration Directives</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.9 psp - Python" - href="pyapi-psp.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.9 psp - Python" + href="pyapi-psp.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-psp.html">4.9 psp - Python</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers.html">5.1 Request Handlers</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION007000000000000000000"> </A> +<H1><A NAME="SECTION007000000000000000000"></A><A NAME="directives"></A> <BR> 5. Apache Configuration Directives </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -103,43 +103,43 @@ <LI><A href="dir-other-pp.html">5.4.11 PythonPath</a> </ul></ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.9 psp - Python" - rel="prev" title="4.9 psp - Python" - href="pyapi-psp.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5.1 Request Handlers" - rel="next" title="5.1 Request Handlers" - href="dir-handlers.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.9 psp - Python" + href="pyapi-psp.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5.1 Request Handlers" + href="dir-handlers.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-psp.html">4.9 psp - Python</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="dir-handlers.html">5.1 Request Handlers</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/front.html b/doc-html/front.html index 5e109f2c7ee8180451ab811803a808ae35d31f1d..2e9e70498b5402e8d690697fb3b313473fb8193c 100644 --- a/doc-html/front.html +++ b/doc-html/front.html @@ -1,64 +1,63 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="contents.html"> -<LINK REL="prev" HREF="modpython.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="contents.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Front Matter"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="contents.html" /> +<link rel="prev" href="modpython.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="contents.html" /> +<meta name='aesop' content='information' /> <title>Front Matter</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="Mod_python Manual" - HREF="modpython.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="Contents" - href="contents.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="Mod_python Manual" + href="modpython.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="Contents" + href="contents.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="prev" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="contents.html">Contents</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION001000000000000000000"> </A> +<H1><A NAME="SECTION001000000000000000000"></A><A NAME="front"></A> <BR> Front Matter </H1> <P> -<DIV CLASS="centerline" ID="par5793" ALIGN="CENTER"> -<b>Copyright © 2004 Apache Software Foundation.</b></DIV> +<DIV CLASS="centerline" ID="par7090" ALIGN="CENTER"> +<strong>Copyright © 2004 Apache Software Foundation.</strong></DIV> <P> Licensed under the Apache License, Version 2.0 (the ``License''); you @@ -94,17 +93,17 @@ and a tutorial all-in-one. <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="http://www.python.org/" - >Python Language Web Site</a></em> - <dd>for information on the Python language + >Python Language Web Site</a></em></dt> + <dd>for information on the Python language</dd> </dl> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="http://httpd.apache.org/" - >Apache Server Web Site</a></em> - <dd>for information on the Apache server + >Apache Server Web Site</a></em></dt> + <dd>for information on the Apache server</dd> </dl> </div> @@ -115,41 +114,40 @@ and a tutorial all-in-one. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="Mod_python Manual" - rel="prev" title="Mod_python Manual" - HREF="modpython.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="Contents" - rel="next" title="Contents" - href="contents.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="Mod_python Manual" + href="modpython.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="Contents" + href="contents.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="prev" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="contents.html">Contents</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/genindex.html b/doc-html/genindex.html index 4e146aa4a5c417c6bb7e31bd16531e628310014a..df7f162354672616e0cafef1b3d6b98295864d89 100644 --- a/doc-html/genindex.html +++ b/doc-html/genindex.html @@ -1,57 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="about.html"> -<LINK REL="prev" href="app-changes.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="about.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Index"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="about.html" /> +<link rel="prev" href="app-changes-from-2.x.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="about.html" /> +<meta name='aesop' content='information' /> <title>Index</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="D. Changes from Previous" - href="app-changes.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="About this document ..." - href="about.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="E. Changes from Previous" + href="app-changes-from-2.x.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="About this document ..." + href="about.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="app-changes.html">D. Changes from Previous</A> +<a class="sectref" rel="prev" href="app-changes-from-2.x.html">E. Changes from Previous</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="about.html">About this document ...</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<br> +<br /> -<h2><A NAME="SECTION0013000000000000000000"> +<h2><A NAME="SECTION0016000000000000000000"> Index</A> -</h2><hr><center> +</h2><hr /><center> <b><a href="#letter-Symbols">Symbols</a></b> | <b><a href="#letter-_">_</a></b> | <b><a href="#letter-a">a</a></b> | @@ -78,788 +79,774 @@ Index</A> <b><a href="#letter-w">w</a></b> | <b><a href="#letter-z">z</a></b></center> -<hr> -<h2><a name="letter-Symbols">Symbols</a></h2> +<hr /> +<h2 id="letter-Symbols">Symbols</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="inst-configure.html#l2h-4">./configure</a><dl compact> +<dl compact='compact'> +<dt><a href="inst-configure.html#l2h-4">./configure</a><dl compact='compact'> <dt><a href="inst-configure.html#l2h-5"><b class="programopt">--with-apxs</b></a> <dt><a href="inst-configure.html#l2h-14"><b class="programopt">--with-flex</b></a> <dt><a href="inst-configure.html#l2h-11"><b class="programopt">--with-max-locks</b></a> </dl></dl> </td><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>./configure (continued) <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-configure.html#l2h-10"><b class="programopt">--with-mutex-dir</b></a> <dt><a href="inst-configure.html#l2h-16"><b class="programopt">--with-python-src</b></a> <dt><a href="inst-configure.html#l2h-9"><b class="programopt">--with-python</b></a> </dl></dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-_">_ (underscore)</a></h2> +<hr /> +<h2 id="letter-_">_ (underscore)</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>_apache <dd> - <dl compact> + <dl compact='compact'> <dt><a href="module-apache.html#l2h-30">module</a> </dl></dl> </td><td width="50%"> - +<dl compact='compact'> +</dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-a">A</a></h2> +<hr /> +<h2 id="letter-a">A</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpconn-mem.html#l2h-140">aborted (connection attribute)</a> -<dt><a href="pyapi-mptable.html#l2h-42">add() (table method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-45">add_common_vars() (request method)</a> -<dt><a href="pyapi-cookie-func.html#l2h-212">add_cookie() (in module Cookie)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-46">add_handler() (request method)</a> +<dl compact='compact'> +<dt><a href="pyapi-mpconn-mem.html#l2h-155">aborted (connection attribute)</a> +<dt><a href="pyapi-mptable.html#l2h-45">add() (table method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-48">add_common_vars() (request method)</a> +<dt><a href="pyapi-cookie-func.html#l2h-234">add_cookie() (in module Cookie)</a> +<dt><a href="pyapi-util-fstor.html#l2h-208">add_field() (FieldStorage method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-49">add_handler() (request method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-50">add_input_filter() (request method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-51">add_output_filter() (request method)</a> <dt><a href="pyapi-apmeth.html#l2h-33">allow_methods() (in module apache)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-47">allow_methods() (request method)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-84">allowed (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-86">allowed_methods (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-85">allowed_xmethods (request attribute)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-52">allow_methods() (request method)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-98">allowed (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-100">allowed_methods (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-99">allowed_xmethods (request attribute)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-111">ap_auth_type (request attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-125">ap_auth_type (request attribute)</a> <dt><a href="module-apache.html">apache (extension module)</a> <dt>apache configuration <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-apacheconfig.html#l2h-19">LoadModule</a> <dt><a href="inst-apacheconfig.html#l2h-20">mutex directory</a> <dt><a href="inst-apacheconfig.html#l2h-21">mutex locks</a> </dl> -<dt><a href="pyapi-psp.html#l2h-240">apply_data() (PSPInstance method)</a> +<dt><a href="pyapi-psp.html#l2h-263">apply_data() (PSPInterface method)</a> <dt><a href="inst-configure.html#l2h-5">apxs</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-119">args (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-73">assbackwards (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-127">AUTH_TYPE (environment variable)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-133">args (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-87">assbackwards (request attribute)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-53">auth_name() (request method)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-141">AUTH_TYPE (environment variable)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-54">auth_type() (request method)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-b">B</a></h2> +<hr /> +<h2 id="letter-b">B</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpconn-mem.html#l2h-134">base_server (connection attribute)</a> -<dt><a href="pyapi-sess-classes.html#l2h-216">BaseSession (class in Session)</a> +<dl compact='compact'> +<dt><a href="pyapi-mpconn-mem.html#l2h-149">base_server (connection attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-239">BaseSession (class in Session)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-88">bytes_sent (request attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-102">bytes_sent (request attribute)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-c">C</a></h2> +<hr /> +<h2 id="letter-c">C</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-117">canonical_filename (request attribute)</a> -<dt><a href="hand-cgi.html#l2h-273">CGI</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-131">canonical_filename (request attribute)</a> +<dt><a href="hand-cgi.html#l2h-296">CGI</a> <dt>Changes from <dd> - <dl compact> - <dt><a href="app-changes.html#l2h-277">version 2.x</a> - <dt><a href="node100.html#l2h-276">version 3.1.4</a> - <dt><a href="node99.html#l2h-275">version 3.2.7</a> - <dt><a href="node98.html#l2h-274">version 3.2.8</a> + <dl compact='compact'> + <dt><a href="app-changes-from-2.x.html#l2h-301">version 2.x</a> + <dt><a href="app-changes-from-3.1.4.html#l2h-300">version 3.1.4</a> + <dt><a href="app-changes-from-3.2.10.html#l2h-297">version 3.2.10</a> + <dt><a href="app-changes-from-3.2.7.html#l2h-299">version 3.2.7</a> + <dt><a href="app-changes.html#l2h-298">version 3.2.8</a> </dl> -<dt><a href="pyapi-mprequest-mem.html#l2h-90">chunked (request attribute)</a> -<dt><a href="pyapi-sess-classes.html#l2h-230">cleanup() (BaseSession method)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-92">clength (request attribute)</a> -<dt><a href="pyapi-mpfilt-meth.html#l2h-157">close() (filter method)</a> -<dt><a href="pyapi-mpfilt-mem.html#l2h-159">closed (filter attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-104">chunked (request attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-253">cleanup() (BaseSession method)</a> +<dt><a href="pyapi-util-fstor.html#l2h-209">clear() (FieldStorage method)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-106">clength (request attribute)</a> +<dt><a href="pyapi-mpfilt-meth.html#l2h-172">close() (filter method)</a> +<dt><a href="pyapi-mpfilt-mem.html#l2h-174">closed (filter attribute)</a> </dl> </td><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>compiling <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-compiling.html#l2h-3">mod_python</a> </dl> -<dt><a href="pyapi-apmeth.html#l2h-36">config_tree() (in module apache)</a> +<dt><a href="pyapi-apmeth.html#l2h-37">config_tree() (in module apache)</a> <dt>connection <dd> - <dl compact> + <dl compact='compact'> <dt><a href="pyapi-conn.html#l2h-28">handler</a> </dl> -<dt><a href="pyapi-mprequest-mem.html#l2h-67">connection (request attribute)</a> -<dt><a href="pyapi-mpconn.html#l2h-130">connection object</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-108">content_encoding (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-106">content_languages (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-105">content_type (request attribute)</a> -<dt><a href="pyapi-cookie-classes.html#l2h-207">Cookie (class in Cookie)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-81">connection (request attribute)</a> +<dt><a href="pyapi-mpconn.html#l2h-144">connection object</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-55">construct_url() (request method)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-122">content_encoding (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-120">content_languages (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-119">content_type (request attribute)</a> +<dt><a href="pyapi-cookie-classes.html#l2h-229">Cookie (class in Cookie)</a> <dt><a href="pyapi-cookie.html">Cookie (extension module)</a> -<dt><a href="pyapi-sess-classes.html#l2h-219">created() (BaseSession method)</a> +<dt><a href="pyapi-sess-classes.html#l2h-242">created() (BaseSession method)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-d">D</a></h2> +<hr /> +<h2 id="letter-d">D</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-sess-classes.html#l2h-231">DbmSession (class in Session)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-169">defn_line_number (server attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-168">defn_name (server attribute)</a> -<dt><a href="pyapi-sess-classes.html#l2h-226">delete() (BaseSession method)</a> -<dt><a href="pyapi-mpfilt-meth.html#l2h-158">disable() (filter method)</a> +<dl compact='compact'> +<dt><a href="pyapi-sess-classes.html#l2h-254">DbmSession (class in Session)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-185">defn_line_number (server attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-184">defn_name (server attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-249">delete() (BaseSession method)</a> +<dt><a href="pyapi-mpfilt-meth.html#l2h-173">disable() (filter method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-56">discard_request_body() (request method)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-psp.html#l2h-237">display_code() (PSP method)</a> -<dt><a href="pyapi-util-fstor-fld.html#l2h-201">disposition (Field attribute)</a> -<dt><a href="pyapi-util-fstor-fld.html#l2h-202">disposition_options (Field attribute)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-48">document_root() (request method)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-142">double_reverse (connection attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-psp.html#l2h-260">display_code() (PSP method)</a> +<dt><a href="pyapi-util-fstor-fld.html#l2h-223">disposition (Field attribute)</a> +<dt><a href="pyapi-util-fstor-fld.html#l2h-224">disposition_options (Field attribute)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-57">document_root() (request method)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-157">double_reverse (connection attribute)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-e">E</a></h2> +<hr /> +<h2 id="letter-e">E</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>environment variables <dd> - <dl compact> - <dt><a href="pyapi-mprequest-mem.html#l2h-127">AUTH_TYPE</a> + <dl compact='compact'> + <dt><a href="pyapi-mprequest-mem.html#l2h-141">AUTH_TYPE</a> <dt><a href="inst-configure.html#l2h-6">PATH</a>, <a href="inst-configure.html#l2h-8">[Link]</a>, <a href="inst-configure.html#l2h-13">[Link]</a> - <dt><a href="pyapi-mprequest-mem.html#l2h-128">PATH_INFO</a> - <dt><a href="pyapi-mprequest-mem.html#l2h-129">QUERY_ARGS</a> - <dt><a href="pyapi-mpconn-mem.html#l2h-148">REMOTE_ADDR</a> - <dt><a href="pyapi-mpconn-mem.html#l2h-149">REMOTE_HOST</a> - <dt><a href="pyapi-mpconn-mem.html#l2h-150">REMOTE_IDENT</a> - <dt><a href="pyapi-mprequest-mem.html#l2h-126">REMOTE_USER</a> - <dt><a href="pyapi-mprequest-mem.html#l2h-125">REQUEST_METHOD</a> + <dt><a href="pyapi-mprequest-mem.html#l2h-142">PATH_INFO</a> + <dt><a href="pyapi-mprequest-mem.html#l2h-143">QUERY_ARGS</a> + <dt><a href="pyapi-mpconn-mem.html#l2h-163">REMOTE_ADDR</a> + <dt><a href="pyapi-mpconn-mem.html#l2h-164">REMOTE_HOST</a> + <dt><a href="pyapi-mpconn-mem.html#l2h-165">REMOTE_IDENT</a> + <dt><a href="pyapi-mprequest-mem.html#l2h-140">REMOTE_USER</a> + <dt><a href="pyapi-mprequest-mem.html#l2h-139">REQUEST_METHOD</a> </dl></dl> </td><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>environment variables (continued) <dd> - <dl compact> - <dt><a href="pyapi-mpsrv-mem.html#l2h-187">SERVER_NAME</a> - <dt><a href="pyapi-mpsrv-mem.html#l2h-188">SERVER_PORT</a> - <dt><a href="pyapi-mprequest-mem.html#l2h-124">SERVER_PROTOCOL</a> + <dl compact='compact'> + <dt><a href="pyapi-mpsrv-mem.html#l2h-203">SERVER_NAME</a> + <dt><a href="pyapi-mpsrv-mem.html#l2h-204">SERVER_PORT</a> + <dt><a href="pyapi-mprequest-mem.html#l2h-138">SERVER_PROTOCOL</a> </dl> -<dt><a href="pyapi-mprequest-mem.html#l2h-123">eos_sent (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-100">err_headers_out (request attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-175">error_fname (server attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-137">eos_sent (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-114">err_headers_out (request attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-191">error_fname (server attribute)</a> <dt><a href="pyapi-apmeth.html#l2h-34">exists_config_define() (in module apache)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-97">expecting_100 (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-111">expecting_100 (request attribute)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-f">F</a></h2> +<hr /> +<h2 id="letter-f">F</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-util-fstor-fld.html#l2h-194">Field (class in util)</a> -<dt><a href="pyapi-util-fstor.html#l2h-190">FieldStorage (class in util)</a> -<dt><a href="pyapi-util-fstor-fld.html#l2h-197">file (Field attribute)</a> -<dt><a href="pyapi-util-fstor-fld.html#l2h-198">filename (Field attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-116">filename (request attribute)</a> -<dt><a href="pyapi-sess-classes.html#l2h-232">FileSession (class in Session)</a> +<dl compact='compact'> +<dt><a href="pyapi-util-fstor-fld.html#l2h-216">Field (class in util)</a> +<dt><a href="pyapi-util-fstor.html#l2h-206">FieldStorage (class in util)</a> +<dt><a href="pyapi-util-fstor-fld.html#l2h-219">file (Field attribute)</a> +<dt><a href="pyapi-util-fstor-fld.html#l2h-220">filename (Field attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-130">filename (request attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-255">FileSession (class in Session)</a> </dl> </td><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>filter <dd> - <dl compact> + <dl compact='compact'> <dt><a href="pyapi-filter.html#l2h-27">handler</a> </dl> -<dt><a href="pyapi-mpfilt.html#l2h-151">filter object</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-120">finfo (request attribute)</a> +<dt><a href="pyapi-mpfilt.html#l2h-166">filter object</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-134">finfo (request attribute)</a> <dt><a href="inst-configure.html#l2h-12">flex</a> -<dt><a href="pyapi-mpfilt-meth.html#l2h-156">flush() (filter method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-65">flush() (request method)</a> +<dt><a href="pyapi-mpfilt-meth.html#l2h-171">flush() (filter method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-79">flush() (request method)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-g">G</a></h2> +<hr /> +<h2 id="letter-g">G</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-meth.html#l2h-49">get_basic_auth_pw() (request method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-50">get_config() (request method)</a> -<dt><a href="pyapi-mpsrv-meth.html#l2h-165">get_config() (server method)</a> -<dt><a href="pyapi-cookie-func.html#l2h-213">get_cookies() (in module Cookie)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-52">get_options() (request method)</a> +<dl compact='compact'> +<dt><a href="pyapi-util-fstor.html#l2h-210">get() (FieldStorage method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-58">get_basic_auth_pw() (request method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-59">get_config() (request method)</a> +<dt><a href="pyapi-mpsrv-meth.html#l2h-180">get_config() (server method)</a> +<dt><a href="pyapi-cookie-func.html#l2h-236">get_cookie() (in module Cookie)</a> +<dt><a href="pyapi-cookie-func.html#l2h-235">get_cookies() (in module Cookie)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpsrv-meth.html#l2h-166">get_options() (server method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-51">get_remote_host() (request method)</a> -<dt><a href="pyapi-util-fstor.html#l2h-192">getfirst() (FieldStorage method)</a> -<dt><a href="pyapi-util-fstor.html#l2h-193">getlist() (FieldStorage method)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-meth.html#l2h-61">get_options() (request method)</a> +<dt><a href="pyapi-mpsrv-meth.html#l2h-181">get_options() (server method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-60">get_remote_host() (request method)</a> +<dt><a href="pyapi-util-fstor.html#l2h-211">getfirst() (FieldStorage method)</a> +<dt><a href="pyapi-util-fstor.html#l2h-212">getlist() (FieldStorage method)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-h">H</a></h2> +<hr /> +<h2 id="letter-h">H</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="tut-what-it-do.html#l2h-23">handler</a><dl compact> +<dl compact='compact'> +<dt><a href="tut-what-it-do.html#l2h-23">handler</a><dl compact='compact'> <dt><a href="pyapi-conn.html#l2h-28">connection</a> <dt><a href="pyapi-filter.html#l2h-27">filter</a> <dt><a href="pyapi-handler.html#l2h-24">request</a> </dl> -<dt><a href="pyapi-mpfilt-mem.html#l2h-163">handler (filter attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-107">handler (request attribute)</a> +<dt><a href="pyapi-mpfilt-mem.html#l2h-178">handler (filter attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-121">handler (request attribute)</a> +<dt><a href="pyapi-util-fstor.html#l2h-213">has_key() (FieldStorage method)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-75">header_only (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-98">headers_in (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-99">headers_out (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-78">hostname (request attribute)</a> -<dt><a href="app-changes.html#l2h-278">httpdapi</a> -<dt><a href="app-changes.html#l2h-278">Httpdapy</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-89">header_only (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-112">headers_in (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-113">headers_out (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-92">hostname (request attribute)</a> +<dt><a href="app-changes-from-2.x.html#l2h-302">httpdapi</a> +<dt><a href="app-changes-from-2.x.html#l2h-302">Httpdapy</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-i">I</a></h2> +<hr /> +<h2 id="letter-i">I</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-sess-classes.html#l2h-218">id() (BaseSession method)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-146">id (connection attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-sess-classes.html#l2h-241">id() (BaseSession method)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-161">id (connection attribute)</a> <dt><a href="pyapi-apmeth.html#l2h-32">import_module() (in module apache)</a> -<dt><a href="pyapi-sess-classes.html#l2h-227">init_lock() (BaseSession method)</a> +<dt><a href="pyapi-sess-classes.html#l2h-250">init_lock() (BaseSession method)</a> <dt>install_dso <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-makeinstall.html#l2h-18">make targets</a> </dl> <dt>install_py_lib <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-makeinstall.html#l2h-17">make targets</a> </dl> <dt>installation <dd> - <dl compact> + <dl compact='compact'> <dt><a href="installation.html#l2h-1">UNIX</a> -</dl></dl> + </dl> +<dt><a href="pyapi-mprequest-meth.html#l2h-62">internal_redirect() (request method)</a> +</dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-meth.html#l2h-53">internal_redirect() (request method)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-104">interpreter (request attribute)</a> -<dt><a href="pyapi-sess-classes.html#l2h-223">invalidate() (BaseSession method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-54">is_https() (request method)</a> -<dt><a href="pyapi-mpfilt-mem.html#l2h-162">is_input (filter attribute)</a> -<dt><a href="pyapi-sess-classes.html#l2h-217">is_new() (BaseSession method)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-177">is_virtual (server attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-apmem.html#l2h-41">interpreter (apache attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-118">interpreter (request attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-246">invalidate() (BaseSession method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-63">is_https() (request method)</a> +<dt><a href="pyapi-mpfilt-mem.html#l2h-177">is_input (filter attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-240">is_new() (BaseSession method)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-193">is_virtual (server attribute)</a> +<dt><a href="pyapi-util-fstor.html#l2h-214">items() (FieldStorage method)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-k">K</a></h2> +<hr /> +<h2 id="letter-k">K</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpsrv-mem.html#l2h-181">keep_alive (server attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-180">keep_alive_max (server attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-179">keep_alive_timeout (server attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mpsrv-mem.html#l2h-197">keep_alive (server attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-196">keep_alive_max (server attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-195">keep_alive_timeout (server attribute)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpconn-mem.html#l2h-141">keepalive (connection attribute)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-143">keepalives (connection attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mpconn-mem.html#l2h-156">keepalive (connection attribute)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-158">keepalives (connection attribute)</a> +<dt><a href="pyapi-util-fstor.html#l2h-215">keys() (FieldStorage method)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-l">L</a></h2> +<hr /> +<h2 id="letter-l">L</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-sess-classes.html#l2h-220">last_accessed() (BaseSession method)</a> +<dl compact='compact'> +<dt><a href="pyapi-sess-classes.html#l2h-243">last_accessed() (BaseSession method)</a> <dt><a href="inst-configure.html#l2h-7">libpython.a</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-186">limit_req_fields (server attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-185">limit_req_fieldsize (server attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-184">limit_req_line (server attribute)</a> -<dt><a href="pyapi-util-fstor.html#l2h-191">list (FieldStorage attribute)</a> -<dt><a href="pyapi-sess-classes.html#l2h-224">load() (BaseSession method)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-202">limit_req_fields (server attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-201">limit_req_fieldsize (server attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-200">limit_req_line (server attribute)</a> +<dt><a href="pyapi-util-fstor.html#l2h-207">list (FieldStorage attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-247">load() (BaseSession method)</a> <dt>LoadModule <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-apacheconfig.html#l2h-19">apache configuration</a> -</dl></dl> + </dl> +<dt><a href="pyapi-mpconn-mem.html#l2h-150">local_addr (connection attribute)</a> +</dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpconn-mem.html#l2h-135">local_addr (connection attribute)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-145">local_host (connection attribute)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-144">local_ip (connection attribute)</a> -<dt><a href="pyapi-sess-classes.html#l2h-228">lock() (BaseSession method)</a> +<dl compact='compact'> +<dt><a href="pyapi-mpconn-mem.html#l2h-160">local_host (connection attribute)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-159">local_ip (connection attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-251">lock() (BaseSession method)</a> +<dt><a href="pyapi-mpconn-meth.html#l2h-145">log_error() (connection method)</a> <dt><a href="pyapi-apmeth.html#l2h-31">log_error() (in module apache)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-55">log_error() (table method)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-176">loglevel (server attribute)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-64">log_error() (request method)</a> +<dt><a href="pyapi-mpsrv-meth.html#l2h-182">log_error() (server method)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-192">loglevel (server attribute)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-m">M</a></h2> +<hr /> +<h2 id="letter-m">M</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>mailing list <dd> - <dl compact> + <dl compact='compact'> <dt><a href="installation.html#l2h-2">mod_python</a> </dl> -<dt><a href="pyapi-mprequest-mem.html#l2h-71">main (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-85">main (request attribute)</a> +<dt><a href="pyapi-apmem.html#l2h-42">main_server (apache attribute)</a> <dt>make targets <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-makeinstall.html#l2h-18">install_dso</a> <dt><a href="inst-makeinstall.html#l2h-17">install_py_lib</a> </dl> -<dt><a href="pyapi-apmeth.html#l2h-38">make_table() (in module apache)</a> -<dt><a href="pyapi-cookie-classes.html#l2h-211">MarshalCookie (class in Cookie)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-56">meets_conditions() (request method)</a> -<dt><a href="pyapi-sess-classes.html#l2h-233">MemorySession (class in Session)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-82">method (request attribute)</a> +<dt><a href="pyapi-apmeth.html#l2h-39">make_table() (in module apache)</a> +<dt><a href="pyapi-cookie-classes.html#l2h-233">MarshalCookie (class in Cookie)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-65">meets_conditions() (request method)</a> +<dt><a href="pyapi-sess-classes.html#l2h-256">MemorySession (class in Session)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-96">method (request attribute)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-83">method_number (request attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-97">method_number (request attribute)</a> <dt>mod_python <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-compiling.html#l2h-3">compiling</a> <dt><a href="installation.html#l2h-2">mailing list</a> </dl> <dt><a href="inst-apacheconfig.html#l2h-22">mod_python.so</a> <dt>module <dd> - <dl compact> + <dl compact='compact'> <dt><a href="module-apache.html#l2h-30">_apache</a> </dl> -<dt><a href="pyapi-apmeth.html#l2h-39">mpm_query() (in module apache)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-89">mtime (request attribute)</a> +<dt><a href="pyapi-apmeth.html#l2h-40">mpm_query() (in module apache)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-103">mtime (request attribute)</a> <dt>mutex directory <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-apacheconfig.html#l2h-20">apache configuration</a> </dl> <dt>mutex locks <dd> - <dl compact> + <dl compact='compact'> <dt><a href="inst-apacheconfig.html#l2h-21">apache configuration</a> </dl></dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-n">N</a></h2> +<hr /> +<h2 id="letter-n">N</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-util-fstor-fld.html#l2h-195">name (Field attribute)</a> -<dt><a href="pyapi-mpfilt-mem.html#l2h-160">name (filter attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-172">names (server attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-69">next (request attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-util-fstor-fld.html#l2h-217">name (Field attribute)</a> +<dt><a href="pyapi-mpfilt-mem.html#l2h-175">name (filter attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-188">names (server attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-83">next (request attribute)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-112">no_cache (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-113">no_local_copy (request attribute)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-147">notes (connection attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-102">notes (request attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-126">no_cache (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-127">no_local_copy (request attribute)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-162">notes (connection attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-116">notes (request attribute)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-o">O</a></h2> +<hr /> +<h2 id="letter-o">O</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>object <dd> - <dl compact> - <dt><a href="pyapi-mpconn.html#l2h-130">connection</a> - <dt><a href="pyapi-mpfilt.html#l2h-151">filter</a> + <dl compact='compact'> + <dt><a href="pyapi-mpconn.html#l2h-144">connection</a> + <dt><a href="pyapi-mpfilt.html#l2h-166">filter</a> <dt><a href="pyapi-handler.html#l2h-25">request</a> </dl></dl> </td><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>object (continued) <dd> - <dl compact> - <dt><a href="pyapi-mpserver.html#l2h-164">server</a> - <dt><a href="pyapi-mptable.html#l2h-40">table</a> + <dl compact='compact'> + <dt><a href="pyapi-mpserver.html#l2h-179">server</a> + <dt><a href="pyapi-mptable.html#l2h-43">table</a> </dl> <dt>order <dd> - <dl compact> - <dt><a href="dir-handlers-prrh.html#l2h-246">phase</a> + <dl compact='compact'> + <dt><a href="dir-handlers-prrh.html#l2h-269">phase</a> </dl></dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-p">P</a></h2> +<hr /> +<h2 id="letter-p">P</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-cookie-classes.html#l2h-208">parse() (Cookie method)</a> -<dt><a href="pyapi-psp.html#l2h-242">parse() (in module psp)</a> -<dt><a href="pyapi-cookie-classes.html#l2h-210">parse() (SignedCookie method)</a> -<dt><a href="pyapi-util-funcs.html#l2h-203">parse_qs() (in module util)</a> -<dt><a href="pyapi-util-funcs.html#l2h-204">parse_qsl() (in module util)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-121">parsed_uri (request attribute)</a> -<dt><a href="pyapi-psp.html#l2h-243">parsestring() (in module psp)</a> -<dt><a href="pyapi-mpfilt-meth.html#l2h-152">pass_on() (filter method)</a> +<dl compact='compact'> +<dt><a href="pyapi-cookie-classes.html#l2h-230">parse() (Cookie method)</a> +<dt><a href="pyapi-psp.html#l2h-265">parse() (in module psp)</a> +<dt><a href="pyapi-cookie-classes.html#l2h-232">parse() (SignedCookie method)</a> +<dt><a href="pyapi-util-funcs.html#l2h-225">parse_qs() (in module util)</a> +<dt><a href="pyapi-util-funcs.html#l2h-226">parse_qsl() (in module util)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-135">parsed_uri (request attribute)</a> +<dt><a href="pyapi-psp.html#l2h-266">parsestring() (in module psp)</a> +<dt><a href="pyapi-mpfilt-meth.html#l2h-167">pass_on() (filter method)</a> <dt><a href="inst-configure.html#l2h-6">PATH (environment variable)</a>, <a href="inst-configure.html#l2h-8">[Link]</a>, <a href="inst-configure.html#l2h-13">[Link]</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-182">path (server attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-128">PATH_INFO (environment variable)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-118">path_info (request attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-183">pathlen (server attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-198">path (server attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-142">PATH_INFO (environment variable)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-132">path_info (request attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-199">pathlen (server attribute)</a> <dt>phase <dd> - <dl compact> - <dt><a href="dir-handlers-prrh.html#l2h-246">order</a> + <dl compact='compact'> + <dt><a href="dir-handlers-prrh.html#l2h-269">order</a> </dl> -<dt><a href="pyapi-mprequest-mem.html#l2h-103">phase (request attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-174">port (server attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-70">prev (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-77">proto_num (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-76">protocol (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-74">proxyreq (request attribute)</a> -<dt><a href="hand-psp.html#l2h-272">PSP</a> -<dt><a href="pyapi-psp.html#l2h-235">PSP (class in psp)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-117">phase (request attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-190">port (server attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-84">prev (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-91">proto_num (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-90">protocol (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-88">proxyreq (request attribute)</a> +<dt><a href="hand-psp.html#l2h-295">PSP</a> +<dt><a href="pyapi-psp.html#l2h-258">PSP (class in psp)</a> <dt><a href="pyapi-psp.html">psp (extension module)</a> -<dt><a href="pyapi-psp.html#l2h-238">PSPInstance (class in psp)</a> -<dt><a href="dir-handlers-syn.html#l2h-244">Python*Handler Syntax</a> +<dt><a href="pyapi-psp.html#l2h-261">PSPInterface (class in psp)</a> +<dt><a href="dir-handlers-syn.html#l2h-267">Python*Handler Syntax</a> <dt><a href="inst-configure.html#l2h-15">python-src</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="dir-handlers-ach.html#l2h-250">PythonAccessHandler</a> -<dt><a href="dir-handlers-auh.html#l2h-251">PythonAuthenHandler</a> -<dt><a href="dir-handlers-auzh.html#l2h-252">PythonAuthzHandler</a> -<dt><a href="dir-other-par.html#l2h-268">PythonAutoReload</a> -<dt><a href="dir-handlers-pch.html#l2h-257">PythonCleanupHandler</a> -<dt><a href="dir-conn-ch.html#l2h-260">PythonConnectionHandler</a> -<dt><a href="dir-other-pd.html#l2h-262">PythonDebug</a> -<dt><a href="dir-other-epd.html#l2h-261">PythonEnablePdb</a> -<dt><a href="dir-handlers-fuh.html#l2h-254">PythonFixupHandler</a> -<dt><a href="dir-handlers-ph.html#l2h-255">PythonHandler</a> -<dt><a href="dir-other-phm.html#l2h-267">PythonHandlerModule</a> -<dt><a href="dir-handlers-hph.html#l2h-248">PythonHeaderParserHandler</a> -<dt><a href="dir-other-pimp.html#l2h-263">PythonImport</a> -<dt><a href="dir-handlers-pih.html#l2h-249">PythonInitHandler</a> -<dt><a href="dir-filter-if.html#l2h-258">PythonInputFilter</a> -<dt><a href="dir-other-ipd.html#l2h-264">PythonInterpPerDirectory</a> -<dt><a href="dir-other-pi.html#l2h-266">PythonInterpreter</a> -<dt><a href="dir-handlers-plh.html#l2h-256">PythonLogHandler</a> -<dt><a href="dir-other-pomz.html#l2h-269">PythonOptimize</a> -<dt><a href="dir-other-po.html#l2h-270">PythonOption</a> -<dt><a href="dir-filter-of.html#l2h-259">PythonOutputFilter</a> -<dt><a href="dir-other-pp.html#l2h-271">PythonPath</a> -<dt><a href="dir-handlers-prrh.html#l2h-245">PythonPostReadRequestHandler</a> -<dt><a href="dir-other-ipdv.html#l2h-265">PythonPythonInterpPerDirective</a> -<dt><a href="dir-handlers-th.html#l2h-247">PythonTransHandler</a> -<dt><a href="dir-handlers-tph.html#l2h-253">PythonTypeHandler</a> +<dl compact='compact'> +<dt><a href="dir-handlers-ach.html#l2h-273">PythonAccessHandler</a> +<dt><a href="dir-handlers-auh.html#l2h-274">PythonAuthenHandler</a> +<dt><a href="dir-handlers-auzh.html#l2h-275">PythonAuthzHandler</a> +<dt><a href="dir-other-par.html#l2h-291">PythonAutoReload</a> +<dt><a href="dir-handlers-pch.html#l2h-280">PythonCleanupHandler</a> +<dt><a href="dir-conn-ch.html#l2h-283">PythonConnectionHandler</a> +<dt><a href="dir-other-pd.html#l2h-285">PythonDebug</a> +<dt><a href="dir-other-epd.html#l2h-284">PythonEnablePdb</a> +<dt><a href="dir-handlers-fuh.html#l2h-277">PythonFixupHandler</a> +<dt><a href="dir-handlers-ph.html#l2h-278">PythonHandler</a> +<dt><a href="dir-other-phm.html#l2h-290">PythonHandlerModule</a> +<dt><a href="dir-handlers-hph.html#l2h-271">PythonHeaderParserHandler</a> +<dt><a href="dir-other-pimp.html#l2h-286">PythonImport</a> +<dt><a href="dir-handlers-pih.html#l2h-272">PythonInitHandler</a> +<dt><a href="dir-filter-if.html#l2h-281">PythonInputFilter</a> +<dt><a href="dir-other-ipd.html#l2h-287">PythonInterpPerDirectory</a> +<dt><a href="dir-other-pi.html#l2h-289">PythonInterpreter</a> +<dt><a href="dir-handlers-plh.html#l2h-279">PythonLogHandler</a> +<dt><a href="dir-other-pomz.html#l2h-292">PythonOptimize</a> +<dt><a href="dir-other-po.html#l2h-293">PythonOption</a> +<dt><a href="dir-filter-of.html#l2h-282">PythonOutputFilter</a> +<dt><a href="dir-other-pp.html#l2h-294">PythonPath</a> +<dt><a href="dir-handlers-prrh.html#l2h-268">PythonPostReadRequestHandler</a> +<dt><a href="dir-other-ipdv.html#l2h-288">PythonPythonInterpPerDirective</a> +<dt><a href="dir-handlers-th.html#l2h-270">PythonTransHandler</a> +<dt><a href="dir-handlers-tph.html#l2h-276">PythonTypeHandler</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-q">Q</a></h2> +<hr /> +<h2 id="letter-q">Q</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-129">QUERY_ARGS (environment variable)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-143">QUERY_ARGS (environment variable)</a> </dl> </td><td width="50%"> - +<dl compact='compact'> +</dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-r">R</a></h2> +<hr /> +<h2 id="letter-r">R</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-91">range (request attribute)</a> -<dt><a href="pyapi-mpconn-meth.html#l2h-131">read() (connection method)</a> -<dt><a href="pyapi-mpfilt-meth.html#l2h-153">read() (filter method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-58">read() (request method)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-95">read_body (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-96">read_chunked (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-94">read_length (request attribute)</a> -<dt><a href="pyapi-mpconn-meth.html#l2h-132">readline() (connection method)</a> -<dt><a href="pyapi-mpfilt-meth.html#l2h-154">readline() (filter method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-59">readline() (request method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-60">readlines() (request method)</a> -<dt><a href="pyapi-util-funcs.html#l2h-205">redirect() (in module util)</a> -<dt><a href="pyapi-psp.html#l2h-241">redirect() (PSPInstance method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-61">register_cleanup() (request method)</a> -<dt><a href="pyapi-apmeth.html#l2h-35">register_cleanup() (server method)</a>, - <a href="pyapi-mpsrv-meth.html#l2h-167">[Link]</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-93">remaining (request attribute)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-136">remote_addr (connection attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-105">range (request attribute)</a> +<dt><a href="pyapi-mpconn-meth.html#l2h-146">read() (connection method)</a> +<dt><a href="pyapi-mpfilt-meth.html#l2h-168">read() (filter method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-67">read() (request method)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-109">read_body (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-110">read_chunked (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-108">read_length (request attribute)</a> +<dt><a href="pyapi-mpconn-meth.html#l2h-147">readline() (connection method)</a> +<dt><a href="pyapi-mpfilt-meth.html#l2h-169">readline() (filter method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-68">readline() (request method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-69">readlines() (request method)</a> +<dt><a href="pyapi-util-funcs.html#l2h-227">redirect() (in module util)</a> +<dt><a href="pyapi-psp.html#l2h-264">redirect() (PSPInterface method)</a> +<dt><a href="pyapi-apmeth.html#l2h-36">register_cleanup() (in module apache)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-70">register_cleanup() (request method)</a> +<dt><a href="pyapi-mpsrv-meth.html#l2h-183">register_cleanup() (server method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-71">register_input_filter() (request method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-72">register_output_filter() (request method)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpconn-mem.html#l2h-148">REMOTE_ADDR (environment variable)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-138">remote_host (connection attribute)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-149">REMOTE_HOST (environment variable)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-150">REMOTE_IDENT (environment variable)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-137">remote_ip (connection attribute)</a> -<dt><a href="pyapi-mpconn-mem.html#l2h-139">remote_logname (connection attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-126">REMOTE_USER (environment variable)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-107">remaining (request attribute)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-151">remote_addr (connection attribute)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-163">REMOTE_ADDR (environment variable)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-153">remote_host (connection attribute)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-164">REMOTE_HOST (environment variable)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-165">REMOTE_IDENT (environment variable)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-152">remote_ip (connection attribute)</a> +<dt><a href="pyapi-mpconn-mem.html#l2h-154">remote_logname (connection attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-140">REMOTE_USER (environment variable)</a> <dt><a href="pyapi-handler.html#l2h-26">req</a> -<dt><a href="pyapi-mpfilt-mem.html#l2h-161">req (filter attribute)</a> -<dt><a href="pyapi-mprequest.html#l2h-44">request</a><dl compact> +<dt><a href="pyapi-mpfilt-mem.html#l2h-176">req (filter attribute)</a> +<dt><a href="pyapi-mprequest.html#l2h-47">request</a><dl compact='compact'> <dt><a href="pyapi-handler.html#l2h-24">handler</a> <dt><a href="pyapi-handler.html#l2h-25">object</a> </dl> -<dt><a href="pyapi-mprequest-mem.html#l2h-125">REQUEST_METHOD (environment variable)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-79">request_time (request attribute)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-57">requires() (request method)</a> -<dt><a href="pyapi-psp.html#l2h-236">run() (PSP method)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-139">REQUEST_METHOD (environment variable)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-93">request_time (request attribute)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-66">requires() (request method)</a> +<dt><a href="pyapi-psp.html#l2h-259">run() (PSP method)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-s">S</a></h2> +<hr /> +<h2 id="letter-s">S</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-sess-classes.html#l2h-225">save() (BaseSession method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-62">sendfile() (request method)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-87">sent_bodyct (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-68">server (request attribute)</a> -<dt><a href="pyapi-mpserver.html#l2h-164">server object</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-170">server_admin (server attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-171">server_hostname (server attribute)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-187">SERVER_NAME (environment variable)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-188">SERVER_PORT (environment variable)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-124">SERVER_PROTOCOL (environment variable)</a> -<dt><a href="pyapi-apmeth.html#l2h-37">server_root() (in module apache)</a> +<dl compact='compact'> +<dt><a href="pyapi-sess-classes.html#l2h-248">save() (BaseSession method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-73">sendfile() (request method)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-101">sent_bodyct (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-82">server (request attribute)</a> +<dt><a href="pyapi-mpserver.html#l2h-179">server object</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-186">server_admin (server attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-187">server_hostname (server attribute)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-203">SERVER_NAME (environment variable)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-204">SERVER_PORT (environment variable)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-138">SERVER_PROTOCOL (environment variable)</a> +<dt><a href="pyapi-apmeth.html#l2h-38">server_root() (in module apache)</a> +<dt><a href="pyapi-sess.html">Session (extension module)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-sess.html">Session (extension module)</a> -<dt><a href="pyapi-sess-classes.html#l2h-215">Session() (in module Session)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-66">set_content_length() (request method)</a> -<dt><a href="pyapi-psp.html#l2h-239">set_error_page() (PSPInstance method)</a> -<dt><a href="pyapi-sess-classes.html#l2h-222">set_timeout() (BaseSession method)</a> -<dt><a href="pyapi-cookie-classes.html#l2h-209">SignedCookie (class in Cookie)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-63">ssl_var_lookup() (request method)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-81">status (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-80">status_line (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-101">subprocess_env (request attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-sess-classes.html#l2h-238">Session() (in module Session)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-80">set_content_length() (request method)</a> +<dt><a href="pyapi-psp.html#l2h-262">set_error_page() (PSPInterface method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-74">set_etag() (request method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-75">set_last_modified() (request method)</a> +<dt><a href="pyapi-sess-classes.html#l2h-245">set_timeout() (BaseSession method)</a> +<dt><a href="pyapi-cookie-classes.html#l2h-231">SignedCookie (class in Cookie)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-76">ssl_var_lookup() (request method)</a> +<dt><a href="pyapi-apmeth.html#l2h-35">stat() (in module apache)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-95">status (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-94">status_line (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-115">subprocess_env (request attribute)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-t">T</a></h2> +<hr /> +<h2 id="letter-t">T</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mptable.html#l2h-43">table</a> -<dt><a href="pyapi-mptable.html#l2h-41">table (class in apache)</a> -<dt><a href="pyapi-mptable.html#l2h-40">table object</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-72">the_request (request attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mptable.html#l2h-46">table</a> +<dt><a href="pyapi-mptable.html#l2h-44">table (class in apache)</a> +<dt><a href="pyapi-mptable.html#l2h-43">table object</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-86">the_request (request attribute)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-sess-classes.html#l2h-221">timeout() (BaseSession method)</a> -<dt><a href="pyapi-mpsrv-mem.html#l2h-178">timeout (server attribute)</a> -<dt><a href="pyapi-util-fstor-fld.html#l2h-199">type (Field attribute)</a> -<dt><a href="pyapi-util-fstor-fld.html#l2h-200">type_options (Field attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-sess-classes.html#l2h-244">timeout() (BaseSession method)</a> +<dt><a href="pyapi-mpsrv-mem.html#l2h-194">timeout (server attribute)</a> +<dt><a href="pyapi-util-fstor-fld.html#l2h-221">type (Field attribute)</a> +<dt><a href="pyapi-util-fstor-fld.html#l2h-222">type_options (Field attribute)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-u">U</a></h2> +<hr /> +<h2 id="letter-u">U</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>UNIX <dd> - <dl compact> + <dl compact='compact'> <dt><a href="installation.html#l2h-1">installation</a> </dl> -<dt><a href="pyapi-sess-classes.html#l2h-229">unlock() (BaseSession method)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-114">unparsed_uri (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-115">uri (request attribute)</a> +<dt><a href="pyapi-sess-classes.html#l2h-252">unlock() (BaseSession method)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-128">unparsed_uri (request attribute)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-77">update_mtime() (request method)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mprequest-mem.html#l2h-122">used_path_info (request attribute)</a> -<dt><a href="pyapi-mprequest-mem.html#l2h-110">user (request attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-mprequest-mem.html#l2h-129">uri (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-136">used_path_info (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-124">user (request attribute)</a> <dt><a href="pyapi-util.html">util (extension module)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-v">V</a></h2> +<hr /> +<h2 id="letter-v">V</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-util-fstor-fld.html#l2h-196">value (Field attribute)</a> +<dl compact='compact'> +<dt><a href="pyapi-util-fstor-fld.html#l2h-218">value (Field attribute)</a> <dt>version 2.x <dd> - <dl compact> - <dt><a href="app-changes.html#l2h-277">Changes from</a> + <dl compact='compact'> + <dt><a href="app-changes-from-2.x.html#l2h-301">Changes from</a> </dl> <dt>version 3.1.4 <dd> - <dl compact> - <dt><a href="node100.html#l2h-276">Changes from</a> + <dl compact='compact'> + <dt><a href="app-changes-from-3.1.4.html#l2h-300">Changes from</a> + </dl> +<dt>version 3.2.10 +<dd> + <dl compact='compact'> + <dt><a href="app-changes-from-3.2.10.html#l2h-297">Changes from</a> </dl></dl> </td><td width="50%"> -<dl compact> +<dl compact='compact'> <dt>version 3.2.7 <dd> - <dl compact> - <dt><a href="node99.html#l2h-275">Changes from</a> + <dl compact='compact'> + <dt><a href="app-changes-from-3.2.7.html#l2h-299">Changes from</a> </dl> <dt>version 3.2.8 <dd> - <dl compact> - <dt><a href="node98.html#l2h-274">Changes from</a> + <dl compact='compact'> + <dt><a href="app-changes.html#l2h-298">Changes from</a> </dl> -<dt><a href="pyapi-mprequest-mem.html#l2h-109">vlist_validator (request attribute)</a> +<dt><a href="pyapi-mprequest-mem.html#l2h-123">vlist_validator (request attribute)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-w">W</a></h2> +<hr /> +<h2 id="letter-w">W</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpsrv-mem.html#l2h-173">wild_names (server attribute)</a> -<dt><a href="pyapi-mpconn-meth.html#l2h-133">write() (connection method)</a> +<dl compact='compact'> +<dt><a href="pyapi-mpsrv-mem.html#l2h-189">wild_names (server attribute)</a> +<dt><a href="pyapi-mpconn-meth.html#l2h-148">write() (connection method)</a> </dl> </td><td width="50%"> -<dl compact> -<dt><a href="pyapi-mpfilt-meth.html#l2h-155">write() (filter method)</a> -<dt><a href="pyapi-mprequest-meth.html#l2h-64">write() (request method)</a> +<dl compact='compact'> +<dt><a href="pyapi-mpfilt-meth.html#l2h-170">write() (filter method)</a> +<dt><a href="pyapi-mprequest-meth.html#l2h-78">write() (request method)</a> </dl> </td> </tr></table> -<p> - -<hr> -<h2><a name="letter-z">Z</a></h2> +<hr /> +<h2 id="letter-z">Z</h2> <table width="100%"><tr valign="top"><td width="50%"> -<dl compact> -<dt><a href="app-changes.html#l2h-279">ZPublisher</a> +<dl compact='compact'> +<dt><a href="app-changes-from-2.x.html#l2h-303">ZPublisher</a> </dl> </td><td width="50%"> - +<dl compact='compact'> +</dl> </td> </tr></table> -<p> - <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="D. Changes from Previous" - rel="prev" title="D. Changes from Previous" - href="app-changes.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="About this document ..." - rel="next" title="About this document ..." - href="about.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="E. Changes from Previous" + href="app-changes-from-2.x.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="About this document ..." + href="about.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="app-changes.html">D. Changes from Previous</A> +<a class="sectref" rel="prev" href="app-changes-from-2.x.html">E. Changes from Previous</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="about.html">About this document ...</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/hand-cgi.html b/doc-html/hand-cgi.html index 166089687d45cb3609b9af4ea57902f177fc2895..cc9bcbda50edc7504676360661c68a18da5f8046 100644 --- a/doc-html/hand-cgi.html +++ b/doc-html/hand-cgi.html @@ -1,62 +1,61 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="hand-psp.html"> -<LINK REL="parent" href="handlers.html"> -<LINK REL="next" HREF="node98.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="CGI Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.3 CGI Handler</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="hand-psp.html" /> +<link rel="parent" href="handlers.html" /> +<link rel="next" href="security.html" /> +<meta name='aesop' content='information' /> +<title>7.3 CGI Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.2 PSP Handler" - href="hand-psp.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6. Standard Handlers" - href="handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="A. Changes from Version" - HREF="node98.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.2 PSP Handler" + href="hand-psp.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7. Standard Handlers" + href="handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="8. Security" + href="security.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-psp.html">6.2 PSP Handler</A> +<a class="sectref" rel="prev" href="hand-psp.html">7.2 PSP Handler</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="handlers.html">6. Standard Handlers</A> +<a class="sectref" rel="parent" href="handlers.html">7. Standard Handlers</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" HREF="node98.html">A. Changes from Version</A> -<br><hr> +<a class="sectref" rel="next" href="security.html">8. Security</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION008300000000000000000"> </A> +<H1><A NAME="SECTION009300000000000000000"></A><A NAME="hand-cgi"></A> <BR> -6.3 CGI Handler +7.3 CGI Handler </H1> <P> -<a name="l2h-273"> </a> +<a id='l2h-296' xml:id='l2h-296'></a> <P> CGI handler is a handler that emulates the CGI environment under mod_python. @@ -114,43 +113,41 @@ value. <P> - <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.2 PSP Handler" - rel="prev" title="6.2 PSP Handler" - href="hand-psp.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6. Standard Handlers" - rel="parent" title="6. Standard Handlers" - href="handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="A. Changes from Version" - rel="next" title="A. Changes from Version" - HREF="node98.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.2 PSP Handler" + href="hand-psp.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7. Standard Handlers" + href="handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="8. Security" + href="security.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-psp.html">6.2 PSP Handler</A> +<a class="sectref" rel="prev" href="hand-psp.html">7.2 PSP Handler</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="handlers.html">6. Standard Handlers</A> +<a class="sectref" rel="parent" href="handlers.html">7. Standard Handlers</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" HREF="node98.html">A. Changes from Version</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="security.html">8. Security</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/hand-psp.html b/doc-html/hand-psp.html index bb46716848730ec0614865bf9507300ebbdb4ef8..34c588892dbef3c410d78b54e585bb3feebc9afc 100644 --- a/doc-html/hand-psp.html +++ b/doc-html/hand-psp.html @@ -1,60 +1,59 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="hand-cgi.html"> -<LINK REL="prev" href="hand-pub.html"> -<LINK REL="parent" href="handlers.html"> -<LINK REL="next" href="hand-cgi.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="PSP Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.2 PSP Handler</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="hand-cgi.html" /> +<link rel="prev" href="hand-pub.html" /> +<link rel="parent" href="handlers.html" /> +<link rel="next" href="hand-cgi.html" /> +<meta name='aesop' content='information' /> +<title>7.2 PSP Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.3 Form Data" - HREF="node95.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6. Standard Handlers" - href="handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.3 CGI Handler" - href="hand-cgi.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.3 Form Data" + href="node103.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7. Standard Handlers" + href="handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.3 CGI Handler" + href="hand-cgi.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="node95.html">6.1.3 Form Data</A> +<a class="sectref" rel="prev" href="node103.html">7.1.3 Form Data</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="handlers.html">6. Standard Handlers</A> +<a class="sectref" rel="parent" href="handlers.html">7. Standard Handlers</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-cgi.html">6.3 CGI Handler</A> -<br><hr> +<a class="sectref" rel="next" href="hand-cgi.html">7.3 CGI Handler</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION008200000000000000000"> </A> -<a name="l2h-272"> </a> +<H1><A NAME="SECTION009200000000000000000"></A><A NAME="hand-psp"></A> +<a id='l2h-295' xml:id='l2h-295'></a> <BR> -6.2 PSP Handler +7.2 PSP Handler </H1> <P> @@ -78,7 +77,14 @@ If <code>PythonDebug</code> server configuration is <code>On</code>, then by appending an underscore ("<tt class="samp">_</tt>") to the end of the url you can get a nice side-by-side listing of original PSP code and resulting Python code generated by the <code>psp</code> module. This is very useful for -debugging. +debugging. You'll need to adjust your httpd configuration: + +<P> +<div class="verbatim"><pre> + AddHandler mod_python .psp .psp_ + PythonHandler mod_python.psp + PythonDebug On +</pre></div> <P> <div class="note"><b class="label">Note:</b> @@ -89,41 +95,40 @@ to display source code of your PSP pages! <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.3 Form Data" - rel="prev" title="6.1.3 Form Data" - HREF="node95.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6. Standard Handlers" - rel="parent" title="6. Standard Handlers" - href="handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.3 CGI Handler" - rel="next" title="6.3 CGI Handler" - href="hand-cgi.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.3 Form Data" + href="node103.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7. Standard Handlers" + href="handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.3 CGI Handler" + href="hand-cgi.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="node95.html">6.1.3 Form Data</A> +<a class="sectref" rel="prev" href="node103.html">7.1.3 Form Data</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="handlers.html">6. Standard Handlers</A> +<a class="sectref" rel="parent" href="handlers.html">7. Standard Handlers</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-cgi.html">6.3 CGI Handler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="hand-cgi.html">7.3 CGI Handler</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/hand-pub-alg-args.html b/doc-html/hand-pub-alg-args.html index 047e0c2bd57a6504abb95a487146338e57f1cf33..875e0f3b708cd1e57117fa4386a507675e8c0229 100644 --- a/doc-html/hand-pub-alg-args.html +++ b/doc-html/hand-pub-alg-args.html @@ -1,59 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="hand-pub-alg-auth.html"> -<LINK REL="prev" href="hand-pub-alg-trav.html"> -<LINK REL="parent" href="hand-pub-alg.html"> -<LINK REL="next" href="hand-pub-alg-auth.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Argument Matching and Invocation"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.1.2.2 Argument Matching and Invocation</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="hand-pub-alg-auth.html" /> +<link rel="prev" href="hand-pub-alg-trav.html" /> +<link rel="parent" href="hand-pub-alg.html" /> +<link rel="next" href="hand-pub-alg-auth.html" /> +<meta name='aesop' content='information' /> +<title>7.1.2.2 Argument Matching and Invocation</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.2.1 Traversal" - href="hand-pub-alg-trav.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.2.3 Authentication" - href="hand-pub-alg-auth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.2.1 Traversal" + href="hand-pub-alg-trav.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.2.3 Authentication" + href="hand-pub-alg-auth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-alg-trav.html">6.1.2.1 Traversal</A> +<a class="sectref" rel="prev" href="hand-pub-alg-trav.html">7.1.2.1 Traversal</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> +<a class="sectref" rel="parent" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-alg-auth.html">6.1.2.3 Authentication</A> -<br><hr> +<a class="sectref" rel="next" href="hand-pub-alg-auth.html">7.1.2.3 Authentication</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION008122000000000000000"> </A> +<H3><A NAME="SECTION009122000000000000000"></A><A NAME="hand-pub-alg-args"></A> <BR> -6.1.2.2 Argument Matching and Invocation +7.1.2.2 Argument Matching and Invocation </H3> <P> @@ -75,41 +74,40 @@ representation is returned to the client. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.2.1 Traversal" - rel="prev" title="6.1.2.1 Traversal" - href="hand-pub-alg-trav.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1.2 The Publishing Algorithm" - rel="parent" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.2.3 Authentication" - rel="next" title="6.1.2.3 Authentication" - href="hand-pub-alg-auth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.2.1 Traversal" + href="hand-pub-alg-trav.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.2.3 Authentication" + href="hand-pub-alg-auth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-alg-trav.html">6.1.2.1 Traversal</A> +<a class="sectref" rel="prev" href="hand-pub-alg-trav.html">7.1.2.1 Traversal</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> +<a class="sectref" rel="parent" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-alg-auth.html">6.1.2.3 Authentication</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="hand-pub-alg-auth.html">7.1.2.3 Authentication</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/hand-pub-alg-auth.html b/doc-html/hand-pub-alg-auth.html index 00a97b32606f8648b221b3ce076d6d8429caf512..5cbf92268692cc97b864b6821f868f871bdcf4e8 100644 --- a/doc-html/hand-pub-alg-auth.html +++ b/doc-html/hand-pub-alg-auth.html @@ -1,58 +1,57 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="hand-pub-alg-args.html"> -<LINK REL="parent" href="hand-pub-alg.html"> -<LINK REL="next" HREF="node95.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Authentication"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.1.2.3 Authentication</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="hand-pub-alg-args.html" /> +<link rel="parent" href="hand-pub-alg.html" /> +<link rel="next" href="node103.html" /> +<meta name='aesop' content='information' /> +<title>7.1.2.3 Authentication</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.2.2 Argument Matching and" - href="hand-pub-alg-args.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.3 Form Data" - HREF="node95.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.2.2 Argument Matching and" + href="hand-pub-alg-args.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.3 Form Data" + href="node103.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-alg-args.html">6.1.2.2 Argument Matching and</A> +<a class="sectref" rel="prev" href="hand-pub-alg-args.html">7.1.2.2 Argument Matching and</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> +<a class="sectref" rel="parent" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" HREF="node95.html">6.1.3 Form Data</A> -<br><hr> +<a class="sectref" rel="next" href="node103.html">7.1.3 Form Data</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION008123000000000000000"> </A> +<H3><A NAME="SECTION009123000000000000000"></A><A NAME="hand-pub-alg-auth"></A> <BR> -6.1.2.3 Authentication +7.1.2.3 Authentication </H3> <P> @@ -113,20 +112,20 @@ In the example below, only user "<tt class="samp">eggs</tt>" with password "<tt def __auth__(req, user, passwd): - if user == "eggs" and passwd == "spam" or \ - user == "joe" and passwd == "eoj": - return 1 - else: - return 0 + if user == "eggs" and passwd == "spam" or \ + user == "joe" and passwd == "eoj": + return 1 + else: + return 0 def __access__(req, user): - if user == "eggs": - return 1 - else: - return 0 + if user == "eggs": + return 1 + else: + return 0 def hello(req): - return "hello" + return "hello" </pre></div> <P> @@ -139,7 +138,7 @@ Here is the same functionality, but using an alternative technique: __access__ = ["eggs"] def hello(req): - return "hello" + return "hello" </pre></div> <P> @@ -151,16 +150,16 @@ the function, e.g.: <div class="verbatim"><pre> def sensitive(req): - def __auth__(req, user, password): - if user == 'spam' and password == 'eggs': - # let them in - return 1 - else: - # no access - return 0 + def __auth__(req, user, password): + if user == 'spam' and password == 'eggs': + # let them in + return 1 + else: + # no access + return 0 - # something involving sensitive information - return 'sensitive information` + # something involving sensitive information + return 'sensitive information` </pre></div> <P> @@ -195,41 +194,40 @@ being accessed, use other authentication mechanisms, e.g. the Apache <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.2.2 Argument Matching and" - rel="prev" title="6.1.2.2 Argument Matching and" - href="hand-pub-alg-args.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1.2 The Publishing Algorithm" - rel="parent" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.3 Form Data" - rel="next" title="6.1.3 Form Data" - HREF="node95.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.2.2 Argument Matching and" + href="hand-pub-alg-args.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.3 Form Data" + href="node103.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-alg-args.html">6.1.2.2 Argument Matching and</A> +<a class="sectref" rel="prev" href="hand-pub-alg-args.html">7.1.2.2 Argument Matching and</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> +<a class="sectref" rel="parent" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" HREF="node95.html">6.1.3 Form Data</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="node103.html">7.1.3 Form Data</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/hand-pub-alg-trav.html b/doc-html/hand-pub-alg-trav.html index 91d63afe7f8461f341c14c6a9d8a5ce383853570..c86beea178829500a18d60b281cf241bb0c92954 100644 --- a/doc-html/hand-pub-alg-trav.html +++ b/doc-html/hand-pub-alg-trav.html @@ -1,59 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="hand-pub-alg-args.html"> -<LINK REL="prev" href="hand-pub-alg.html"> -<LINK REL="parent" href="hand-pub-alg.html"> -<LINK REL="next" href="hand-pub-alg-args.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Traversal"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.1.2.1 Traversal</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="hand-pub-alg-args.html" /> +<link rel="prev" href="hand-pub-alg.html" /> +<link rel="parent" href="hand-pub-alg.html" /> +<link rel="next" href="hand-pub-alg-args.html" /> +<meta name='aesop' content='information' /> +<title>7.1.2.1 Traversal</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.2.2 Argument Matching and" - href="hand-pub-alg-args.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.2.2 Argument Matching and" + href="hand-pub-alg-args.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> +<a class="sectref" rel="prev" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> +<a class="sectref" rel="parent" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-alg-args.html">6.1.2.2 Argument Matching and</A> -<br><hr> +<a class="sectref" rel="next" href="hand-pub-alg-args.html">7.1.2.2 Argument Matching and</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION008121000000000000000"> </A> +<H3><A NAME="SECTION009121000000000000000"></A><A NAME="hand-pub-alg-trav"></A> <BR> -6.1.2.1 Traversal +7.1.2.1 Traversal </H3> <P> @@ -112,8 +111,8 @@ For example, given the following configuration: DocumentRoot /some/dir <Directory /some/dir> - SetHandler mod_python - PythonHandler mod_python.publisher + SetHandler mod_python + PythonHandler mod_python.publisher </Directory> </pre></div> @@ -123,12 +122,10 @@ And the following <span class="file">/some/dir/index.py</span> file: <P> <div class="verbatim"><pre> def index(req): - - return "We are in index()" + return "We are in index()" def hello(req): - - return "We are in hello()" + return "We are in hello()" </pre></div> <P> @@ -147,41 +144,40 @@ http://www.somehost/spam will return "<tt class="samp">404 Not Found</tt>" <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.2 The Publishing Algorithm" - rel="prev" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1.2 The Publishing Algorithm" - rel="parent" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.2.2 Argument Matching and" - rel="next" title="6.1.2.2 Argument Matching and" - href="hand-pub-alg-args.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.2.2 Argument Matching and" + href="hand-pub-alg-args.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> +<a class="sectref" rel="prev" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> +<a class="sectref" rel="parent" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-alg-args.html">6.1.2.2 Argument Matching and</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="hand-pub-alg-args.html">7.1.2.2 Argument Matching and</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/hand-pub-alg.html b/doc-html/hand-pub-alg.html index 3263257126b4643953d37e3a663c243d0ba274b7..f0bf5105fbb87bb7dbfbeb637c02dcc484a48ec5 100644 --- a/doc-html/hand-pub-alg.html +++ b/doc-html/hand-pub-alg.html @@ -1,59 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" HREF="node95.html"> -<LINK REL="prev" href="hand-pub-intro.html"> -<LINK REL="parent" href="hand-pub.html"> -<LINK REL="next" href="hand-pub-alg-trav.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="The Publishing Algorithm"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.1.2 The Publishing Algorithm</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="node103.html" /> +<link rel="prev" href="hand-pub-intro.html" /> +<link rel="parent" href="hand-pub.html" /> +<link rel="next" href="hand-pub-alg-trav.html" /> +<meta name='aesop' content='information' /> +<title>7.1.2 The Publishing Algorithm</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.1 Introduction" - href="hand-pub-intro.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.2.1 Traversal" - href="hand-pub-alg-trav.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.1 Introduction" + href="hand-pub-intro.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.2.1 Traversal" + href="hand-pub-alg-trav.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-intro.html">6.1.1 Introduction</A> +<a class="sectref" rel="prev" href="hand-pub-intro.html">7.1.1 Introduction</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub.html">6.1 Publisher Handler</A> +<a class="sectref" rel="parent" href="hand-pub.html">7.1 Publisher Handler</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-alg-trav.html">6.1.2.1 Traversal</A> -<br><hr> +<a class="sectref" rel="next" href="hand-pub-alg-trav.html">7.1.2.1 Traversal</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION008120000000000000000"> </A> +<H2><A NAME="SECTION009120000000000000000"></A><A NAME="hand-pub-alg"></A> <BR> -6.1.2 The Publishing Algorithm +7.1.2 The Publishing Algorithm </H2> <P> @@ -64,53 +63,54 @@ return value. <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> -<LI><A href="hand-pub-alg-trav.html">6.1.2.1 Traversal</a> -<LI><A href="hand-pub-alg-args.html">6.1.2.2 Argument Matching and Invocation</a> -<LI><A href="hand-pub-alg-auth.html">6.1.2.3 Authentication</a> +<LI><A href="hand-pub-alg-trav.html">7.1.2.1 Traversal</a> +<LI><A href="hand-pub-alg-args.html">7.1.2.2 Argument Matching and Invocation</a> +<LI><A href="hand-pub-alg-auth.html">7.1.2.3 Authentication</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1.1 Introduction" - rel="prev" title="6.1.1 Introduction" - href="hand-pub-intro.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1 Publisher Handler" - rel="parent" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.2.1 Traversal" - rel="next" title="6.1.2.1 Traversal" - href="hand-pub-alg-trav.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1.1 Introduction" + href="hand-pub-intro.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.2.1 Traversal" + href="hand-pub-alg-trav.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-intro.html">6.1.1 Introduction</A> +<a class="sectref" rel="prev" href="hand-pub-intro.html">7.1.1 Introduction</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub.html">6.1 Publisher Handler</A> +<a class="sectref" rel="parent" href="hand-pub.html">7.1 Publisher Handler</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-alg-trav.html">6.1.2.1 Traversal</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="hand-pub-alg-trav.html">7.1.2.1 Traversal</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/hand-pub-intro.html b/doc-html/hand-pub-intro.html index 83782a85b739786ddf8837bd33a914c226c433c2..d9ab56ffa4d31f29530eef65cd35b1c91337bed5 100644 --- a/doc-html/hand-pub-intro.html +++ b/doc-html/hand-pub-intro.html @@ -1,59 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="hand-pub-alg.html"> -<LINK REL="prev" href="hand-pub.html"> -<LINK REL="parent" href="hand-pub.html"> -<LINK REL="next" href="hand-pub-alg.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Introduction"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.1.1 Introduction</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="hand-pub-alg.html" /> +<link rel="prev" href="hand-pub.html" /> +<link rel="parent" href="hand-pub.html" /> +<link rel="next" href="hand-pub-alg.html" /> +<meta name='aesop' content='information' /> +<title>7.1.1 Introduction</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub.html">6.1 Publisher Handler</A> +<a class="sectref" rel="prev" href="hand-pub.html">7.1 Publisher Handler</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub.html">6.1 Publisher Handler</A> +<a class="sectref" rel="parent" href="hand-pub.html">7.1 Publisher Handler</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> -<br><hr> +<a class="sectref" rel="next" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION008110000000000000000"> </A> +<H2><A NAME="SECTION009110000000000000000"></A><A NAME="hand-pub-intro"></A> <BR> -6.1.1 Introduction +7.1.1 Introduction </H2> <P> @@ -62,7 +61,7 @@ To use the handler, you need the following lines in your configuration <Directory /some/path> SetHandler mod_python PythonHandler mod_python.publisher - </Directory> + </Directory> </pre></div> <P> @@ -75,7 +74,7 @@ via URL's. For example, if you have the following module, called """ Publisher example """ def say(req, what="NOTHING"): - return "I am saying %s" % what + return "I am saying %s" % what </pre></div> <P> @@ -87,41 +86,40 @@ return "<tt class="samp">I am saying hello</tt>". <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6.1 Publisher Handler" - rel="prev" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1 Publisher Handler" - rel="parent" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.2 The Publishing Algorithm" - rel="next" title="6.1.2 The Publishing Algorithm" - href="hand-pub-alg.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.2 The Publishing Algorithm" + href="hand-pub-alg.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub.html">6.1 Publisher Handler</A> +<a class="sectref" rel="prev" href="hand-pub.html">7.1 Publisher Handler</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub.html">6.1 Publisher Handler</A> +<a class="sectref" rel="parent" href="hand-pub.html">7.1 Publisher Handler</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/hand-pub.html b/doc-html/hand-pub.html index f60d5cff6c6196a25a7c3888fe8fed239d8d46ce..86a7104214da842ab9564443405e424ba51a3e58 100644 --- a/doc-html/hand-pub.html +++ b/doc-html/hand-pub.html @@ -1,59 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="hand-psp.html"> -<LINK REL="prev" href="handlers.html"> -<LINK REL="parent" href="handlers.html"> -<LINK REL="next" href="hand-pub-intro.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Publisher Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.1 Publisher Handler</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="hand-psp.html" /> +<link rel="prev" href="handlers.html" /> +<link rel="parent" href="handlers.html" /> +<link rel="next" href="hand-pub-intro.html" /> +<meta name='aesop' content='information' /> +<title>7.1 Publisher Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6. Standard Handlers" - href="handlers.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6. Standard Handlers" - href="handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.1 Introduction" - href="hand-pub-intro.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7. Standard Handlers" + href="handlers.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7. Standard Handlers" + href="handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.1 Introduction" + href="hand-pub-intro.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="handlers.html">6. Standard Handlers</A> +<a class="sectref" rel="prev" href="handlers.html">7. Standard Handlers</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="handlers.html">6. Standard Handlers</A> +<a class="sectref" rel="parent" href="handlers.html">7. Standard Handlers</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-intro.html">6.1.1 Introduction</A> -<br><hr> +<a class="sectref" rel="next" href="hand-pub-intro.html">7.1.1 Introduction</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION008100000000000000000"> </A> +<H1><A NAME="SECTION009100000000000000000"></A><A NAME="hand-pub"></A> <BR> -6.1 Publisher Handler +7.1 Publisher Handler </H1> <P> @@ -66,58 +65,59 @@ by <em class="citetitle"><a <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> -<LI><A href="hand-pub-intro.html">6.1.1 Introduction</a> -<LI><A href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</a> +<LI><A href="hand-pub-intro.html">7.1.1 Introduction</a> +<LI><A href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</a> <UL> -<LI><A href="hand-pub-alg-trav.html">6.1.2.1 Traversal</a> -<LI><A href="hand-pub-alg-args.html">6.1.2.2 Argument Matching and Invocation</a> -<LI><A href="hand-pub-alg-auth.html">6.1.2.3 Authentication</a> +<LI><A href="hand-pub-alg-trav.html">7.1.2.1 Traversal</a> +<LI><A href="hand-pub-alg-args.html">7.1.2.2 Argument Matching and Invocation</a> +<LI><A href="hand-pub-alg-auth.html">7.1.2.3 Authentication</a> </ul> -<LI><A href="node95.html">6.1.3 Form Data</a> +<LI><A href="node103.html">7.1.3 Form Data</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="6. Standard Handlers" - rel="prev" title="6. Standard Handlers" - href="handlers.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6. Standard Handlers" - rel="parent" title="6. Standard Handlers" - href="handlers.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1.1 Introduction" - rel="next" title="6.1.1 Introduction" - href="hand-pub-intro.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="7. Standard Handlers" + href="handlers.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7. Standard Handlers" + href="handlers.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1.1 Introduction" + href="hand-pub-intro.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="handlers.html">6. Standard Handlers</A> +<a class="sectref" rel="prev" href="handlers.html">7. Standard Handlers</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="handlers.html">6. Standard Handlers</A> +<a class="sectref" rel="parent" href="handlers.html">7. Standard Handlers</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub-intro.html">6.1.1 Introduction</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="hand-pub-intro.html">7.1.1 Introduction</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/handlers.html b/doc-html/handlers.html index 78c1e7b97d2112e8164c53664b3c31050fbaeefd..f09e50596b38840a4d37fae5c361c19ac91ff39b 100644 --- a/doc-html/handlers.html +++ b/doc-html/handlers.html @@ -1,120 +1,120 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" HREF="node98.html"> -<LINK REL="prev" href="directives.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="hand-pub.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT=". Standard Handlers"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6. Standard Handlers</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="security.html" /> +<link rel="prev" href="ssi.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="hand-pub.html" /> +<meta name='aesop' content='information' /> +<title>7. Standard Handlers</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.11 PythonPath" - href="dir-other-pp.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="6.6 Enabling INCLUDES Filter" + href="ssi-output-filter.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="dir-other-pp.html">5.4.11 PythonPath</A> +<a class="sectref" rel="prev" href="ssi-output-filter.html">6.6 Enabling INCLUDES Filter</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub.html">6.1 Publisher Handler</A> -<br><hr> +<a class="sectref" rel="next" href="hand-pub.html">7.1 Publisher Handler</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION008000000000000000000"> </A> +<H1><A NAME="SECTION009000000000000000000"></A><A NAME="handlers"></A> <BR> -6. Standard Handlers +7. Standard Handlers </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> -<LI><A href="hand-pub.html">6.1 Publisher Handler</a> +<LI><A href="hand-pub.html">7.1 Publisher Handler</a> <UL> -<LI><A href="hand-pub-intro.html">6.1.1 Introduction</a> -<LI><A href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</a> +<LI><A href="hand-pub-intro.html">7.1.1 Introduction</a> +<LI><A href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</a> <UL> -<LI><A href="hand-pub-alg-trav.html">6.1.2.1 Traversal</a> -<LI><A href="hand-pub-alg-args.html">6.1.2.2 Argument Matching and Invocation</a> -<LI><A href="hand-pub-alg-auth.html">6.1.2.3 Authentication</a> +<LI><A href="hand-pub-alg-trav.html">7.1.2.1 Traversal</a> +<LI><A href="hand-pub-alg-args.html">7.1.2.2 Argument Matching and Invocation</a> +<LI><A href="hand-pub-alg-auth.html">7.1.2.3 Authentication</a> </ul> -<LI><A href="node95.html">6.1.3 Form Data</a> +<LI><A href="node103.html">7.1.3 Form Data</a> </ul> -<LI><A href="hand-psp.html">6.2 PSP Handler</a> -<LI><A href="hand-cgi.html">6.3 CGI Handler</a> +<LI><A href="hand-psp.html">7.2 PSP Handler</a> +<LI><A href="hand-cgi.html">7.3 CGI Handler</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="5.4.11 PythonPath" - rel="prev" title="5.4.11 PythonPath" - href="dir-other-pp.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.1 Publisher Handler" - rel="next" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="6.6 Enabling INCLUDES Filter" + href="ssi-output-filter.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="dir-other-pp.html">5.4.11 PythonPath</A> +<a class="sectref" rel="prev" href="ssi-output-filter.html">6.6 Enabling INCLUDES Filter</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-pub.html">6.1 Publisher Handler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="hand-pub.html">7.1 Publisher Handler</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/icons/pyfav.png b/doc-html/icons/pyfav.png index 2e4165a6a5ad86ee8cea487be9844833b3b60383..d2d8669d512e9cb5d66fe86fe2a53c78049dd339 100644 Binary files a/doc-html/icons/pyfav.png and b/doc-html/icons/pyfav.png differ diff --git a/doc-html/index.gif b/doc-html/index.gif deleted file mode 100644 index 32eecfb4fd4bca98f6601e677fa0e667c3a1efe3..0000000000000000000000000000000000000000 Binary files a/doc-html/index.gif and /dev/null differ diff --git a/doc-html/index.html b/doc-html/index.html index 974452bb9f8f39e9fa05bb8904a557ade5ff9ec1..d9e01d605a2ce5ec615a4bcfcd39330575db793b 100644 --- a/doc-html/index.html +++ b/doc-html/index.html @@ -1,65 +1,65 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="front.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Mod_python Manual"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="front.html" /> +<meta name='aesop' content='information' /> <title>Mod_python Manual</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="next" title="Front Matter" - href="front.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></td> +<td class='online-navigation'><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></td> +<td class='online-navigation'><a rel="next" title="Front Matter" + href="front.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="front.html">Front Matter</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> <P> <div class="titlepage"> -<center> +<div class='center'> <h1>Mod_python Manual</h1> <p><b><font size="+2">Gregory Trubetskoy</font></b></p> <p> E-mail: <span class="email">grisha@apache.org</span> </p> -<p><strong>Release 3.2.10</strong><br> -<strong>July 19, 2006</strong></p> -<p> -</center> +<p><strong>Release 3.3.1</strong><br /> +<strong>January 29, 2007</strong></p> +<p></p> +</div> </div> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"></a> @@ -105,11 +105,12 @@ <LI><A href="module-apache.html">4.5 <tt class="module">apache</tt> - Access to Apache Internals.</a> <UL> <LI><A href="pyapi-apmeth.html">4.5.1 Functions</a> -<LI><A href="pyapi-mptable.html">4.5.2 Table Object (mp_table)<a name="l2h-40"> </a></a> -<LI><A href="pyapi-mprequest.html">4.5.3 Request Object<a name="l2h-44"> </a></a> -<LI><A href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn)<a name="l2h-130"> </a></a> -<LI><A href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter)<a name="l2h-151"> </a></a> -<LI><A href="pyapi-mpserver.html">4.5.6 Server Object (mp_server)<a name="l2h-164"> </a></a> +<LI><A href="pyapi-apmem.html">4.5.2 Attributes</a> +<LI><A href="pyapi-mptable.html">4.5.3 Table Object (mp_table)<a id='l2h-43' xml:id='l2h-43'></a></a> +<LI><A href="pyapi-mprequest.html">4.5.4 Request Object<a id='l2h-47' xml:id='l2h-47'></a></a> +<LI><A href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)<a id='l2h-144' xml:id='l2h-144'></a></a> +<LI><A href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)<a id='l2h-166' xml:id='l2h-166'></a></a> +<LI><A href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)<a id='l2h-179' xml:id='l2h-179'></a></a> </ul> <LI><A href="pyapi-util.html">4.6 <tt class="module">util</tt> - Miscellaneous Utilities</a> <UL> @@ -173,54 +174,67 @@ <LI><A href="dir-other-pp.html">5.4.11 PythonPath</a> </ul> </ul> -<LI><A href="handlers.html">6. Standard Handlers</a> +<LI><A href="ssi.html">6. Server Side Includes</a> +<UL> +<LI><A href="ssi-overview.html">6.1 Overview of SSI</a> +<LI><A href="ssi-python-code.html">6.2 Using Python Code</a> +<LI><A href="ssi-data-scope.html">6.3 Scope of Global Data</a> +<LI><A href="ssi-globals.html">6.4 Pre-propulating Globals</a> +<LI><A href="ssi-conditionals.html">6.5 Conditional Expressions</a> +<LI><A href="ssi-output-filter.html">6.6 Enabling INCLUDES Filter</a> +</ul> +<LI><A href="handlers.html">7. Standard Handlers</a> <UL> -<LI><A href="hand-pub.html">6.1 Publisher Handler</a> +<LI><A href="hand-pub.html">7.1 Publisher Handler</a> <UL> -<LI><A href="hand-pub-intro.html">6.1.1 Introduction</a> -<LI><A href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</a> -<LI><A href="node95.html">6.1.3 Form Data</a> +<LI><A href="hand-pub-intro.html">7.1.1 Introduction</a> +<LI><A href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</a> +<LI><A href="node103.html">7.1.3 Form Data</a> </ul> -<LI><A href="hand-psp.html">6.2 PSP Handler</a> -<LI><A href="hand-cgi.html">6.3 CGI Handler</a> +<LI><A href="hand-psp.html">7.2 PSP Handler</a> +<LI><A href="hand-cgi.html">7.3 CGI Handler</a> </ul> -<LI><A href="node98.html">A. Changes from Version (3.2.8)</a> -<LI><A href="node99.html">B. Changes from Version (3.2.7)</a> -<LI><A href="node100.html">C. Changes from Version (3.1.4)</a> -<LI><A href="app-changes.html">D. Changes from Previous Major Version (2.x)</a> +<LI><A href="security.html">8. Security</a> +<LI><A href="app-changes-from-3.2.10.html">A. Changes from Version (3.2.10)</a> +<LI><A href="app-changes.html">B. Changes from Version (3.2.8)</a> +<LI><A href="app-changes-from-3.2.7.html">C. Changes from Version (3.2.7)</a> +<LI><A href="app-changes-from-3.1.4.html">D. Changes from Version (3.1.4)</a> +<LI><A href="app-changes-from-2.x.html">E. Changes from Previous Major Version (2.x)</a> <LI><A href="genindex.html">Index</a> <LI><A href="about.html">About this document ...</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="next" title="Front Matter" - rel="next" title="Front Matter" - href="front.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></td> +<td class='online-navigation'><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></td> +<td class='online-navigation'><a rel="next" title="Front Matter" + href="front.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="front.html">Front Matter</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/index.png b/doc-html/index.png new file mode 100644 index 0000000000000000000000000000000000000000..cd918afe76ca2913a4de7ac7663211878b0c263f Binary files /dev/null and b/doc-html/index.png differ diff --git a/doc-html/inst-apacheconfig.html b/doc-html/inst-apacheconfig.html index fe6073f44ee92a3a7d72a1fd1f1db1c006bbeca9..b1c30d9af5feb68fc935933f2acea549e8996993 100644 --- a/doc-html/inst-apacheconfig.html +++ b/doc-html/inst-apacheconfig.html @@ -1,56 +1,55 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="inst-makeinstall.html"> -<LINK REL="parent" href="inst-installing.html"> -<LINK REL="next" href="inst-testing.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Configuring Apache"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="inst-makeinstall.html" /> +<link rel="parent" href="inst-installing.html" /> +<link rel="next" href="inst-testing.html" /> +<meta name='aesop' content='information' /> <title>2.3.2 Configuring Apache</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.3.1 Running make install" - href="inst-makeinstall.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2.3 Installing" - href="inst-installing.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.4 Testing" - href="inst-testing.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.3.1 Running make install" + href="inst-makeinstall.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2.3 Installing" + href="inst-installing.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.4 Testing" + href="inst-testing.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-makeinstall.html">2.3.1 Running make install</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="inst-installing.html">2.3 Installing</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-testing.html">2.4 Testing</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION004320000000000000000"> </A> +<H2><A NAME="SECTION004320000000000000000"></A><A NAME="inst-apacheconfig"></A> <BR> 2.3.2 Configuring Apache </H2> @@ -58,7 +57,7 @@ <P> <DL> <DT></DT> -<DD><b>LoadModule</b> <a name="l2h-19"> </a> +<DD><strong>LoadModule</strong> <a id='l2h-19' xml:id='l2h-19'></a> <P> If you compiled mod_python as a DSO, you will need to tell Apache to load the module by adding the following line in the Apache @@ -71,7 +70,7 @@ If you compiled mod_python as a DSO, you will need to tell Apache to </pre></div> <P> -<a name="l2h-22"> </a> +<a id='l2h-22' xml:id='l2h-22'></a> The actual path to <b class="program">mod_python.so</b> may vary, but make install should report at the very end exactly where <b class="program">mod_python.so</b> was placed and how the <code>LoadModule</code> directive should appear. @@ -79,7 +78,7 @@ If you compiled mod_python as a DSO, you will need to tell Apache to <P> </DD> <DT></DT> -<DD><b>Mutex Directory</b> <a name="l2h-20"> </a> +<DD><strong>Mutex Directory</strong> <a id='l2h-20' xml:id='l2h-20'></a> <P> The default directory for mutex lock files is <span class="file">/tmp</span>. The default value can be be specified at compile time using @@ -105,15 +104,15 @@ This may only be used in the server configuration context. It will be ignored if used in a directory, virtual host, htaccess or location context. The most logical place for this directive in your apache configuration file is immediately - following the <b>LoadModule</b> directive. + following the <strong>LoadModule</strong> directive. <P> -<i>Back ported from version 3.3.0</i> +<em>New in version 3.3.0</em> <P> </DD> <DT></DT> -<DD><b>Mutex Locks</b> <a name="l2h-21"> </a> +<DD><strong>Mutex Locks</strong> <a id='l2h-21' xml:id='l2h-21'></a> <P> Mutexes are used in mod_python for session locking. The default value is 8. @@ -155,10 +154,10 @@ This may only be used in the server configuration context. It will be ignored if used in a directory, virtual host, htaccess or location context. The most logical place for this directive in your apache configuration file is immediately - following the <b>LoadModule</b> directive. + following the <strong>LoadModule</strong> directive. <P> -<i>Back ported from version 3.3.0</i> +<em>New in version 3.3.0</em> <P> </DD> @@ -167,41 +166,40 @@ This may only be used in the server configuration context. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.3.1 Running make install" - rel="prev" title="2.3.1 Running make install" - href="inst-makeinstall.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2.3 Installing" - rel="parent" title="2.3 Installing" - href="inst-installing.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.4 Testing" - rel="next" title="2.4 Testing" - href="inst-testing.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.3.1 Running make install" + href="inst-makeinstall.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2.3 Installing" + href="inst-installing.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.4 Testing" + href="inst-testing.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-makeinstall.html">2.3.1 Running make install</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="inst-installing.html">2.3 Installing</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-testing.html">2.4 Testing</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/inst-compiling.html b/doc-html/inst-compiling.html index dc7c82ca15ce65ef063f45234fa6543301e0fc89..4e0365d3a49c4a8d70441820c37dbfd097cfefae 100644 --- a/doc-html/inst-compiling.html +++ b/doc-html/inst-compiling.html @@ -1,61 +1,60 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="inst-installing.html"> -<LINK REL="prev" href="inst-prerequisites.html"> -<LINK REL="parent" href="installation.html"> -<LINK REL="next" href="inst-configure.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Compiling"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="inst-installing.html" /> +<link rel="prev" href="inst-prerequisites.html" /> +<link rel="parent" href="installation.html" /> +<link rel="next" href="inst-configure.html" /> +<meta name='aesop' content='information' /> <title>2.2 Compiling</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.1 Prerequisites" - href="inst-prerequisites.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.2.1 Running ./configure" - href="inst-configure.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.1 Prerequisites" + href="inst-prerequisites.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.2.1 Running ./configure" + href="inst-configure.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-prerequisites.html">2.1 Prerequisites</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-configure.html">2.2.1 Running ./configure</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION004200000000000000000"> </A> +<H1><A NAME="SECTION004200000000000000000"></A><A NAME="inst-compiling"></A> <BR> 2.2 Compiling </H1> -<a name="l2h-3"> </a> +<a id='l2h-3' xml:id='l2h-3'></a> <P> There are two ways in which modules can be compiled and linked to Apache - statically, or as a DSO (Dynamic Shared Object). @@ -72,7 +71,7 @@ the Apache DSO mechanism is available at <a class="url" href="http://httpd.apache.org/docs-2.0/dso.html">http://httpd.apache.org/docs-2.0/dso.html</a>. <P> -<i>At this time only DSO is supported by mod_python.</i> +<em>At this time only DSO is supported by mod_python.</em> <P> <i class="dfn">Static</i> linking is an older approach. With dynamic linking @@ -82,7 +81,8 @@ instances is not a favorable option. <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -91,43 +91,43 @@ instances is not a favorable option. <LI><A href="inst-make.html">2.2.2 Running make</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.1 Prerequisites" - rel="prev" title="2.1 Prerequisites" - href="inst-prerequisites.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.2.1 Running ./configure" - rel="next" title="2.2.1 Running ./configure" - href="inst-configure.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.1 Prerequisites" + href="inst-prerequisites.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.2.1 Running ./configure" + href="inst-configure.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-prerequisites.html">2.1 Prerequisites</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-configure.html">2.2.1 Running ./configure</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/inst-configure.html b/doc-html/inst-configure.html index a59bc8f234fc7de507babfe9166349a6b3ed25c9..fad3588c0b503e2761b9a103dcbd00da9435a8b2 100644 --- a/doc-html/inst-configure.html +++ b/doc-html/inst-configure.html @@ -1,58 +1,57 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="inst-make.html"> -<LINK REL="prev" href="inst-compiling.html"> -<LINK REL="parent" href="inst-compiling.html"> -<LINK REL="next" href="inst-make.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Running ./configure"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="inst-make.html" /> +<link rel="prev" href="inst-compiling.html" /> +<link rel="parent" href="inst-compiling.html" /> +<link rel="next" href="inst-make.html" /> +<meta name='aesop' content='information' /> <title>2.2.1 Running ./configure</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.2 Compiling" - href="inst-compiling.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2.2 Compiling" - href="inst-compiling.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.2.2 Running make" - href="inst-make.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.2 Compiling" + href="inst-compiling.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2.2 Compiling" + href="inst-compiling.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.2.2 Running make" + href="inst-make.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-compiling.html">2.2 Compiling</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="inst-compiling.html">2.2 Compiling</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-make.html">2.2.2 Running make</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION004210000000000000000"> </A> -<a name="l2h-4"> </a> +<H2><A NAME="SECTION004210000000000000000"></A><A NAME="inst-configure"></A> +<a id='l2h-4' xml:id='l2h-4'></a> <BR> 2.2.1 Running ./configure </H2> @@ -65,10 +64,10 @@ autoconf stuff, <b class="program">./configure</b> does the following: <P> <UL> -<LI><a name="l2h-5"> </a> +<LI><a id='l2h-5' xml:id='l2h-5'></a> Finds out whether a program called <b class="program">apxs</b> is available. This program is part of the standard Apache distribution, and is necessary - for DSO compilation. If apxs cannot be found in your <a class="envvar" name="l2h-6">PATH</a> or in + for DSO compilation. If apxs cannot be found in your <a class="envvar" id='l2h-6' xml:id='l2h-6'>PATH</a> or in <span class="file">/usr/local/apache/bin</span>, DSO compilation will not be available. <P> @@ -85,14 +84,14 @@ It is recommended that you specify this option. <P> </LI> -<LI><a name="l2h-7"> </a> +<LI><a id='l2h-7' xml:id='l2h-7'></a> Checks your Python version and attempts to figure out where <b class="program">libpython</b> is by looking at various parameters compiled into your Python binary. By default, it will use the <b class="program">python</b> - program found in your <a class="envvar" name="l2h-8">PATH</a>. + program found in your <a class="envvar" id='l2h-8' xml:id='l2h-8'>PATH</a>. <P> -<a name="l2h-9"> </a> +<a id='l2h-9' xml:id='l2h-9'></a> If the first Python binary in the path is not suitable or not the one desired for mod_python, you can specify an alternative location with the <b class="programopt">--with-python</b> option, e.g: @@ -104,7 +103,7 @@ It is recommended that you specify this option. <P> </LI> -<LI><a name="l2h-10"> </a> +<LI><a id='l2h-10' xml:id='l2h-10'></a> Sets the directory for the apache mutex locks. The default is <span class="file">/tmp</span>. The directory must exist and be writable by the owner of the apache process. @@ -129,11 +128,11 @@ The mutex directory can also be specified in using a >Configuring Apache</a></em>. <P> -<i>Back ported from version 3.3.0</i> +New in version 3.3.0 <P> </LI> -<LI><a name="l2h-11"> </a> +<LI><a id='l2h-11' xml:id='l2h-11'></a> Sets the maximum number of locks reserved by mod_python. <P> @@ -164,9 +163,9 @@ New in version 3.2.0 <P> </LI> -<LI><a name="l2h-12"> </a> +<LI><a id='l2h-12' xml:id='l2h-12'></a> Attempts to locate <b class="program">flex</b> and determine its version. - If <b class="program">flex</b> cannot be found in your <a class="envvar" name="l2h-13">PATH</a> <b class="program">configure</b> + If <b class="program">flex</b> cannot be found in your <a class="envvar" id='l2h-13' xml:id='l2h-13'>PATH</a> <b class="program">configure</b> will fail. If the wrong version is found <b class="program">configure</b> will generate a warning. You can generally ignore this warning unless you need to re-create <span class="file">src/psp_parser.c</span>. @@ -180,7 +179,7 @@ The parser used by psp (See <A href="pyapi-psp.html#pyapi-psp">4.9</A>) is writt must get the correct <b class="program">flex</b> version. <P> -<a name="l2h-14"> </a> +<a id='l2h-14' xml:id='l2h-14'></a> If the first flex binary in the path is not suitable or not the one desired you can specify an alternative location with the <b class="programopt">--with-flex</b> option, e.g: @@ -195,11 +194,11 @@ New in version 3.2.0 <P> </LI> -<LI><a name="l2h-15"> </a> +<LI><a id='l2h-15' xml:id='l2h-15'></a> The python source is required to build the mod_python documentation. <P> -<a name="l2h-16"> </a> +<a id='l2h-16' xml:id='l2h-16'></a> You can safely ignore this option unless you want to build the the documentation. If you want to build the documentation, specify the path to your python source with the <b class="programopt">--with-python-src</b> option, eg. @@ -219,41 +218,40 @@ New in version 3.2.0 <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.2 Compiling" - rel="prev" title="2.2 Compiling" - href="inst-compiling.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2.2 Compiling" - rel="parent" title="2.2 Compiling" - href="inst-compiling.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.2.2 Running make" - rel="next" title="2.2.2 Running make" - href="inst-make.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.2 Compiling" + href="inst-compiling.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2.2 Compiling" + href="inst-compiling.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.2.2 Running make" + href="inst-make.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-compiling.html">2.2 Compiling</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="inst-compiling.html">2.2 Compiling</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-make.html">2.2.2 Running make</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/inst-installing.html b/doc-html/inst-installing.html index e6f2a8abfb3cba924ed30bb2eb278abbe59473a7..93ce8953e563268ed1e0072c0f351e386a807d49 100644 --- a/doc-html/inst-installing.html +++ b/doc-html/inst-installing.html @@ -1,64 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="inst-testing.html"> -<LINK REL="prev" href="inst-compiling.html"> -<LINK REL="parent" href="installation.html"> -<LINK REL="next" href="inst-makeinstall.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Installing"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="inst-testing.html" /> +<link rel="prev" href="inst-compiling.html" /> +<link rel="parent" href="installation.html" /> +<link rel="next" href="inst-makeinstall.html" /> +<meta name='aesop' content='information' /> <title>2.3 Installing</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.2.2 Running make" - href="inst-make.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.3.1 Running make install" - href="inst-makeinstall.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.2.2 Running make" + href="inst-make.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.3.1 Running make install" + href="inst-makeinstall.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-make.html">2.2.2 Running make</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-makeinstall.html">2.3.1 Running make install</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION004300000000000000000"> </A> +<H1><A NAME="SECTION004300000000000000000"></A><A NAME="inst-installing"></A> <BR> 2.3 Installing </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -67,43 +67,43 @@ <LI><A href="inst-apacheconfig.html">2.3.2 Configuring Apache</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.2.2 Running make" - rel="prev" title="2.2.2 Running make" - href="inst-make.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.3.1 Running make install" - rel="next" title="2.3.1 Running make install" - href="inst-makeinstall.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.2.2 Running make" + href="inst-make.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.3.1 Running make install" + href="inst-makeinstall.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-make.html">2.2.2 Running make</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-makeinstall.html">2.3.1 Running make install</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/inst-make.html b/doc-html/inst-make.html index baa91ec2412463084b84878dc8af6a647d200973..ff571d91ba70a06d3478630a08d8c6f2cfd886c3 100644 --- a/doc-html/inst-make.html +++ b/doc-html/inst-make.html @@ -1,56 +1,55 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="inst-configure.html"> -<LINK REL="parent" href="inst-compiling.html"> -<LINK REL="next" href="inst-installing.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Running make"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="inst-configure.html" /> +<link rel="parent" href="inst-compiling.html" /> +<link rel="next" href="inst-installing.html" /> +<meta name='aesop' content='information' /> <title>2.2.2 Running make</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.2.1 Running ./configure" - href="inst-configure.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2.2 Compiling" - href="inst-compiling.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.3 Installing" - href="inst-installing.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.2.1 Running ./configure" + href="inst-configure.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2.2 Compiling" + href="inst-compiling.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.3 Installing" + href="inst-installing.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-configure.html">2.2.1 Running ./configure</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="inst-compiling.html">2.2 Compiling</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-installing.html">2.3 Installing</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION004220000000000000000"> </A> +<H2><A NAME="SECTION004220000000000000000"></A><A NAME="inst-make"></A> <BR> 2.2.2 Running make </H2> @@ -70,41 +69,40 @@ <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.2.1 Running ./configure" - rel="prev" title="2.2.1 Running ./configure" - href="inst-configure.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2.2 Compiling" - rel="parent" title="2.2 Compiling" - href="inst-compiling.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.3 Installing" - rel="next" title="2.3 Installing" - href="inst-installing.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.2.1 Running ./configure" + href="inst-configure.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2.2 Compiling" + href="inst-compiling.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.3 Installing" + href="inst-installing.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-configure.html">2.2.1 Running ./configure</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="inst-compiling.html">2.2 Compiling</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-installing.html">2.3 Installing</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/inst-makeinstall.html b/doc-html/inst-makeinstall.html index f68e834e5c798962d273dfd3e0cd97ac78e18d7a..5317d3e4da97295694b3d6e2d771f2721e1518ff 100644 --- a/doc-html/inst-makeinstall.html +++ b/doc-html/inst-makeinstall.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="inst-apacheconfig.html"> -<LINK REL="prev" href="inst-installing.html"> -<LINK REL="parent" href="inst-installing.html"> -<LINK REL="next" href="inst-apacheconfig.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Running make install"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="inst-apacheconfig.html" /> +<link rel="prev" href="inst-installing.html" /> +<link rel="parent" href="inst-installing.html" /> +<link rel="next" href="inst-apacheconfig.html" /> +<meta name='aesop' content='information' /> <title>2.3.1 Running make install</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.3 Installing" - href="inst-installing.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2.3 Installing" - href="inst-installing.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.3.2 Configuring Apache" - href="inst-apacheconfig.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.3 Installing" + href="inst-installing.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2.3 Installing" + href="inst-installing.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.3.2 Configuring Apache" + href="inst-apacheconfig.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-installing.html">2.3 Installing</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="inst-installing.html">2.3 Installing</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-apacheconfig.html">2.3.2 Configuring Apache</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION004310000000000000000"> </A> +<H2><A NAME="SECTION004310000000000000000"></A><A NAME="inst-makeinstall"></A> <BR> 2.3.1 Running make install </H2> @@ -81,7 +80,7 @@ </UL> <P> -<a name="l2h-17"> </a> <a name="l2h-18"> </a> <b>NB:</b> If you wish to selectively install just the Python libraries +<a id='l2h-17' xml:id='l2h-17'></a> <a id='l2h-18' xml:id='l2h-18'></a> <strong>NB:</strong> If you wish to selectively install just the Python libraries or the DSO (which may not always require superuser privileges), you can use the following <b class="program">make</b> targets: <b class="programopt">install_py_lib</b> and <b class="programopt">install_dso</b> @@ -93,41 +92,40 @@ <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.3 Installing" - rel="prev" title="2.3 Installing" - href="inst-installing.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2.3 Installing" - rel="parent" title="2.3 Installing" - href="inst-installing.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.3.2 Configuring Apache" - rel="next" title="2.3.2 Configuring Apache" - href="inst-apacheconfig.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.3 Installing" + href="inst-installing.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2.3 Installing" + href="inst-installing.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.3.2 Configuring Apache" + href="inst-apacheconfig.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-installing.html">2.3 Installing</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="inst-installing.html">2.3 Installing</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-apacheconfig.html">2.3.2 Configuring Apache</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/inst-prerequisites.html b/doc-html/inst-prerequisites.html index 22819d3b3711ff10aaf8c0ca253436de9eb2bf0d..cda79993b5d122f863a98c65915a4d4f7f6851cd 100644 --- a/doc-html/inst-prerequisites.html +++ b/doc-html/inst-prerequisites.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="inst-compiling.html"> -<LINK REL="prev" href="installation.html"> -<LINK REL="parent" href="installation.html"> -<LINK REL="next" href="inst-compiling.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Prerequisites"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="inst-compiling.html" /> +<link rel="prev" href="installation.html" /> +<link rel="parent" href="installation.html" /> +<link rel="next" href="inst-compiling.html" /> +<meta name='aesop' content='information' /> <title>2.1 Prerequisites</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2. Installation" - href="installation.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.2 Compiling" - href="inst-compiling.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2. Installation" + href="installation.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.2 Compiling" + href="inst-compiling.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="installation.html">2. Installation</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-compiling.html">2.2 Compiling</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION004100000000000000000"> </A> +<H1><A NAME="SECTION004100000000000000000"></A><A NAME="inst-prerequisites"></A> <BR> 2.1 Prerequisites </H1> @@ -59,9 +58,11 @@ <P> <UL> -<LI>Python 2.2.1 or later. Earlier versions of Python will not work. +<LI>Python 2.3.4 or later. Python versions less than 2.3 will not work. </LI> -<LI>Apache 2.0.47 or later (For Apache 1.3.x, use mod_python version 2.7.x). +<LI>Apache 2.0.54 or later. Apache versions 2.0.47 to 2.0.53 may work + but have not been tested with this release. + (For Apache 1.3.x, use mod_python version 2.7.x). </LI> </UL> @@ -82,41 +83,40 @@ the development packages. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2. Installation" - rel="prev" title="2. Installation" - href="installation.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.2 Compiling" - rel="next" title="2.2 Compiling" - href="inst-compiling.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2. Installation" + href="installation.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.2 Compiling" + href="inst-compiling.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="installation.html">2. Installation</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-compiling.html">2.2 Compiling</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/inst-testing.html b/doc-html/inst-testing.html index e04074b525100dfe63a74d24fcea4790e27cbcfd..04293c9167342b0d7b471e375de8d2483e6cb97c 100644 --- a/doc-html/inst-testing.html +++ b/doc-html/inst-testing.html @@ -1,63 +1,62 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="inst-trouble.html"> -<LINK REL="prev" href="inst-installing.html"> -<LINK REL="parent" href="installation.html"> -<LINK REL="next" href="inst-trouble.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Testing"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="inst-trouble.html" /> +<link rel="prev" href="inst-installing.html" /> +<link rel="parent" href="installation.html" /> +<link rel="next" href="inst-trouble.html" /> +<meta name='aesop' content='information' /> <title>2.4 Testing</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.3.2 Configuring Apache" - href="inst-apacheconfig.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.5 Troubleshooting" - href="inst-trouble.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.3.2 Configuring Apache" + href="inst-apacheconfig.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.5 Troubleshooting" + href="inst-trouble.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-apacheconfig.html">2.3.2 Configuring Apache</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-trouble.html">2.5 Troubleshooting</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION004400000000000000000"> </A> +<H1><A NAME="SECTION004400000000000000000"></A><A NAME="inst-testing"></A> <BR> 2.4 Testing </H1> <P> -<b>Warning :</b> These instructions are meant to be followed if you are +<strong>Warning :</strong> These instructions are meant to be followed if you are using mod_python 3.x or later. If you are using mod_python 2.7.x (namely, if you are using Apache 1.3.x), please refer to the proper documentation. @@ -156,58 +155,57 @@ if you are using Apache 1.3.x), please refer to the proper documentation. <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seeurl"> - <dt><a href="http://home.comcast.net/ d.popowich/mpservlets" - class="url">http://home.comcast.net/ d.popowich/mpservlets</a> - <dd>mpservlets + <dl compact="compact" class="seeurl"> + <dt><a href="http://www.astro.umass.edu/%7edpopowich/python/mpservlets/" + class="url">http://www.astro.umass.edu/%7edpopowich/python/mpservlets/</a></dt> + <dd>mpservlets</dd> </dl> - <dl compact class="seeurl"> + <dl compact="compact" class="seeurl"> <dt><a href="http://www.dscpl.com.au/projects/vampire" - class="url">http://www.dscpl.com.au/projects/vampire</a> - <dd>Vampire + class="url">http://www.dscpl.com.au/projects/vampire</a></dt> + <dd>Vampire</dd> </dl> </div> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.3.2 Configuring Apache" - rel="prev" title="2.3.2 Configuring Apache" - href="inst-apacheconfig.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.5 Troubleshooting" - rel="next" title="2.5 Troubleshooting" - href="inst-trouble.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.3.2 Configuring Apache" + href="inst-apacheconfig.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.5 Troubleshooting" + href="inst-trouble.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-apacheconfig.html">2.3.2 Configuring Apache</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-trouble.html">2.5 Troubleshooting</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/inst-trouble.html b/doc-html/inst-trouble.html index a6a409847afac9ba50383d0f4fa51e3ea304fdc3..6de639ecebb0494fa038e6adc917471b97c785d9 100644 --- a/doc-html/inst-trouble.html +++ b/doc-html/inst-trouble.html @@ -1,56 +1,55 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="inst-testing.html"> -<LINK REL="parent" href="installation.html"> -<LINK REL="next" href="tutorial.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Troubleshooting"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="inst-testing.html" /> +<link rel="parent" href="installation.html" /> +<link rel="next" href="tutorial.html" /> +<meta name='aesop' content='information' /> <title>2.5 Troubleshooting</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.4 Testing" - href="inst-testing.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3. Tutorial" - href="tutorial.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.4 Testing" + href="inst-testing.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3. Tutorial" + href="tutorial.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-testing.html">2.4 Testing</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tutorial.html">3. Tutorial</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION004500000000000000000"> </A> +<H1><A NAME="SECTION004500000000000000000"></A><A NAME="inst-trouble"></A> <BR> 2.5 Troubleshooting </H1> @@ -122,41 +121,40 @@ Now point your browser to the <span class="file">/mpinfo</span> URL </UL> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.4 Testing" - rel="prev" title="2.4 Testing" - href="inst-testing.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="2. Installation" - rel="parent" title="2. Installation" - href="installation.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3. Tutorial" - rel="next" title="3. Tutorial" - href="tutorial.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.4 Testing" + href="inst-testing.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="2. Installation" + href="installation.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3. Tutorial" + href="tutorial.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-testing.html">2.4 Testing</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="installation.html">2. Installation</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tutorial.html">3. Tutorial</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/installation.html b/doc-html/installation.html index a32be34ce94892e81fe3b58f169df79940f97289..7dc549701a1ba730390992cd1fd219948f67519e 100644 --- a/doc-html/installation.html +++ b/doc-html/installation.html @@ -1,61 +1,60 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="tutorial.html"> -<LINK REL="prev" href="introduction.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="inst-prerequisites.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT=". Installation"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="tutorial.html" /> +<link rel="prev" href="introduction.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="inst-prerequisites.html" /> +<meta name='aesop' content='information' /> <title>2. Installation</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="1.3 History" - href="intr-history.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.1 Prerequisites" - href="inst-prerequisites.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="1.3 History" + href="intr-history.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.1 Prerequisites" + href="inst-prerequisites.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="intr-history.html">1.3 History</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-prerequisites.html">2.1 Prerequisites</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION004000000000000000000"> </A> +<H1><A NAME="SECTION004000000000000000000"></A><A NAME="installation"></A> <BR> 2. Installation </H1> -<a name="l2h-1"> </a><a name="l2h-2"> </a> +<a id='l2h-1' xml:id='l2h-1'></a><a id='l2h-2' xml:id='l2h-2'></a> <P> <div class="note"><b class="label">Note:</b> By far the best place to get help with installation and other issues @@ -63,11 +62,22 @@ By far the best place to get help with installation and other issues mod_python mailing list by sending an e-mail with the word "<tt class="samp">subscribe</tt>" in the subject to <span class="email">mod_python-request@modpython.org</span>. + +<P> +Also check out Graham Dumpleton's assorted articles on mod_python + at <em class="citetitle"><a + href="http://www.dscpl.com.au/wiki/ModPython/Articles" + title="http://www.dscpl.com.au/wiki/ModPython/Articles" + >http://www.dscpl.com.au/wiki/ModPython/Articles</a></em>. + These include alternate instructions for getting a first mod_python + handler working, as well as articles covering problems, short comings and + constraints in various versions of mod_python. </div> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -87,43 +97,43 @@ By far the best place to get help with installation and other issues <LI><A href="inst-trouble.html">2.5 Troubleshooting</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="1.3 History" - rel="prev" title="1.3 History" - href="intr-history.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2.1 Prerequisites" - rel="next" title="2.1 Prerequisites" - href="inst-prerequisites.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="1.3 History" + href="intr-history.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2.1 Prerequisites" + href="inst-prerequisites.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="intr-history.html">1.3 History</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="inst-prerequisites.html">2.1 Prerequisites</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/intr-flexibility.html b/doc-html/intr-flexibility.html index 6d3d66cac5390ebee1629439a7a59d71dadb6fbf..b071648cc0f3b36505fec4b6bdd0404c2454923c 100644 --- a/doc-html/intr-flexibility.html +++ b/doc-html/intr-flexibility.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="intr-history.html"> -<LINK REL="prev" href="intr-performance.html"> -<LINK REL="parent" href="introduction.html"> -<LINK REL="next" href="intr-history.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Flexibility"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="intr-history.html" /> +<link rel="prev" href="intr-performance.html" /> +<link rel="parent" href="introduction.html" /> +<link rel="next" href="intr-history.html" /> +<meta name='aesop' content='information' /> <title>1.2 Flexibility</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="1.1 Performance" - href="intr-performance.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="1. Introduction" - href="introduction.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="1.3 History" - href="intr-history.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="1.1 Performance" + href="intr-performance.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="1. Introduction" + href="introduction.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="1.3 History" + href="intr-history.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="intr-performance.html">1.1 Performance</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="introduction.html">1. Introduction</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="intr-history.html">1.3 History</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION003200000000000000000"> </A> +<H1><A NAME="SECTION003200000000000000000"></A><A NAME="intr-flexibility"></A> <BR> 1.2 Flexibility </H1> @@ -84,58 +83,57 @@ To ease migration from CGI, a standard mod_python handler is <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seeurl"> + <dl compact="compact" class="seeurl"> <dt><a href="http://dev.apache.org/" - class="url">http://dev.apache.org/</a> - <dd>Apache Developer Resources + class="url">http://dev.apache.org/</a></dt> + <dd>Apache Developer Resources</dd> </dl> - <dl compact class="seeurl"> + <dl compact="compact" class="seeurl"> <dt><a href="http://www.modpython.org/python10/" - class="url">http://www.modpython.org/python10/</a> - <dd>Mod_Python - Integrating Python with Apache, presented at Python 10 + class="url">http://www.modpython.org/python10/</a></dt> + <dd>Mod_Python - Integrating Python with Apache, presented at Python 10</dd> </dl> </div> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="1.1 Performance" - rel="prev" title="1.1 Performance" - href="intr-performance.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="1. Introduction" - rel="parent" title="1. Introduction" - href="introduction.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="1.3 History" - rel="next" title="1.3 History" - href="intr-history.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="1.1 Performance" + href="intr-performance.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="1. Introduction" + href="introduction.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="1.3 History" + href="intr-history.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="intr-performance.html">1.1 Performance</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="introduction.html">1. Introduction</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="intr-history.html">1.3 History</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/intr-history.html b/doc-html/intr-history.html index c715237e73ae32b54043863e8c2b484fc4219507..4974c7bb820e8c5f93ab3a24c5c192eb31d59697 100644 --- a/doc-html/intr-history.html +++ b/doc-html/intr-history.html @@ -1,56 +1,55 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="intr-flexibility.html"> -<LINK REL="parent" href="introduction.html"> -<LINK REL="next" href="installation.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="History"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="intr-flexibility.html" /> +<link rel="parent" href="introduction.html" /> +<link rel="next" href="installation.html" /> +<meta name='aesop' content='information' /> <title>1.3 History</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="1.2 Flexibility" - href="intr-flexibility.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="1. Introduction" - href="introduction.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2. Installation" - href="installation.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="1.2 Flexibility" + href="intr-flexibility.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="1. Introduction" + href="introduction.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2. Installation" + href="installation.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="intr-flexibility.html">1.2 Flexibility</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="introduction.html">1. Introduction</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="installation.html">2. Installation</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION003300000000000000000"> </A> +<H1><A NAME="SECTION003300000000000000000"></A><A NAME="intr-history"></A> <BR> 1.3 History </H1> @@ -58,7 +57,7 @@ <P> Mod_python originates from a project called <em class="citetitle"><a - href="http://www.ispol.com/home/grisha/httpdapy/" + href="http://www.modpython.org/httpdapy/" title="Httpdapy" >Httpdapy</a></em> (1997). For a long time Httpdapy was not called mod_python because @@ -66,6 +65,24 @@ Mod_python originates from a project called to be cross-platform and in fact was initially written for the Netscape server (back then it was called Nsapy (1997). +<P> +Nsapy itself was based on an original concept and first code by + Aaron Watters from "Internet Programming with Python" by Aaron Watters, + Guido Van Rossum and James C. Ahlstrom, ISBN 1-55851-484-8. + +<P> +Without Aaron's inspiration, there would be no mod_python. Quoting from + the Httpdapy README file: + +<P> +<div class="verbatim"><pre> +Although Nsapy only worked with Netscape servers, it was very generic in its +design and was based on some brilliant ideas that weren't necessarily Netscape +specific. Its design is a combination of extensibility, simplicity and +efficiency that takes advantage of many of the key benefits of Python and is +totally in the spirit of Python. +</pre></div> + <P> This excerpt from the Httpdapy README file describes well the challenges and the solution provided by embedding Python within the @@ -120,41 +137,40 @@ And so it was done. The first release of mod_python happened in May of 2000. <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="1.2 Flexibility" - rel="prev" title="1.2 Flexibility" - href="intr-flexibility.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="1. Introduction" - rel="parent" title="1. Introduction" - href="introduction.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="2. Installation" - rel="next" title="2. Installation" - href="installation.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="1.2 Flexibility" + href="intr-flexibility.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="1. Introduction" + href="introduction.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="2. Installation" + href="installation.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="intr-flexibility.html">1.2 Flexibility</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="introduction.html">1. Introduction</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="installation.html">2. Installation</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/intr-performance.html b/doc-html/intr-performance.html index 8d69a5ab79eea3fe88ddc9608674f430dd6b8a4d..96a726c703ffc9e00c24a9c11465c41c06869197 100644 --- a/doc-html/intr-performance.html +++ b/doc-html/intr-performance.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="intr-flexibility.html"> -<LINK REL="prev" href="introduction.html"> -<LINK REL="parent" href="introduction.html"> -<LINK REL="next" href="intr-flexibility.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Performance"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="intr-flexibility.html" /> +<link rel="prev" href="introduction.html" /> +<link rel="parent" href="introduction.html" /> +<link rel="next" href="intr-flexibility.html" /> +<meta name='aesop' content='information' /> <title>1.1 Performance</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="1. Introduction" - href="introduction.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="1. Introduction" - href="introduction.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="1.2 Flexibility" - href="intr-flexibility.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="1. Introduction" + href="introduction.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="1. Introduction" + href="introduction.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="1.2 Flexibility" + href="intr-flexibility.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="introduction.html">1. Introduction</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="introduction.html">1. Introduction</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="intr-flexibility.html">1.2 Flexibility</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION003100000000000000000"> </A> +<H1><A NAME="SECTION003100000000000000000"></A><A NAME="intr-performance"></A> <BR> 1.1 Performance </H1> @@ -81,41 +80,40 @@ One of the main advantages of mod_python is the increase in <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="1. Introduction" - rel="prev" title="1. Introduction" - href="introduction.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="1. Introduction" - rel="parent" title="1. Introduction" - href="introduction.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="1.2 Flexibility" - rel="next" title="1.2 Flexibility" - href="intr-flexibility.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="1. Introduction" + href="introduction.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="1. Introduction" + href="introduction.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="1.2 Flexibility" + href="intr-flexibility.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="introduction.html">1. Introduction</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="introduction.html">1. Introduction</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="intr-flexibility.html">1.2 Flexibility</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/introduction.html b/doc-html/introduction.html index bd3171fad107b1645b8dcffff5b55f5c068b79b3..7f5d2d4d278aadeb0c54e4e250aa6e5bdd6a0be3 100644 --- a/doc-html/introduction.html +++ b/doc-html/introduction.html @@ -1,64 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="installation.html"> -<LINK REL="prev" href="contents.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="intr-performance.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT=". Introduction"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="installation.html" /> +<link rel="prev" href="contents.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="intr-performance.html" /> +<meta name='aesop' content='information' /> <title>1. Introduction</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="Contents" - href="contents.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="1.1 Performance" - href="intr-performance.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="Contents" + href="contents.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="1.1 Performance" + href="intr-performance.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="contents.html">Contents</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="intr-performance.html">1.1 Performance</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION003000000000000000000"> </A> +<H1><A NAME="SECTION003000000000000000000"></A><A NAME="introduction"></A> <BR> 1. Introduction </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -68,43 +68,43 @@ <LI><A href="intr-history.html">1.3 History</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="Contents" - rel="prev" title="Contents" - href="contents.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="1.1 Performance" - rel="next" title="1.1 Performance" - href="intr-performance.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="Contents" + href="contents.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="1.1 Performance" + href="intr-performance.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="contents.html">Contents</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="intr-performance.html">1.1 Performance</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/modpython.css b/doc-html/modpython.css index f585744702052502ca0dcb23375d3e00fac1b7cd..06a613c2ca8dbf434012e7aea905b4da0ec30455 100644 --- a/doc-html/modpython.css +++ b/doc-html/modpython.css @@ -38,7 +38,7 @@ big.xhuge { font-size : xx-large; } body { color: #000000; background-color: #ffffff; } -a:active { color: #ff0000; } +a:link:active { color: #ff0000; } a:link:hover { background-color: #bbeeff; } a:visited:hover { background-color: #bbeeff; } a:visited { color: #551a8b; } @@ -50,6 +50,14 @@ h1 { font-size: 180%; } h2 { font-size: 150%; } h3, h4 { font-size: 120%; } +/* These are section titles used in navigation links, so make sure we + * match the section header font here, even it not the weight. + */ +.sectref { font-family: avantgarde, sans-serif; } +/* And the label before the titles in navigation: */ +.navlabel { font-size: 85%; } + + /* LaTeX2HTML insists on inserting <br> elements into headers which * are marked with \label. This little bit of CSS magic ensures that * these elements don't cause spurious whitespace to be added. @@ -63,6 +71,8 @@ var { font-family: times, serif; font-style: italic; font-weight: normal; } +.Unix { font-variant: small-caps; } + .typelabel { font-family: lucida, sans-serif; } .navigation td { background-color: #99ccff; @@ -89,7 +99,9 @@ div.note { background-color: #fffaf0; div.note .label { margin-right: 0.5em; font-family: sans-serif; } -.release-info { font-style: italic; } +address { font-size: 80%; } +.release-info { font-style: italic; + font-size: 80%; } .titlegraphic { vertical-align: top; } @@ -108,6 +120,8 @@ div.note .label { margin-right: 0.5em; padding: 0.05in; } .grammar-footer { padding: 0.05in; font-size: 85%; } +.grammartoken { font-family: "lucida typewriter", lucidatypewriter, + monospace; } .productions { background-color: #bbeeff; } .productions a:active { color: #ff0000; } @@ -115,7 +129,28 @@ div.note .label { margin-right: 0.5em; .productions a:visited:hover { background-color: #99ccff; } .productions a:visited { color: #551a8b; } .productions a:link { color: #0000bb; } -.productions table { vertical-align: baseline; } +.productions table { vertical-align: baseline; + empty-cells: show; } +.productions > table td, +.productions > table th { padding: 2px; } +.productions > table td:first-child, +.productions > table td:last-child { + font-family: "lucida typewriter", + lucidatypewriter, + monospace; + } +/* same as the second selector above, but expressed differently for Opera */ +.productions > table td:first-child + td + td { + font-family: "lucida typewriter", + lucidatypewriter, + monospace; + vertical-align: baseline; + } +.productions > table td:first-child + td { + padding-left: 1em; + padding-right: 1em; + } +.productions > table tr { vertical-align: baseline; } .email { font-family: avantgarde, sans-serif; } .mailheader { font-family: avantgarde, sans-serif; } @@ -123,10 +158,46 @@ div.note .label { margin-right: 0.5em; .newsgroup { font-family: avantgarde, sans-serif; } .url { font-family: avantgarde, sans-serif; } .file { font-family: avantgarde, sans-serif; } -.menuselection { font-family: avantgarde, sans-serif; } - -.tableheader { background-color: #99ccff; - font-family: avantgarde, sans-serif; } +.guilabel { font-family: avantgarde, sans-serif; } + +.realtable { border-collapse: collapse; + border-color: black; + border-style: solid; + border-width: 0px 0px 2px 0px; + empty-cells: show; + margin-left: auto; + margin-right: auto; + padding-left: 0.4em; + padding-right: 0.4em; + } +.realtable tbody { vertical-align: baseline; } +.realtable tfoot { display: table-footer-group; } +.realtable thead { background-color: #99ccff; + border-width: 0px 0px 2px 1px; + display: table-header-group; + font-family: avantgarde, sans-serif; + font-weight: bold; + vertical-align: baseline; + } +.realtable thead :first-child { + border-width: 0px 0px 2px 0px; + } +.realtable thead th { border-width: 0px 0px 2px 1px } +.realtable td, +.realtable th { border-color: black; + border-style: solid; + border-width: 0px 0px 1px 1px; + padding-left: 0.4em; + padding-right: 0.4em; + } +.realtable td:first-child, +.realtable th:first-child { + border-left-width: 0px; + vertical-align: baseline; + } +.center { text-align: center; } +.left { text-align: left; } +.right { text-align: right; } .refcount-info { font-style: italic; } .refcount-info .value { font-weight: bold; @@ -141,7 +212,8 @@ div.note .label { margin-right: 0.5em; border: thin solid black; padding: 0pt 1em 4pt 1em; } -.seealso .heading { font-size: 110%; } +.seealso > .heading { font-size: 110%; + font-weight: bold; } /* * Class 'availability' is used for module availability statements at @@ -150,6 +222,19 @@ div.note .label { margin-right: 0.5em; .availability .platform { font-weight: bold; } +/* + * Additional styles for the distutils package. + */ +.du-command { font-family: monospace; } +.du-option { font-family: avantgarde, sans-serif; } +.du-filevar { font-family: avantgarde, sans-serif; + font-style: italic; } +.du-xxx:before { content: "** "; + font-weight: bold; } +.du-xxx:after { content: " **"; + font-weight: bold; } + + /* * Some specialization for printed output. */ diff --git a/doc-html/modpython.html b/doc-html/modpython.html index 974452bb9f8f39e9fa05bb8904a557ade5ff9ec1..d9e01d605a2ce5ec615a4bcfcd39330575db793b 100644 --- a/doc-html/modpython.html +++ b/doc-html/modpython.html @@ -1,65 +1,65 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="front.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Mod_python Manual"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="front.html" /> +<meta name='aesop' content='information' /> <title>Mod_python Manual</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="next" title="Front Matter" - href="front.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></td> +<td class='online-navigation'><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></td> +<td class='online-navigation'><a rel="next" title="Front Matter" + href="front.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="front.html">Front Matter</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> <P> <div class="titlepage"> -<center> +<div class='center'> <h1>Mod_python Manual</h1> <p><b><font size="+2">Gregory Trubetskoy</font></b></p> <p> E-mail: <span class="email">grisha@apache.org</span> </p> -<p><strong>Release 3.2.10</strong><br> -<strong>July 19, 2006</strong></p> -<p> -</center> +<p><strong>Release 3.3.1</strong><br /> +<strong>January 29, 2007</strong></p> +<p></p> +</div> </div> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"></a> @@ -105,11 +105,12 @@ <LI><A href="module-apache.html">4.5 <tt class="module">apache</tt> - Access to Apache Internals.</a> <UL> <LI><A href="pyapi-apmeth.html">4.5.1 Functions</a> -<LI><A href="pyapi-mptable.html">4.5.2 Table Object (mp_table)<a name="l2h-40"> </a></a> -<LI><A href="pyapi-mprequest.html">4.5.3 Request Object<a name="l2h-44"> </a></a> -<LI><A href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn)<a name="l2h-130"> </a></a> -<LI><A href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter)<a name="l2h-151"> </a></a> -<LI><A href="pyapi-mpserver.html">4.5.6 Server Object (mp_server)<a name="l2h-164"> </a></a> +<LI><A href="pyapi-apmem.html">4.5.2 Attributes</a> +<LI><A href="pyapi-mptable.html">4.5.3 Table Object (mp_table)<a id='l2h-43' xml:id='l2h-43'></a></a> +<LI><A href="pyapi-mprequest.html">4.5.4 Request Object<a id='l2h-47' xml:id='l2h-47'></a></a> +<LI><A href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)<a id='l2h-144' xml:id='l2h-144'></a></a> +<LI><A href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)<a id='l2h-166' xml:id='l2h-166'></a></a> +<LI><A href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)<a id='l2h-179' xml:id='l2h-179'></a></a> </ul> <LI><A href="pyapi-util.html">4.6 <tt class="module">util</tt> - Miscellaneous Utilities</a> <UL> @@ -173,54 +174,67 @@ <LI><A href="dir-other-pp.html">5.4.11 PythonPath</a> </ul> </ul> -<LI><A href="handlers.html">6. Standard Handlers</a> +<LI><A href="ssi.html">6. Server Side Includes</a> +<UL> +<LI><A href="ssi-overview.html">6.1 Overview of SSI</a> +<LI><A href="ssi-python-code.html">6.2 Using Python Code</a> +<LI><A href="ssi-data-scope.html">6.3 Scope of Global Data</a> +<LI><A href="ssi-globals.html">6.4 Pre-propulating Globals</a> +<LI><A href="ssi-conditionals.html">6.5 Conditional Expressions</a> +<LI><A href="ssi-output-filter.html">6.6 Enabling INCLUDES Filter</a> +</ul> +<LI><A href="handlers.html">7. Standard Handlers</a> <UL> -<LI><A href="hand-pub.html">6.1 Publisher Handler</a> +<LI><A href="hand-pub.html">7.1 Publisher Handler</a> <UL> -<LI><A href="hand-pub-intro.html">6.1.1 Introduction</a> -<LI><A href="hand-pub-alg.html">6.1.2 The Publishing Algorithm</a> -<LI><A href="node95.html">6.1.3 Form Data</a> +<LI><A href="hand-pub-intro.html">7.1.1 Introduction</a> +<LI><A href="hand-pub-alg.html">7.1.2 The Publishing Algorithm</a> +<LI><A href="node103.html">7.1.3 Form Data</a> </ul> -<LI><A href="hand-psp.html">6.2 PSP Handler</a> -<LI><A href="hand-cgi.html">6.3 CGI Handler</a> +<LI><A href="hand-psp.html">7.2 PSP Handler</a> +<LI><A href="hand-cgi.html">7.3 CGI Handler</a> </ul> -<LI><A href="node98.html">A. Changes from Version (3.2.8)</a> -<LI><A href="node99.html">B. Changes from Version (3.2.7)</a> -<LI><A href="node100.html">C. Changes from Version (3.1.4)</a> -<LI><A href="app-changes.html">D. Changes from Previous Major Version (2.x)</a> +<LI><A href="security.html">8. Security</a> +<LI><A href="app-changes-from-3.2.10.html">A. Changes from Version (3.2.10)</a> +<LI><A href="app-changes.html">B. Changes from Version (3.2.8)</a> +<LI><A href="app-changes-from-3.2.7.html">C. Changes from Version (3.2.7)</a> +<LI><A href="app-changes-from-3.1.4.html">D. Changes from Version (3.1.4)</a> +<LI><A href="app-changes-from-2.x.html">E. Changes from Previous Major Version (2.x)</a> <LI><A href="genindex.html">Index</a> <LI><A href="about.html">About this document ...</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="next" title="Front Matter" - rel="next" title="Front Matter" - href="front.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></td> +<td class='online-navigation'><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></td> +<td class='online-navigation'><a rel="next" title="Front Matter" + href="front.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="front.html">Front Matter</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/module-apache.html b/doc-html/module-apache.html index e8579efc66d77ffc086901ae2cd77fb5ed6e06db..ff3dbe20ff76577e8cad6b07621244553f297de6 100644 --- a/doc-html/module-apache.html +++ b/doc-html/module-apache.html @@ -1,60 +1,59 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-util.html"> -<LINK REL="prev" href="pyapi-conn.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="pyapi-apmeth.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="apache - Access to Apache Internals."> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-util.html" /> +<link rel="prev" href="pyapi-conn.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="pyapi-apmeth.html" /> +<meta name='aesop' content='information' /> <title>4.5 apache - Access to Apache Internals.</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.4 Overview of a" - href="pyapi-conn.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.1 Functions" - href="pyapi-apmeth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.4 Overview of a" + href="pyapi-conn.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.1 Functions" + href="pyapi-apmeth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-conn.html">4.4 Overview of a</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-apmeth.html">4.5.1 Functions</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> <H1><A NAME="SECTION006500000000000000000"> 4.5 <tt class="module">apache</tt> - Access to Apache Internals.</A> </H1> - +<A NAME="module-apache"></A> <P> The Python interface to Apache internals is contained in a module @@ -66,7 +65,7 @@ interface to Apache internals, it is covered in its own section of this manual.) <P> -<a name="l2h-30"> </a> The <tt class="module">apache</tt> module can only be +<a id='l2h-30' xml:id='l2h-30'></a> The <tt class="module">apache</tt> module can only be imported by a script running under mod_python. This is because it depends on a built-in module <tt class="module">_apache</tt> provided by mod_python. @@ -89,71 +88,73 @@ objects. For a more in-depth look at Apache internals, see the <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> <LI><A href="pyapi-apmeth.html">4.5.1 Functions</a> -<LI><A href="pyapi-mptable.html">4.5.2 Table Object (mp_table)<a name="l2h-40"> </a></a> -<LI><A href="pyapi-mprequest.html">4.5.3 Request Object<a name="l2h-44"> </a></a> +<LI><A href="pyapi-apmem.html">4.5.2 Attributes</a> +<LI><A href="pyapi-mptable.html">4.5.3 Table Object (mp_table)<a id='l2h-43' xml:id='l2h-43'></a></a> +<LI><A href="pyapi-mprequest.html">4.5.4 Request Object<a id='l2h-47' xml:id='l2h-47'></a></a> <UL> -<LI><A href="pyapi-mprequest-meth.html">4.5.3.1 Request Methods</a> -<LI><A href="pyapi-mprequest-mem.html">4.5.3.2 Request Members</a> +<LI><A href="pyapi-mprequest-meth.html">4.5.4.1 Request Methods</a> +<LI><A href="pyapi-mprequest-mem.html">4.5.4.2 Request Members</a> </ul> -<LI><A href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn)<a name="l2h-130"> </a></a> +<LI><A href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)<a id='l2h-144' xml:id='l2h-144'></a></a> <UL> -<LI><A href="pyapi-mpconn-meth.html">4.5.4.1 Connection Methods</a> -<LI><A href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</a> +<LI><A href="pyapi-mpconn-meth.html">4.5.5.1 Connection Methods</a> +<LI><A href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</a> </ul> -<LI><A href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter)<a name="l2h-151"> </a></a> +<LI><A href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)<a id='l2h-166' xml:id='l2h-166'></a></a> <UL> -<LI><A href="pyapi-mpfilt-meth.html">4.5.5.1 Filter Methods</a> -<LI><A href="pyapi-mpfilt-mem.html">4.5.5.2 Filter Members</a> +<LI><A href="pyapi-mpfilt-meth.html">4.5.6.1 Filter Methods</a> +<LI><A href="pyapi-mpfilt-mem.html">4.5.6.2 Filter Members</a> </ul> -<LI><A href="pyapi-mpserver.html">4.5.6 Server Object (mp_server)<a name="l2h-164"> </a></a> +<LI><A href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)<a id='l2h-179' xml:id='l2h-179'></a></a> <UL> -<LI><A href="pyapi-mpsrv-meth.html">4.5.6.1 Server Methods</a> -<LI><A href="pyapi-mpsrv-mem.html">4.5.6.2 Server Members</a> +<LI><A href="pyapi-mpsrv-meth.html">4.5.7.1 Server Methods</a> +<LI><A href="pyapi-mpsrv-mem.html">4.5.7.2 Server Members</a> </ul></ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.4 Overview of a" - rel="prev" title="4.4 Overview of a" - href="pyapi-conn.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.1 Functions" - rel="next" title="4.5.1 Functions" - href="pyapi-apmeth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.4 Overview of a" + href="pyapi-conn.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.1 Functions" + href="pyapi-apmeth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-conn.html">4.4 Overview of a</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-apmeth.html">4.5.1 Functions</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/modules.gif b/doc-html/modules.gif deleted file mode 100644 index f5860b6bb9c4ce21e25ca74b0fb90faaaf231993..0000000000000000000000000000000000000000 Binary files a/doc-html/modules.gif and /dev/null differ diff --git a/doc-html/modules.png b/doc-html/modules.png new file mode 100644 index 0000000000000000000000000000000000000000..8fa8b75524ad4072442f8f04745af27973cbc740 Binary files /dev/null and b/doc-html/modules.png differ diff --git a/doc-html/next.gif b/doc-html/next.gif deleted file mode 100644 index 5dcaff8b2429e50aad5de34344459cebef9e0957..0000000000000000000000000000000000000000 Binary files a/doc-html/next.gif and /dev/null differ diff --git a/doc-html/next.png b/doc-html/next.png new file mode 100644 index 0000000000000000000000000000000000000000..cfe5e51ca619b357fc22d618fa2cb132036da31f Binary files /dev/null and b/doc-html/next.png differ diff --git a/doc-html/node103.html b/doc-html/node103.html new file mode 100644 index 0000000000000000000000000000000000000000..ebda6c9400d692f2f620e0cd9119dfa1b374fc47 --- /dev/null +++ b/doc-html/node103.html @@ -0,0 +1,112 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="hand-pub-alg.html" /> +<link rel="parent" href="hand-pub.html" /> +<link rel="next" href="hand-psp.html" /> +<meta name='aesop' content='information' /> +<title>7.1.3 Form Data</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="7.1.2.3 Authentication" + href="hand-pub-alg-auth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.2 PSP Handler" + href="hand-psp.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="hand-pub-alg-auth.html">7.1.2.3 Authentication</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="hand-pub.html">7.1 Publisher Handler</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="hand-psp.html">7.2 PSP Handler</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H2><A NAME="SECTION009130000000000000000"> +7.1.3 Form Data</A> +</H2> + +<P> +In the process of matching arguments, the Publisher handler creates an +instance of <em class="citetitle"><a + href="pyapi-util-fstor.html" + title="FieldStorage" + >FieldStorage</a></em> +class. A reference to this instance is stored in an attribute <tt class="member">form</tt> +of the <tt class="class">Request</tt> object. + +<P> +Since a <tt class="class">FieldStorage</tt> can only be instantiated once per +request, one must not attempt to instantiate <tt class="class">FieldStorage</tt> when +using the Publisher handler and should use +<tt class="class">Request.form</tt> instead. + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="7.1.2.3 Authentication" + href="hand-pub-alg-auth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="7.1 Publisher Handler" + href="hand-pub.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7.2 PSP Handler" + href="hand-psp.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="hand-pub-alg-auth.html">7.1.2.3 Authentication</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="hand-pub.html">7.1 Publisher Handler</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="hand-psp.html">7.2 PSP Handler</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/node95.html b/doc-html/node95.html deleted file mode 100644 index bd086997b14dd2d5d65884f12c0beccd683f92b0..0000000000000000000000000000000000000000 --- a/doc-html/node95.html +++ /dev/null @@ -1,114 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="hand-pub-alg.html"> -<LINK REL="parent" href="hand-pub.html"> -<LINK REL="next" href="hand-psp.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Form Data"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>6.1.3 Form Data</title> -</head> -<body> -<DIV CLASS="navigation"> -<table align="center" width="100%" cellpadding="0" cellspacing="2"> -<tr> -<td><a rel="prev" title="6.1.2.3 Authentication" - href="hand-pub-alg-auth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.2 PSP Handler" - href="hand-psp.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> -<td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> -</tr></table> -<b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-alg-auth.html">6.1.2.3 Authentication</A> -<b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub.html">6.1 Publisher Handler</A> -<b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-psp.html">6.2 PSP Handler</A> -<br><hr> -</DIV> -<!--End of Navigation Panel--> - -<H2><A NAME="SECTION008130000000000000000"> -6.1.3 Form Data</A> -</H2> - -<P> -In the process of matching arguments, the Publisher handler creates an -instance of <em class="citetitle"><a - href="pyapi-util-fstor.html" - title="FieldStorage" - >FieldStorage</a></em> -class. A reference to this instance is stored in an attribute <tt class="member">form</tt> -of the <tt class="class">Request</tt> object. - -<P> -Since a <tt class="class">FieldStorage</tt> can only be instantiated once per -request, one must not attempt to instantiate <tt class="class">FieldStorage</tt> when -using the Publisher handler and should use -<tt class="class">Request.form</tt> instead. - -<P> - -<DIV CLASS="navigation"> -<p><hr> -<table align="center" width="100%" cellpadding="0" cellspacing="2"> -<tr> -<td><a rel="prev" title="6.1.2.3 Authentication" - rel="prev" title="6.1.2.3 Authentication" - href="hand-pub-alg-auth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="6.1 Publisher Handler" - rel="parent" title="6.1 Publisher Handler" - href="hand-pub.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="6.2 PSP Handler" - rel="next" title="6.2 PSP Handler" - href="hand-psp.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> -<td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> -</tr></table> -<b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-pub-alg-auth.html">6.1.2.3 Authentication</A> -<b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="hand-pub.html">6.1 Publisher Handler</A> -<b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="hand-psp.html">6.2 PSP Handler</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> -</DIV> -<!--End of Navigation Panel--> - -</BODY> -</HTML> diff --git a/doc-html/node98.html b/doc-html/node98.html deleted file mode 100644 index 287d68b782768f4bfd44aba6cdca29aa6c9d7e4d..0000000000000000000000000000000000000000 --- a/doc-html/node98.html +++ /dev/null @@ -1,218 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" HREF="node99.html"> -<LINK REL="prev" href="handlers.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" HREF="node99.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="A. Changes from Version (3.2.8)"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>A. Changes from Version (3.2.8)</title> -</head> -<body> -<DIV CLASS="navigation"> -<table align="center" width="100%" cellpadding="0" cellspacing="2"> -<tr> -<td><a rel="prev" title="6.3 CGI Handler" - href="hand-cgi.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="B. Changes from Version" - HREF="node99.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> -<td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> -</tr></table> -<b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-cgi.html">6.3 CGI Handler</A> -<b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> -<b class="navlabel">Next:</b> -<a class="sectref" rel="next" HREF="node99.html">B. Changes from Version</A> -<br><hr> -</DIV> -<!--End of Navigation Panel--> - -<H1><A NAME="SECTION009000000000000000000"> </A> -<BR> -A. Changes from Version (3.2.8) -</H1> - -<P> -<a name="l2h-274"> </a> -<P> -New Features - -<P> - -<UL> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-78" - title="MODPYTHON-78" - >MODPYTHON-78</a></em>) - Added support for Apache 2.2. -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-94" - title="MODPYTHON-94" - >MODPYTHON-94</a></em>) - New <code>req.is_https()</code> and <code>req.ssl_var_lookup()</code> methods. - These communicate direct with the Apache mod_ssl module, allowing - it to be determined if the connection is using SSL/TLS and what the - values of internal ssl variables are. -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-137" - title="MODPYTHON-137" - >MODPYTHON-137</a></em>) - New <code>req.server.get_options()</code> method. This returns the subset - of Python options set at global scope within the Apache configuration. - That is, outside of the context of any VirtualHost, Location, Directory - or Files directives. -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-131" - title="MODPYTHON-131" - >MODPYTHON-131</a></em>) - The directory used for mutex locks can now be specified at - at compile time using <code>./configure --with-mutex-dir value</code> - or at run time with <code>PythonOption mod_python.mutex_directory value</code>. -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-145" - title="MODPYTHON-145" - >MODPYTHON-145</a></em>) - The number of mutex locks can now be specified at run time with - <code>PythonOption mod_python.mutex_locks value</code>. -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-172" - title="MODPYTHON-172" - >MODPYTHON-172</a></em>) - Fixed three memory leaks that were found in _apachemodule.parse_qsl, req.readlines - and util.cfgtree_walk. - -</LI> -</UL> - -<P> -Improvements - -<P> - -<UL> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-77" - title="MODPYTHON-77" - >MODPYTHON-77</a></em>) - Third party C modules that use the simplified API for the Global - Interpreter Lock (GIL), as described in PEP 311, can now be used. The - only requirement is that such modules can only be used in the context - of the "<tt class="samp">main_interpreter</tt>". -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-119" - title="MODPYTHON-119" - >MODPYTHON-119</a></em>) - DbmSession unit test no longer uses the default directory for the dbm file, - so the test will not interfer with the user's current apache instance. -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-158" - title="MODPYTHON-158" - >MODPYTHON-158</a></em>) - Added additional debugging and logging output for where mod_python - cannot initialise itself properly due to Python or mod_python version - mismatches or missing Python module code files. - -</LI> -</UL> - -<P> -Bug Fixes - -<P> - -<UL> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-122" - title="MODPYTHON-122" - >MODPYTHON-122</a></em>) - Fixed configure problem when using bash 3.1.x. -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-173" - title="MODPYTHON-173" - >MODPYTHON-173</a></em>) - Fixed DbmSession to create db file with mode 0640. -</LI> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-84" - title="MODPYTHON-84" - >MODPYTHON-84</a></em>) - Fixed request.sendfile() bug for symlinked files on Win32. - -</LI> -</UL> - -<P> - -<DIV CLASS="navigation"> -<p><hr> -<table align="center" width="100%" cellpadding="0" cellspacing="2"> -<tr> -<td><a rel="prev" title="6.3 CGI Handler" - rel="prev" title="6.3 CGI Handler" - href="hand-cgi.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="B. Changes from Version" - rel="next" title="B. Changes from Version" - HREF="node99.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> -<td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> -</tr></table> -<b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="hand-cgi.html">6.3 CGI Handler</A> -<b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> -<b class="navlabel">Next:</b> -<a class="sectref" rel="next" HREF="node99.html">B. Changes from Version</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> -</DIV> -<!--End of Navigation Panel--> - -</BODY> -</HTML> diff --git a/doc-html/node99.html b/doc-html/node99.html deleted file mode 100644 index f8b08595d1ccc4d7db486b2e42bdd76db8ad3742..0000000000000000000000000000000000000000 --- a/doc-html/node99.html +++ /dev/null @@ -1,123 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> -<head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" HREF="node100.html"> -<LINK REL="prev" HREF="node98.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" HREF="node100.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="B. Changes from Version (3.2.7)"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>B. Changes from Version (3.2.7)</title> -</head> -<body> -<DIV CLASS="navigation"> -<table align="center" width="100%" cellpadding="0" cellspacing="2"> -<tr> -<td><a rel="prev" title="A. Changes from Version" - HREF="node98.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="C. Changes from Version" - HREF="node100.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> -<td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> -</tr></table> -<b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="node98.html">A. Changes from Version</A> -<b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> -<b class="navlabel">Next:</b> -<a class="sectref" rel="next" HREF="node100.html">C. Changes from Version</A> -<br><hr> -</DIV> -<!--End of Navigation Panel--> - -<H1><A NAME="SECTION0010000000000000000000"> </A> -<BR> -B. Changes from Version (3.2.7) -</H1> - -<P> -<a name="l2h-275"> </a> -<P> -Security Fix - -<P> - -<UL> -<LI>(<em class="citetitle"><a - href="http://issues.apache.org/jira/browse/MODPYTHON-135" - title="MODPYTHON-135" - >MODPYTHON-135</a></em>) - -<P> -Fixed possible directory traversal attack in FileSession. The session - id is now checked to ensure it only contains valid characters. This - check is performed for all sessions derived from the BaseSession - class. - -</LI> -</UL> - -<P> - -<DIV CLASS="navigation"> -<p><hr> -<table align="center" width="100%" cellpadding="0" cellspacing="2"> -<tr> -<td><a rel="prev" title="A. Changes from Version" - rel="prev" title="A. Changes from Version" - HREF="node98.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="C. Changes from Version" - rel="next" title="C. Changes from Version" - HREF="node100.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> -<td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> -</tr></table> -<b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" HREF="node98.html">A. Changes from Version</A> -<b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> -<b class="navlabel">Next:</b> -<a class="sectref" rel="next" HREF="node100.html">C. Changes from Version</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> -</DIV> -<!--End of Navigation Panel--> - -</BODY> -</HTML> diff --git a/doc-html/previous.gif b/doc-html/previous.gif deleted file mode 100644 index de1da16023d2b5c20e6f1c8546c04e434136ac6b..0000000000000000000000000000000000000000 Binary files a/doc-html/previous.gif and /dev/null differ diff --git a/doc-html/previous.png b/doc-html/previous.png new file mode 100644 index 0000000000000000000000000000000000000000..497def42a0cf47e012bcd69599c2d3c405c3bca4 Binary files /dev/null and b/doc-html/previous.png differ diff --git a/doc-html/pyapi-apmem.html b/doc-html/pyapi-apmem.html new file mode 100644 index 0000000000000000000000000000000000000000..334c7e781323c26d21847be12097e90b1211c010 --- /dev/null +++ b/doc-html/pyapi-apmem.html @@ -0,0 +1,113 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mptable.html" /> +<link rel="prev" href="pyapi-apmeth.html" /> +<link rel="parent" href="module-apache.html" /> +<link rel="next" href="pyapi-mptable.html" /> +<meta name='aesop' content='information' /> +<title>4.5.2 Attributes</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="4.5.1 Functions" + href="pyapi-apmeth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.3 Table Object (mp_table)" + href="pyapi-mptable.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="pyapi-apmeth.html">4.5.1 Functions</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="pyapi-mptable.html">4.5.3 Table Object (mp_table)</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H2><A NAME="SECTION006520000000000000000"></A><A NAME="pyapi-apmem"></A> +<BR> +4.5.2 Attributes +</H2> + +<P> +<dl><dt><b><tt id='l2h-41' xml:id='l2h-41' class="member">interpreter</tt></b></dt> +<dd> + The name of the subinterpreter under which we're running. + <em>(Read-Only)</em> +</dl> + +<P> +<dl><dt><b><tt id='l2h-42' xml:id='l2h-42' class="member">main_server</tt></b></dt> +<dd> + A <code>server</code> object for the main server. + <em>(Read-Only</em>) +</dl> + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="4.5.1 Functions" + href="pyapi-apmeth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.3 Table Object (mp_table)" + href="pyapi-mptable.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="pyapi-apmeth.html">4.5.1 Functions</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="pyapi-mptable.html">4.5.3 Table Object (mp_table)</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/pyapi-apmeth.html b/doc-html/pyapi-apmeth.html index afc8a2fdb4a4b519707ea9c4a3c6452ffa9485ef..75b09d52f0d9a542d3b95b9fcdef0b8455c23ad9 100644 --- a/doc-html/pyapi-apmeth.html +++ b/doc-html/pyapi-apmeth.html @@ -1,65 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mptable.html"> -<LINK REL="prev" href="module-apache.html"> -<LINK REL="parent" href="module-apache.html"> -<LINK REL="next" href="pyapi-mptable.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Functions"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-apmem.html" /> +<link rel="prev" href="module-apache.html" /> +<link rel="parent" href="module-apache.html" /> +<link rel="next" href="pyapi-apmem.html" /> +<meta name='aesop' content='information' /> <title>4.5.1 Functions</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5 apache - Access" - href="module-apache.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.2 Table Object (mp_table) " - href="pyapi-mptable.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5 apache - Access" + href="module-apache.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.2 Attributes" + href="pyapi-apmem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mptable.html">4.5.2 Table Object (mp_table) </A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-apmem.html">4.5.2 Attributes</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006510000000000000000"> </A> +<H2><A NAME="SECTION006510000000000000000"></A><A NAME="pyapi-apmeth"></A> <BR> 4.5.1 Functions </H2> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-31"><tt class="function">log_error</tt></a></b>(</nobr></td> - <td><var>message</var><big>[</big><var>, level, server</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-31' xml:id='l2h-31' class="function">log_error</tt></b>(</nobr></td> + <td><var>message</var><big>[</big><var>, level, server</var><big>]</big><var></var>)</td></tr></table></dt> <dd> An interface to the Apache <code>ap_log_error()</code> function. <var>message</var> is a string with the error message, @@ -94,20 +93,54 @@ If you have a reference to a request object available, consider using <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-32"><tt class="function">import_module</tt></a></b>(</nobr></td> - <td><var>module_name</var><big>[</big><var>, autoreload=1, log=0, path=None</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-32' xml:id='l2h-32' class="function">import_module</tt></b>(</nobr></td> + <td><var>module_name</var><big>[</big><var>, autoreload=None, log=None, path=None</var><big>]</big><var></var>)</td></tr></table></dt> <dd> - This function can be used to import modules taking advantage of - mod_python's internal mechanism which reloads modules automatically - if they have changed since last import. + This function can be used to import modules. <P> -<var>module_name</var> is a string containing the module name (it can - contain dots, e.g. <code>mypackage.mymodule</code>); <var>autoreload</var> - indicates whether the module should be reloaded if it has changed since - last import; when <var>log</var> is true, a message will be written to - the logs when a module is reloaded; <var>path</var> allows restricting - modules to specific paths. +<div class="note"><b class="label">Note:</b> +This function and the module importer were completely reimplemented in + mod_python 3.3. If you are using an older version of mod_python do not + rely on this documentation and instead refer to the documentation for + the specific version you are using as the new importer does not behave + exactly the same and has additional features. + +<P> +If you are trying to port code from an older version of mod_python to + mod_python 3.3 and can't work out why the new importer is not working + for you, you can enable the old module importer for specific Python + interpreter instances by using: + +<P> +<div class="verbatim"><pre> + PythonOption mod_python.legacy.importer name +</pre></div> + +<P> +where 'name' is the name of the interpreter instance or '*' for it to + be applied to all interpreter instances. This option should be placed + at global context within the main Apache configuration files. +</div> + +<P> +When using the <code>apache.import_module()</code> function, the + <var>module_name</var> should be a string containing either the module name, + or a path to the actual code file for the module; where a module is a + candidate for automatic module reloading, <var>autoreload</var> indicates + whether the module should be reloaded if it has changed since the last + import; when <var>log</var> is true, a message will be written to the logs + when a module is reloaded; <var>path</var> can be a list specifying additional + directories to be searched for modules. + +<P> +With the introduction of mod_python 3.3, the default arguments for the + <var>autoreload</var> and <var>log</var> arguments have been changed to + <code>None</code>, with the arguments effectively now being unnecessary except + in special circumstances. When the arguments are left as the default of + <code>None</code>, the Apache configuration in scope at the time of the call + will always be consulted automatically for any settings for the + <code>PythonAutoReload</code> and <code>PythonDebug</code> directives respectively. <P> Example: @@ -115,14 +148,487 @@ Example: <P> <div class="verbatim"><pre> from mod_python import apache - mymodule = apache.import_module('mymodule', log=1) + module = apache.import_module('module_name') +</pre></div> + +<P> +The <code>apache.import_module()</code> function is not just a wrapper for the + standard Python module import mechanism. The purpose of the function and + the mod_python module importer in general, is to provide a means of being + able to import modules based on their exact location, with modules being + distinguished based on their location rather than just the name of the + module. Distinguishing modules in this way, rather than by name alone, + means that the same module name can be used for handlers and other code + in multiple directories and they will not interfere with each other. + +<P> +A secondary feature of the module importer is to implement a means of + having modules automatically reloaded when the corresponding code file + has been changed on disk. Having modules be able to be reloaded in this + way means that it is possible to change the code for a web application + without having to restart the whole Apache web server. Although this was + always the intent of the module importer, prior to mod_python 3.3, its + effectiveness was limited. With mod_python 3.3 however, the module + reloading feature is much more robust and will correctly reload parent + modules even when it was only a child module what was changed. + +<P> +When the <code>apache.import_module()</code> function is called with just the + name of the module, as opposed to a path to the actual code file for the + module, a search has to be made for the module. The first set of + directories that will be checked are those specified by the <var>path</var> + argument if supplied. + +<P> +Where the function is called from another module which had previously + been imported by the mod_python importer, the next directory which will + be checked will be the same directory as the parent module is located. + Where that same parent module contains a global data variable called + <code>__mp_path__</code> containing a list of directories, those directories + will also be searched. + +<P> +Finally, the mod_python module importer will search directories + specified by the <code>PythonOption</code> called <code>mod_python.importer.path</code>. + +<P> +For example: + +<P> +<div class="verbatim"><pre> + PythonOption mod_python.importer.path "['/some/path']" +</pre></div> + +<P> +The argument to the option must be in the form of a Python list. The + enclosing quotes are to ensure that Apache interprets the argument as a + single value. The list must be self contained and cannot reference any + prior value of the option. The list MUST NOT reference <code>sys.path</code> + nor should any directory which also appears in <code>sys.path</code> be + listed in the mod_python module importer search path. + +<P> +When searching for the module, a check is made for any code file with the + name specified and having a '.py' extension. Because only modules + implemented as a single file will be found, packages will not be found + nor modules contained within a package. + +<P> +In any case where a module cannot be found, control is handed off to the + standard Python module importer which will attempt to find the module or + package by searching <code>sys.path</code>. + +<P> +Note that only modules found by the mod_python module importer are + candidates for automatic module reloading. That is, where the mod_python + module importer could not find a module and handed the search off to the + standard Python module importer, those modules or packages will not be + able to be reloaded. + +<P> +Although true Python packages are not candidates for reloading and must + be located in a directory listed in <code>sys.path</code>, another form of + packaging up modules such that they can be maintained within their own + namespace is supported. When this mechanism is used, these modules will + be candidates for reloading when found by the mod_python module importer. + +<P> +In this scheme for maintaining a pseudo package, individual modules are + still placed into a directory, but the <code>__init__.py</code> file in the + directory has no special meaning and will not be automatically imported + as is the case with true Python packages. Instead, any module within the + directory must always be explicitly identified when performing an import. + +<P> +To import a named module contained within these pseudo packages, rather + than using a '.' to distinguish a sub module from the parent, a '/' is + used instead. For example: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + module = apache.import_module('dirname/module_name') +</pre></div> + +<P> +If an <code>__init__.py</code> file is present and it was necessary to import + it to achieve the same result as importing the root of a true Python + package, then <code>__init__</code> can be used as the module name. For example: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + module = apache.import_module('dirname/__init__') +</pre></div> + +<P> +As a true Python package is not being used, if a module in the directory + needs to refer to another module in the same directory, it should use + just its name, it should not use any form of dotted path name via the + root of the package as would be the case for true Python packages. + Modules in subdirectories can be imported by using a '/' separated path + where the first part of the path is the name of the subdirectory. + +<P> +As a new feature in mod_python 3.3, when using the standard Python + 'import' statement to import a module, if the import is being done from a + module which was previously imported by the mod_python module importer, + it is equivalent to having called <code>apache.import_module()</code> directly. + +<P> +For example: + +<P> +<div class="verbatim"><pre> + import name +</pre></div> + +<P> +is equivalent to: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + name = apache.import_module('name') +</pre></div> + +<P> +It is also possible to use constructs such as: + +<P> +<div class="verbatim"><pre> + import name as module +</pre></div> + +<P> +and: + +<P> +<div class="verbatim"><pre> + from name import value +</pre></div> + +<P> +Although the 'import' statement is used, that it maps through to the + <code>apache.import_module()</code> function ensures that parent/child + relationships are maintained correctly and reloading of a parent will + still work when only the child has been changed. It also ensures that one + will not end up with modules which were separately imported by the + mod_python module importer and the standard Python module importer. + +<P> +With the reimplementation of the module importer in mod_python 3.3, the + <var>module_name</var> argument may also now be an absolute path name of an + actual Python module contained in a single file. On Windows, a drive + letter can be supplied if necessary. For example: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + name = apache.import_module('/some/path/name.py') +</pre></div> + +<P> +or: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + import os + here = os.path.dirname(__file__) + path = os.path.join(here, 'module.py') + module = apache.import_module(path) +</pre></div> + +<P> +Where the file has an extension, that extension must be supplied. Although + it is recommended that code files still make use of the '.py' extension, + it is not actually a requirement and an alternate extension can be used. + For example: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + import os + here = os.path.dirname(__file__) + path = os.path.join(here, 'servlet.mps') + servlet = apache.import_module(path) +</pre></div> + +<P> +To avoid the need to use hard coded absolute path names to modules, a few + shortcuts are provided. The first of these allow for the use of relative + path names with respect to the directory the module performing the + import is located within. + +<P> +For example: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + + parent = apache.import_module('../module.py') + subdir = apache.import_module('./subdir/module.py') +</pre></div> + +<P> +Forward slashes must always be used for the prefixes './' and '../', even + on Windows hosts where native pathname use a backslash. This convention + of using forward slashes is used as that is what Apache normalizes all + paths to internally. If you are using Windows and have been using + backward slashes with <code>Directory</code> directives etc, you are using + Apache contrary to what is the accepted norm. + +<P> +A further shortcut allows paths to be declared relative to what is + regarded as the handler root directory. The handler root directory is the + directory context in which the active <code>Python*Handler</code> directive was + specified. If the directive was specified within a <code>Location</code> or + <code>VirtualHost</code> directive, or at global server scope, the handler root + will be the relevant document root for the server. + +<P> +To express paths relative to the handler root, the '~/' prefix + should be used. A forward slash must again always be used, even on Windows. + +<P> +For example: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + + parent = apache.import_module('~/../module.py') + subdir = apache.import_module('~/subdir/module.py') +</pre></div> + +<P> +In all cases where a path to the actual code file for a module is given, + the <var>path</var> argument is redundant as there is no need to search + through a list of directories to find the module. In these situations, + the <var>path</var> is instead taken to be a list of directories to use as the + initial value of the <code>__mp_path__</code> variable contained in the + imported modules instead of an empty path. + +<P> +This feature can be used to attach a more restrictive search path to a + set of modules rather than using the <code>PythonOption</code> to set a global + search path. To do this, the modules should always be imported through a + specific parent module. That module should then always import submodules + using paths and supply <code>__mp_path__</code> as the <var>path</var> argument to + subsequent calls to <code>apache.import_module()</code> within that module. For + example: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + + module1 = apache.import_module('./module1.py', path=__mp_path__) + module2 = apache.import_module('./module2.py', path=__mp_path__) +</pre></div> + +<P> +with the module being imported as: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + + parent = apache.import_module('~/modules/parent.py', path=['/some/path']) +</pre></div> + +<P> +The parent module may if required extend the value of <code>__mp_path__</code> + prior to using it. Any such directories will be added to those inherited + via the <var>path</var> argument. For example: + +<P> +<div class="verbatim"><pre> + from mod_python import apache + import os + + here = os.path.dirname(__file__) + subdir = os.path.join(here, 'subdir') + __mp_path__.append(subdir) + + module1 = apache.import_module('./module1.py', path=__mp_path__) + module2 = apache.import_module('./module2.py', path=__mp_path__) +</pre></div> + +<P> +In all cases where a search path is being specified which is specific + to the mod_python module importer, whether it be specified using the + <code>PythonOption</code> called <code>mod_python.importer.path</code>, using the + <var>path</var> argument to the <code>apache.import_module()</code> function or + in the <code>__mp_path__</code> attribute, the prefix '~/' + can be used in a path and that path will be taken as being relative + to handler root. For example: + +<P> +<div class="verbatim"><pre> + PythonOption mod_python.importer.path "['~/modules']" +</pre></div> + +<P> +If wishing to refer to the handler root directory itself, then + '~' can be used and the trailing slash left off. For example: + +<P> +<div class="verbatim"><pre> + PythonOption mod_python.importer.path "['~']" +</pre></div> + +<P> +Note that with the new module importer, as directories associated with + <code>Python*Handler</code> directives are no longer being added automatically + to <code>sys.path</code> and they are instead used directly by the module + importer only when required, some existing code which expected to be able + to import modules in the handler root directory from a module in a + subdirectory may no longer work. In these situations it will be necessary + to set the mod_python module importer path to include '~' + or list '~' in the <code>__mp_path__</code> attribute of the module + performing the import. + +<P> +This trick of listing '~' in the module importer path + will not however help in the case where Python packages were previously + being placed into the handler root directory. In this case, the Python + package should either be moved out of the document tree and the directory + where it is located listed against the <code>PythonPath</code> directive, or the + package converted into the pseudo packages that mod_python supports and + change the module imports used to access the package. + +<P> +Only modules which could be imported by the mod_python module importer + will be candidates for automatic reloading when changes are made to the + code file on disk. Any modules or packages which were located in a + directory listed in <code>sys.path</code> and which were imported using the + standard Python module importer will not be candidates for reloading. + +<P> +Even where modules are candidates for module reloading, unless a true + value was explicitly supplied as the <var>autoreload</var> option to the + <code>apache.import_module()</code> function they will only be reloaded if the + <code>PythonAutoReload</code> directive is <code>On</code>. The default value when + the directive is not specified will be <code>On</code>, so the directive need + only be used when wishing to set it to <code>Off</code> to disable automatic + reloading, such as in a production system. + +<P> +Where possible, the <code>PythonAutoReload</code> directive should only be + specified in one place and in the root context for a specific Python + interpreter instance. If the <code>PythonAutoReload</code> directive is used in + multiple places with different values, or doesn't cover all directories + pertaining to a specific Python interpreter instance, then problems can + result. This is because requests against some URLs may result in modules + being reloaded whereas others may not, even when through each URL the + same module may be imported from a common location. + +<P> +If absolute certainty is required that module reloading is disabled and + that it isn't being enabled through some subset of URLs, the + <code>PythonImport</code> directive should be used to import a special module + whenever an Apache child process is being created. This module should + include a call to the <code>apache.freeze_modules()</code> function. This + will have the effect of permanently disabling module reloading for the + complete life of that Apache child process, irrespective of what value + the <code>PythonAutoReload</code> directive is set to. + +<P> +Using the new ability within mod_python 3.3 to have <code>PythonImport</code> + call a specific function within a module after it has been imported, + one could actually dispense with creating a module and instead call + the function directory out of the <code>mod_python.apache</code> module. + For example: + +<P> +<div class="verbatim"><pre> + PythonImport mod_python.apache::freeze_modules interpreter_name +</pre></div> + +<P> +Where module reloading is being undertaken, unlike the core module + importer in versions of mod_python prior to 3.3, they are not reloaded on + top of existing modules, but into a completely new module instance. This + means that any code that previously relied on state information or data + caches to be preserved across reloads will no longer work. + +<P> +If it is necessary to transfer such information from an old module to the + new module, it is necessary to provide a hook function within modules to + transfer across the data that must be preserved. The name of this hook + function is <code>__mp_clone__()</code>. The argument given to the hook + function will be an empty module into which the new module will subsequently + be loaded. + +<P> +When called, the hook function should copy any data from the old module + to the new module. In doing this, the code performing the copying should + be cognizant of the fact that within a multithreaded Apache MPM that + other request handlers could still be trying to access and update the + data to be copied. As such, the hook function should ensure that it uses + any thread locking mechanisms within the module as appropriate when + copying the data. Further, it should copy the actual data locks + themselves across to the new module to ensure a clean transition. + +<P> +Because copying integral values will result in the data then being + separate, it may be necessary to always store data within a dictionary so + as to provide a level of indirection which will allow the data to be + usable from both module instances while they still exist. + +<P> +For example: + +<P> +<div class="verbatim"><pre> + import threading, time + + if not globals().has_key('_lock'): + # Initial import of this module. + _lock = threading.Lock() + _data1 = { 'value1' : 0, 'value2': 0 } + _data2 = {} + + def __mp_clone__(module): + _lock.acquire() + module._lock = _lock + module._data1 = _data1 + module._data2 = _data2 + _lock.release() </pre></div> + +<P> +Because the old module is about to be discarded, the data which is + transferred should not consist of data objects which are dependent on + code within the old module. Data being copied across to the new module + should consist of standard Python data types, or be instances of classes + contained within modules which themselves are not candidates for + reloading. Otherwise, data should be migrated by transforming it into + some neutral intermediate state, with the new module transforming it back + when its code executes at the time of being imported. + +<P> +If these guidelines aren't heeded and data is dependent on code objects + within the old module, it will prevent those code objects from being + unloaded and if this continues across multiple reloads, then process size + may increase over time due to old code objects being retained. + +<P> +In any case, if for some reason the hook function fails and an exception + is raised then both the old and new modules will be discarded. As a last + opportunity to release any resources when this occurs, an extra hook + function called <code>__mp_purge__()</code> can be supplied. This function will + be called with no arguments. + +<P> </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-33"><tt class="function">allow_methods</tt></a></b>(</nobr></td> - <td><big>[</big><var>*args</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-33' xml:id='l2h-33' class="function">allow_methods</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>*args</var><big>]</big><var></var>)</td></tr></table></dt> <dd> A convenience function to set values in <tt class="member">req.allowed</tt>. <tt class="member">req.allowed</tt> is a bitmask that is used to construct the @@ -166,8 +672,8 @@ Arguments can be one or more of the following: <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-34"><tt class="function">exists_config_define</tt></a></b>(</nobr></td> - <td><var>name</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-34' xml:id='l2h-34' class="function">exists_config_define</tt></b>(</nobr></td> + <td><var>name</var>)</td></tr></table></dt> <dd> This function returns True if the Apache server was launched with the definition with the given <var>name</var>. This means @@ -177,44 +683,60 @@ Arguments can be one or more of the following: <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-35"><tt class="method">register_cleanup</tt></a></b>(</nobr></td> - <td><var>handler</var><big>[</big><var>, data</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-35' xml:id='l2h-35' class="function">stat</tt></b>(</nobr></td> + <td><var>fname, wanted</var>)</td></tr></table></dt> +<dd> + This function returns an instance of an <code>mp_finfo</code> object + describing information related to the file with name <code>fname</code>. + The <code>wanted</code> argument describes the minimum attributes which + should be filled out. The resultant object can be assigned to the + <code>req.finfo</code> attribute. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-36' xml:id='l2h-36' class="function">register_cleanup</tt></b>(</nobr></td> + <td><var>callable</var><big>[</big><var>, data</var><big>]</big><var></var>)</td></tr></table></dt> <dd> - Registers a cleanup. Equivalent to <tt class="function">req.register_cleanup()</tt> - or <tt class="function">req.server.register_cleanup()</tt>, except that a server or request - object is not required. + Registers a cleanup that will be performed at child shutdown time. Equivalent + to <tt class="function">server.register_cleanup()</tt>, except that a request object is not + required. + <em>Warning:</em> do not pass directly or indirectly a request object in the + data parameter. Since the callable will be called at server shutdown time, + the request object won't exist anymore and any manipulation of it in the + handler will give undefined behaviour. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-36"><tt class="function">config_tree</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-37' xml:id='l2h-37' class="function">config_tree</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns the server-level configuration tree. This tree does not - include directives from .htaccess files. This is a <i>copy</i> of + include directives from .htaccess files. This is a <em>copy</em> of the tree, modifying it has no effect on the actual configuration. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-37"><tt class="function">server_root</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-38' xml:id='l2h-38' class="function">server_root</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns the value of ServerRoot. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-38"><tt class="function">make_table</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-39' xml:id='l2h-39' class="function">make_table</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> This function is obsolete and is an alias to <tt class="class">table</tt> (see below). </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-39"><tt class="function">mpm_query</tt></a></b>(</nobr></td> - <td><var>code</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-40' xml:id='l2h-40' class="function">mpm_query</tt></b>(</nobr></td> + <td><var>code</var>)</td></tr></table></dt> <dd> Allows querying of the MPM for various parameters such as numbers of processes and threads. The return value is one of three constants: @@ -260,41 +782,40 @@ else: <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5 apache - Access" - rel="prev" title="4.5 apache - Access" - href="module-apache.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.2 Table Object (mp_table) " - rel="next" title="4.5.2 Table Object (mp_table) " - href="pyapi-mptable.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5 apache - Access" + href="module-apache.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.2 Attributes" + href="pyapi-apmem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mptable.html">4.5.2 Table Object (mp_table) </A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-apmem.html">4.5.2 Attributes</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-conn.html b/doc-html/pyapi-conn.html index 366f46f051959635462c13167cca960169e8d1c2..afcde8bb6aea79f0d6e5413a247fe488807b8810 100644 --- a/doc-html/pyapi-conn.html +++ b/doc-html/pyapi-conn.html @@ -1,68 +1,67 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="module-apache.html"> -<LINK REL="prev" href="pyapi-filter.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="module-apache.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Overview of a Connection Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="module-apache.html" /> +<link rel="prev" href="pyapi-filter.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="module-apache.html" /> +<meta name='aesop' content='information' /> <title>4.4 Overview of a Connection Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.3 Overview of a" - href="pyapi-filter.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5 apache - Access" - href="module-apache.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.3 Overview of a" + href="pyapi-filter.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5 apache - Access" + href="module-apache.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-filter.html">4.3 Overview of a</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="module-apache.html">4.5 apache - Access</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006400000000000000000"> </A> +<H1><A NAME="SECTION006400000000000000000"></A><A NAME="pyapi-conn"></A> <BR> 4.4 Overview of a Connection Handler </H1> -<a name="l2h-28"> </a> +<a id='l2h-28' xml:id='l2h-28'></a> <P> A <i class="dfn">connection handler</i> handles the connection, starting almost immediately from the point the TCP connection to the server was made. <P> -Unlike HTTP handlers, connection handlers receive a <i>connection</i> +Unlike HTTP handlers, connection handlers receive a <em>connection</em> object as an argument. <P> @@ -93,41 +92,40 @@ def connectionhandler(conn): <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.3 Overview of a" - rel="prev" title="4.3 Overview of a" - href="pyapi-filter.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5 apache - Access" - rel="next" title="4.5 apache - Access" - href="module-apache.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.3 Overview of a" + href="pyapi-filter.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5 apache - Access" + href="module-apache.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-filter.html">4.3 Overview of a</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="module-apache.html">4.5 apache - Access</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-cookie-classes.html b/doc-html/pyapi-cookie-classes.html index 17062107a41db65cfccc21eab30d7325acb00c44..b3006883465531dafefd0d55185fb227146302ce 100644 --- a/doc-html/pyapi-cookie-classes.html +++ b/doc-html/pyapi-cookie-classes.html @@ -1,65 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-cookie-func.html"> -<LINK REL="prev" href="pyapi-cookie.html"> -<LINK REL="parent" href="pyapi-cookie.html"> -<LINK REL="next" href="pyapi-cookie-func.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Classes"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-cookie-func.html" /> +<link rel="prev" href="pyapi-cookie.html" /> +<link rel="parent" href="pyapi-cookie.html" /> +<link rel="next" href="pyapi-cookie-func.html" /> +<meta name='aesop' content='information' /> <title>4.7.1 Classes</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.7.2 Functions" - href="pyapi-cookie-func.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.7.2 Functions" + href="pyapi-cookie-func.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-cookie-func.html">4.7.2 Functions</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006710000000000000000"> </A> +<H2><A NAME="SECTION006710000000000000000"></A><A NAME="pyapi-cookie-classes"></A> <BR> 4.7.1 Classes </H2> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-207"><tt class="class">Cookie</tt></a></b>(</nobr></td> - <td><var>name, value</var><big>[</big><var>, attributes</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-229' xml:id='l2h-229' class="class">Cookie</tt></b>(</nobr></td> + <td><var>name, value</var><big>[</big><var>, attributes</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -74,7 +73,7 @@ The attributes of the class represent cookie attributes, and their the cookie. The <tt class="class">Cookie</tt> class restricts attribute names to only valid values, specifically, only the following attributes are allowed: <code>name, value, version, path, domain, secure, comment, - expires, max_age, commentURL, discard, port, __data__</code>. + expires, max_age, commentURL, discard, port, httponly, __data__</code>. <P> The <code>__data__</code> attribute is a general-purpose dictionary that @@ -101,8 +100,8 @@ Unlike the Python Standard Library Cookie classes, this <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-208"><tt class="method">parse</tt></a></b>(</nobr></td> - <td><var>string</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-230' xml:id='l2h-230' class="method">parse</tt></b>(</nobr></td> + <td><var>string</var>)</td></tr></table></dt> <dd> This is a class method that can be used to create a <tt class="class">Cookie</tt> instance from a cookie string <var>string</var> as passed in a header @@ -139,8 +138,8 @@ Because this method uses a dictionary, it is not possible to <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-209"><tt class="class">SignedCookie</tt></a></b>(</nobr></td> - <td><var>name, value, secret</var><big>[</big><var>, attributes</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-231' xml:id='l2h-231' class="class">SignedCookie</tt></b>(</nobr></td> + <td><var>name, value, secret</var><big>[</big><var>, attributes</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -150,8 +149,8 @@ This is a subclass of <tt class="class">Cookie</tt>. This class creates cookies <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-210"><tt class="method">parse</tt></a></b>(</nobr></td> - <td><var>string, secret</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-232' xml:id='l2h-232' class="method">parse</tt></b>(</nobr></td> + <td><var>string, secret</var>)</td></tr></table></dt> <dd> This method acts the same way as <tt class="class">Cookie.parse()</tt>, but also verifies that the cookie is correctly signed. If the signature @@ -161,7 +160,7 @@ This is a subclass of <tt class="class">Cookie</tt>. This class creates cookies <P> <div class="note"><b class="label">Note:</b> Always check the types of objects returned by - <tt class="method">SignedCookie.parse()</tt>.If it is an instance of + <tt class="method">SignedCookie.parse()</tt>. If it is an instance of <tt class="class">Cookie</tt> (as opposed to <tt class="class">SignedCookie</tt>), the signature verification has failed: <div class="verbatim"><pre> @@ -177,8 +176,8 @@ if type(spam) is not Cookie.SignedCookie: <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-211"><tt class="class">MarshalCookie</tt></a></b>(</nobr></td> - <td><var>name, value, secret</var><big>[</big><var>, attributes</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-233' xml:id='l2h-233' class="class">MarshalCookie</tt></b>(</nobr></td> + <td><var>name, value, secret</var><big>[</big><var>, attributes</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -202,41 +201,40 @@ When parsing, the signature is checked first, so incorrectly signed cookies <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.7 Cookie - HTTP" - rel="prev" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.7 Cookie - HTTP" - rel="parent" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.7.2 Functions" - rel="next" title="4.7.2 Functions" - href="pyapi-cookie-func.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.7.2 Functions" + href="pyapi-cookie-func.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-cookie-func.html">4.7.2 Functions</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-cookie-example.html b/doc-html/pyapi-cookie-example.html index ffe603f565d04fb322a80f7ea3471d2443db8845..30640a25096b7760c36a4dffa435a480bc8578d0 100644 --- a/doc-html/pyapi-cookie-example.html +++ b/doc-html/pyapi-cookie-example.html @@ -1,56 +1,55 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-cookie-func.html"> -<LINK REL="parent" href="pyapi-cookie.html"> -<LINK REL="next" href="pyapi-sess.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Examples"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-cookie-func.html" /> +<link rel="parent" href="pyapi-cookie.html" /> +<link rel="next" href="pyapi-sess.html" /> +<meta name='aesop' content='information' /> <title>4.7.3 Examples</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.7.2 Functions" - href="pyapi-cookie-func.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.8 Session - Session" - href="pyapi-sess.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.7.2 Functions" + href="pyapi-cookie-func.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.8 Session - Session" + href="pyapi-sess.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-cookie-func.html">4.7.2 Functions</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-sess.html">4.8 Session - Session</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006730000000000000000"> </A> +<H2><A NAME="SECTION006730000000000000000"></A><A NAME="pyapi-cookie-example"></A> <BR> 4.7.3 Examples </H2> @@ -112,41 +111,40 @@ def handler(req): <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.7.2 Functions" - rel="prev" title="4.7.2 Functions" - href="pyapi-cookie-func.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.7 Cookie - HTTP" - rel="parent" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.8 Session - Session" - rel="next" title="4.8 Session - Session" - href="pyapi-sess.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.7.2 Functions" + href="pyapi-cookie-func.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.8 Session - Session" + href="pyapi-sess.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-cookie-func.html">4.7.2 Functions</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-sess.html">4.8 Session - Session</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-cookie-func.html b/doc-html/pyapi-cookie-func.html index d9054061e0a392e5557ebeaeb3bac07d3fdd0f7f..3db12a865e8bd2c8486ac9811ae8db5d9f6cac92 100644 --- a/doc-html/pyapi-cookie-func.html +++ b/doc-html/pyapi-cookie-func.html @@ -1,65 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-cookie-example.html"> -<LINK REL="prev" href="pyapi-cookie-classes.html"> -<LINK REL="parent" href="pyapi-cookie.html"> -<LINK REL="next" href="pyapi-cookie-example.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Functions"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-cookie-example.html" /> +<link rel="prev" href="pyapi-cookie-classes.html" /> +<link rel="parent" href="pyapi-cookie.html" /> +<link rel="next" href="pyapi-cookie-example.html" /> +<meta name='aesop' content='information' /> <title>4.7.2 Functions</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.7.1 Classes" - href="pyapi-cookie-classes.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.7.3 Examples" - href="pyapi-cookie-example.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.7.1 Classes" + href="pyapi-cookie-classes.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.7.3 Examples" + href="pyapi-cookie-example.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-cookie-classes.html">4.7.1 Classes</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-cookie-example.html">4.7.3 Examples</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006720000000000000000"> </A> +<H2><A NAME="SECTION006720000000000000000"></A><A NAME="pyapi-cookie-func"></A> <BR> 4.7.2 Functions </H2> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-212"><tt class="function">add_cookie</tt></a></b>(</nobr></td> - <td><var>req, cookie</var><big>[</big><var>, value, attributes</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-234' xml:id='l2h-234' class="function">add_cookie</tt></b>(</nobr></td> + <td><var>req, cookie</var><big>[</big><var>, value, attributes</var><big>]</big><var></var>)</td></tr></table></dt> <dd> This is a convenience function for setting a cookie in request headers. <var>req</var> is a mod_python <tt class="class">Request</tt> object. If @@ -88,8 +87,8 @@ Cookie.add_cookie(req, 'spam', 'eggs', expires=time.time()+300) <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-213"><tt class="function">get_cookies</tt></a></b>(</nobr></td> - <td><var>req </var><big>[</big><var>, Class, data</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-235' xml:id='l2h-235' class="function">get_cookies</tt></b>(</nobr></td> + <td><var>req </var><big>[</big><var>, Class, data</var><big>]</big><var></var>)</td></tr></table></dt> <dd> This is a convenience function for retrieving cookies from incoming headers. <var>req</var> is a mod_python <tt class="class">Request</tt> @@ -98,47 +97,63 @@ Cookie.add_cookie(req, 'spam', 'eggs', expires=time.time()+300) can be any number of keyword arguments which, will be passed to <tt class="method">parse()</tt> (This is useful for <tt class="class">signedCookie</tt> and <tt class="class">MarshalCookie</tt> which require <code>secret</code> as an additional - argument to <tt class="method">parse</tt>). + argument to <tt class="method">parse</tt>). The set of cookies found is returned as + a dictionary. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-236' xml:id='l2h-236' class="function">get_cookie</tt></b>(</nobr></td> + <td><var>req, name </var><big>[</big><var>, Class, data</var><big>]</big><var></var>)</td></tr></table></dt> +<dd> + This is a convenience function for retrieving a single named cookie + from incoming headers. <var>req</var> is a mod_python <tt class="class">Request</tt> + object. <var>name</var> is the name of the cookie. <var>Class</var> is a class + whose <tt class="method">parse()</tt> method will be used to parse the cookies, it + defaults to <code>Cookie</code>. <var>Data</var> can be any number of keyword + arguments which, will be passed to <tt class="method">parse()</tt> (This is useful for + <tt class="class">signedCookie</tt> and <tt class="class">MarshalCookie</tt> which require + <code>secret</code> as an additional argument to <tt class="method">parse</tt>). The cookie + if found is returned, otherwise <code>None</code> is returned. </dl> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.7.1 Classes" - rel="prev" title="4.7.1 Classes" - href="pyapi-cookie-classes.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.7 Cookie - HTTP" - rel="parent" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.7.3 Examples" - rel="next" title="4.7.3 Examples" - href="pyapi-cookie-example.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.7.1 Classes" + href="pyapi-cookie-classes.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.7.3 Examples" + href="pyapi-cookie-example.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-cookie-classes.html">4.7.1 Classes</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-cookie-example.html">4.7.3 Examples</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-cookie.html b/doc-html/pyapi-cookie.html index 2bd7953be66be4c41d36c9f2d396058d7d5d9b9a..a7d7e88b2418c0abbbb7d718e93103ba9b56da27 100644 --- a/doc-html/pyapi-cookie.html +++ b/doc-html/pyapi-cookie.html @@ -1,61 +1,60 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-sess.html"> -<LINK REL="prev" href="pyapi-util.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="pyapi-cookie-classes.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Cookie - HTTP State Management"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-sess.html" /> +<link rel="prev" href="pyapi-util.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="pyapi-cookie-classes.html" /> +<meta name='aesop' content='information' /> <title>4.7 Cookie - HTTP State Management</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6.4 Other functions" - href="pyapi-util-funcs.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.7.1 Classes" - href="pyapi-cookie-classes.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6.4 Other functions" + href="pyapi-util-funcs.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.7.1 Classes" + href="pyapi-cookie-classes.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util-funcs.html">4.6.4 Other functions</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-cookie-classes.html">4.7.1 Classes</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006700000000000000000"> </A> +<H1><A NAME="SECTION006700000000000000000"></A><A NAME="pyapi-cookie"></A> <BR> 4.7 <tt class="module">Cookie</tt> - HTTP State Management </H1> - +<A NAME="module-Cookie"></A> <P> The <tt class="module">Cookie</tt> module provides convenient ways for creating, @@ -82,43 +81,44 @@ More specifically, the biggest difference between Netscape and RFC cookies is <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="http://wp.netscape.com/newsref/std/cookie_spec.html" - >Persistent Client State - HTTP Cookies</a></em> - <dd>for the original Netscape specification. + >Persistent Client State - HTTP Cookies</a></em></dt> + <dd>for the original Netscape specification.</dd> </dl> - <dl compact class="seerfc"> + <dl compact="compact" class="seerfc"> <dt><a href="http://www.faqs.org/rfcs/rfc2109.html" title="HTTP State Management Mechanism" >RFC 2109, <em>HTTP State Management Mechanism</em></a> <dd>for the first RFC on Cookies. </dl> - <dl compact class="seerfc"> + <dl compact="compact" class="seerfc"> <dt><a href="http://www.faqs.org/rfcs/rfc2964.html" title="Use of HTTP State Management" >RFC 2964, <em>Use of HTTP State Management</em></a> <dd>for guidelines on using Cookies. </dl> - <dl compact class="seerfc"> + <dl compact="compact" class="seerfc"> <dt><a href="http://www.faqs.org/rfcs/rfc2965.html" title="HTTP State Management Mechanism" >RFC 2965, <em>HTTP State Management Mechanism</em></a> <dd>for the latest IETF standard. </dl> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="http://arxiv.org/abs/cs.SE/0105018" - >HTTP Cookies: Standards, Privacy, and Politics</a></em> + >HTTP Cookies: Standards, Privacy, and Politics</a></em></dt> <dd>by David M. Kristol for an excellent overview - of the issues surrounding standardization of Cookies. + of the issues surrounding standardization of Cookies.</dd> </dl> </div> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -128,43 +128,43 @@ More specifically, the biggest difference between Netscape and RFC cookies is <LI><A href="pyapi-cookie-example.html">4.7.3 Examples</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6.4 Other functions" - rel="prev" title="4.6.4 Other functions" - href="pyapi-util-funcs.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.7.1 Classes" - rel="next" title="4.7.1 Classes" - href="pyapi-cookie-classes.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6.4 Other functions" + href="pyapi-util-funcs.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.7.1 Classes" + href="pyapi-cookie-classes.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util-funcs.html">4.6.4 Other functions</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-cookie-classes.html">4.7.1 Classes</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-filter.html b/doc-html/pyapi-filter.html index 8b8780440caab4d5b176b5d2e52cf98732ee0875..7c6e1bdcadc770bb73c0a3da5d68a694bfa47f05 100644 --- a/doc-html/pyapi-filter.html +++ b/doc-html/pyapi-filter.html @@ -1,61 +1,60 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-conn.html"> -<LINK REL="prev" href="pyapi-handler.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="pyapi-conn.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Overview of a Filter Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-conn.html" /> +<link rel="prev" href="pyapi-handler.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="pyapi-conn.html" /> +<meta name='aesop' content='information' /> <title>4.3 Overview of a Filter Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.2 Overview of a" - href="pyapi-handler.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.4 Overview of a" - href="pyapi-conn.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.2 Overview of a" + href="pyapi-handler.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.4 Overview of a" + href="pyapi-conn.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-handler.html">4.2 Overview of a</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-conn.html">4.4 Overview of a</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006300000000000000000"> </A> +<H1><A NAME="SECTION006300000000000000000"></A><A NAME="pyapi-filter"></A> <BR> 4.3 Overview of a Filter Handler </H1> -<a name="l2h-27"> </a> +<a id='l2h-27' xml:id='l2h-27'></a> <P> A <i class="dfn">filter handler</i> is a function that can alter the input or the output of the server. There are two kinds of filters - <i class="dfn">input</i> and @@ -69,7 +68,7 @@ provides support for connection-level filters, which will be supported in the future. <P> -A filter handler receives a <i>filter</i> object as its argument. The +A filter handler receives a <em>filter</em> object as its argument. The request object is available as well via <code>filter.req</code>, but all writing and reading should be done via the filter's object read and write methods. @@ -144,41 +143,40 @@ For more information on filters, see <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.2 Overview of a" - rel="prev" title="4.2 Overview of a" - href="pyapi-handler.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.4 Overview of a" - rel="next" title="4.4 Overview of a" - href="pyapi-conn.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.2 Overview of a" + href="pyapi-handler.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.4 Overview of a" + href="pyapi-conn.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-handler.html">4.2 Overview of a</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-conn.html">4.4 Overview of a</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-handler.html b/doc-html/pyapi-handler.html index 963527f3f10fffba1d0892dd2446b612247f2b95..d5c334a269b6db494d40ab2fd856c08da2450209 100644 --- a/doc-html/pyapi-handler.html +++ b/doc-html/pyapi-handler.html @@ -1,61 +1,60 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-filter.html"> -<LINK REL="prev" href="pyapi-interps.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="pyapi-filter.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Overview of a Request Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-filter.html" /> +<link rel="prev" href="pyapi-interps.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="pyapi-filter.html" /> +<meta name='aesop' content='information' /> <title>4.2 Overview of a Request Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.1 Multiple Interpreters" - href="pyapi-interps.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.3 Overview of a" - href="pyapi-filter.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.1 Multiple Interpreters" + href="pyapi-interps.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.3 Overview of a" + href="pyapi-filter.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-interps.html">4.1 Multiple Interpreters</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-filter.html">4.3 Overview of a</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006200000000000000000"> </A> +<H1><A NAME="SECTION006200000000000000000"></A><A NAME="pyapi-handler"></A> <BR> 4.2 Overview of a Request Handler </H1> -<a name="l2h-24"> </a> +<a id='l2h-24' xml:id='l2h-24'></a> <P> A <i class="dfn">handler</i> is a function that processes a particular phase of a request. Apache processes requests in phases - read the request, @@ -66,7 +65,7 @@ user and written in Python. A handler written in Python is not any different from a handler written in C, and follows these rules: <P> -<a name="l2h-26"> </a> <a name="l2h-25"> </a> A handler function will always +<a id='l2h-26' xml:id='l2h-26'></a> <a id='l2h-25' xml:id='l2h-25'></a> A handler function will always be passed a reference to a request object. (Throughout this manual, the request object is often referred to by the <code>req</code> variable.) @@ -87,7 +86,7 @@ Every handler can return: <P> </LI> -<LI><tt class="constant">apache.<i>HTTP_ERROR</i></tt>, meaning an HTTP error occurred. +<LI><tt class="constant">apache.<em>HTTP_ERROR</em></tt>, meaning an HTTP error occurred. <var>HTTP_ERROR</var> can be any of the following: <P> @@ -147,8 +146,8 @@ Every handler can return: </UL> <P> -As an alternative to <i>returning</i> an HTTP error code, handlers can -signal an error by <i>raising</i> the <tt class="constant">apache.SERVER_RETURN</tt> +As an alternative to <em>returning</em> an HTTP error code, handlers can +signal an error by <em>raising</em> the <tt class="constant">apache.SERVER_RETURN</tt> exception, and providing an HTTP error code as the exception value, e.g. @@ -189,41 +188,40 @@ def requesthandler(req): <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.1 Multiple Interpreters" - rel="prev" title="4.1 Multiple Interpreters" - href="pyapi-interps.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.3 Overview of a" - rel="next" title="4.3 Overview of a" - href="pyapi-filter.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.1 Multiple Interpreters" + href="pyapi-interps.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.3 Overview of a" + href="pyapi-filter.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-interps.html">4.1 Multiple Interpreters</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-filter.html">4.3 Overview of a</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-interps.html b/doc-html/pyapi-interps.html index 65481d41559ad9dc25455574fa7fb91a677722d6..a5c2a9f63c5913e08c1f85092f86979c1f65c8f8 100644 --- a/doc-html/pyapi-interps.html +++ b/doc-html/pyapi-interps.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-handler.html"> -<LINK REL="prev" href="pythonapi.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="pyapi-handler.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Multiple Interpreters"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-handler.html" /> +<link rel="prev" href="pythonapi.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="pyapi-handler.html" /> +<meta name='aesop' content='information' /> <title>4.1 Multiple Interpreters</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4. Python API" - href="pythonapi.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.2 Overview of a" - href="pyapi-handler.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4. Python API" + href="pythonapi.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.2 Overview of a" + href="pyapi-handler.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pythonapi.html">4. Python API</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-handler.html">4.2 Overview of a</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006100000000000000000"> </A> +<H1><A NAME="SECTION006100000000000000000"></A><A NAME="pyapi-interps"></A> <BR> 4.1 Multiple Interpreters </H1> @@ -88,8 +87,8 @@ initializes an interpreter called <i class="dfn">main</i> interpreter. The main interpreter contains a dictionary of subinterpreters. Initially, this dictionary is empty. With every request, as needed, subinterpreters are created, and references to them are stored in this dictionary. The -dictionary is keyed on a string, also known as <i>interpreter -name</i>. This name can be any string. The main interpreter is named +dictionary is keyed on a string, also known as <em>interpreter +name</em>. This name can be any string. The main interpreter is named "<tt class="samp">main_interpreter</tt>". The way all other interpreters are named can be controlled by <code>PythonInterp*</code> directives. Default behaviour is to name interpreters using the Apache virtual server name @@ -131,62 +130,61 @@ name must be forcibly set to be "<tt class="samp">main_interpreter</tt>". This i as such a module will only work correctly if run within the context of the first Python interpreter created by the process. If not forced to run under the "<tt class="samp">main_interpreter</tt>", a range of Python errors can arise, -each typically referring to code being run in <i>restricted mode</i>. +each typically referring to code being run in <em>restricted mode</em>. <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="http://www.python.org/doc/current/api/api.html" - >Python C Language API</a></em> - <dd>Python C Language API + >Python C Language API</a></em></dt> + <dd>Python C Language API</dd> </dl> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="http://www.python.org/peps/pep-0311.html" - >PEP 0311 - Simplified Global Interpreter Lock Acquisition for Extensions</a></em> - <dd>PEP 0311 - Simplified Global Interpreter Lock Acquisition for Extensions + >PEP 0311 - Simplified Global Interpreter Lock Acquisition for Extensions</a></em></dt> + <dd>PEP 0311 - Simplified Global Interpreter Lock Acquisition for Extensions</dd> </dl> </div> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4. Python API" - rel="prev" title="4. Python API" - href="pythonapi.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.2 Overview of a" - rel="next" title="4.2 Overview of a" - href="pyapi-handler.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4. Python API" + href="pythonapi.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.2 Overview of a" + href="pyapi-handler.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pythonapi.html">4. Python API</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-handler.html">4.2 Overview of a</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpconn-mem.html b/doc-html/pyapi-mpconn-mem.html index 1003112f61520a690e54f207e4f362dde8d7bd65..ece58f56bdb6ebe402778d9592d5f43e8942a940 100644 --- a/doc-html/pyapi-mpconn-mem.html +++ b/doc-html/pyapi-mpconn-mem.html @@ -1,157 +1,156 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-mpconn-meth.html"> -<LINK REL="parent" href="pyapi-mpconn.html"> -<LINK REL="next" href="pyapi-mpfilt.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Connection Members"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.4.2 Connection Members</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-mpconn-meth.html" /> +<link rel="parent" href="pyapi-mpconn.html" /> +<link rel="next" href="pyapi-mpfilt.html" /> +<meta name='aesop' content='information' /> +<title>4.5.5.2 Connection Members</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.4.1 Connection Methods" - href="pyapi-mpconn-meth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.4 Connection Object (mp_conn) " - href="pyapi-mpconn.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.5 Filter Object (mp_filter) " - href="pyapi-mpfilt.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.5.1 Connection Methods" + href="pyapi-mpconn-meth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.5 Connection Object (mp_conn)" + href="pyapi-mpconn.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.6 Filter Object (mp_filter)" + href="pyapi-mpfilt.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpconn-meth.html">4.5.4.1 Connection Methods</A> +<a class="sectref" rel="prev" href="pyapi-mpconn-meth.html">4.5.5.1 Connection Methods</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </A> +<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION006542000000000000000"> </A> +<H3><A NAME="SECTION006552000000000000000"></A><A NAME="pyapi-mpconn-mem"></A> <BR> -4.5.4.2 Connection Members +4.5.5.2 Connection Members </H3> <P> -<dl><dt><b><a name="l2h-134"><tt class="member">base_server</tt></a></b> +<dl><dt><b><tt id='l2h-149' xml:id='l2h-149' class="member">base_server</tt></b></dt> <dd> A <code>server</code> object for the physical vhost that this connection came in through. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-135"><tt class="member">local_addr</tt></a></b> +<dl><dt><b><tt id='l2h-150' xml:id='l2h-150' class="member">local_addr</tt></b></dt> <dd> The (address, port) tuple for the server. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-136"><tt class="member">remote_addr</tt></a></b> +<dl><dt><b><tt id='l2h-151' xml:id='l2h-151' class="member">remote_addr</tt></b></dt> <dd> The (address, port) tuple for the client. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-137"><tt class="member">remote_ip</tt></a></b> +<dl><dt><b><tt id='l2h-152' xml:id='l2h-152' class="member">remote_ip</tt></b></dt> <dd> - String with the IP of the client. Same as CGI <a class="envvar" name="l2h-148">REMOTE_ADDR</a>. - <i>(Read-Only</i>) + String with the IP of the client. Same as CGI <a class="envvar" id='l2h-163' xml:id='l2h-163'>REMOTE_ADDR</a>. + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-138"><tt class="member">remote_host</tt></a></b> +<dl><dt><b><tt id='l2h-153' xml:id='l2h-153' class="member">remote_host</tt></b></dt> <dd> String. The DNS name of the remote client. None if DNS has not been - checked, <code>""</code> (empty string) if no name found. Same as CGI <a class="envvar" name="l2h-149">REMOTE_HOST</a>. - <i>(Read-Only</i>) + checked, <code>""</code> (empty string) if no name found. Same as CGI <a class="envvar" id='l2h-164' xml:id='l2h-164'>REMOTE_HOST</a>. + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-139"><tt class="member">remote_logname</tt></a></b> +<dl><dt><b><tt id='l2h-154' xml:id='l2h-154' class="member">remote_logname</tt></b></dt> <dd> - Remote name if using RFC1413 (ident). Same as CGI <a class="envvar" name="l2h-150">REMOTE_IDENT</a>. - <i>(Read-Only</i>) + Remote name if using RFC1413 (ident). Same as CGI <a class="envvar" id='l2h-165' xml:id='l2h-165'>REMOTE_IDENT</a>. + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-140"><tt class="member">aborted</tt></a></b> +<dl><dt><b><tt id='l2h-155' xml:id='l2h-155' class="member">aborted</tt></b></dt> <dd> Boolean. True is the connection is aborted. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-141"><tt class="member">keepalive</tt></a></b> +<dl><dt><b><tt id='l2h-156' xml:id='l2h-156' class="member">keepalive</tt></b></dt> <dd> Integer. 1 means the connection will be kept for the next request, 0 means ``undecided'', -1 means ``fatal error''. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-142"><tt class="member">double_reverse</tt></a></b> +<dl><dt><b><tt id='l2h-157' xml:id='l2h-157' class="member">double_reverse</tt></b></dt> <dd> Integer. 1 means double reverse DNS lookup has been performed, 0 means not yet, -1 means yes and it failed. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-143"><tt class="member">keepalives</tt></a></b> +<dl><dt><b><tt id='l2h-158' xml:id='l2h-158' class="member">keepalives</tt></b></dt> <dd> The number of times this connection has been used. (?) - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-144"><tt class="member">local_ip</tt></a></b> +<dl><dt><b><tt id='l2h-159' xml:id='l2h-159' class="member">local_ip</tt></b></dt> <dd> String with the IP of the server. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-145"><tt class="member">local_host</tt></a></b> +<dl><dt><b><tt id='l2h-160' xml:id='l2h-160' class="member">local_host</tt></b></dt> <dd> DNS name of the server. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-146"><tt class="member">id</tt></a></b> +<dl><dt><b><tt id='l2h-161' xml:id='l2h-161' class="member">id</tt></b></dt> <dd> Long. A unique connection id. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-147"><tt class="member">notes</tt></a></b> +<dl><dt><b><tt id='l2h-162' xml:id='l2h-162' class="member">notes</tt></b></dt> <dd> A <code>table</code> object containing miscellaneous general purpose info that lives for as long as the connection lives. @@ -160,41 +159,40 @@ <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.4.1 Connection Methods" - rel="prev" title="4.5.4.1 Connection Methods" - href="pyapi-mpconn-meth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.4 Connection Object (mp_conn) " - rel="parent" title="4.5.4 Connection Object (mp_conn) " - href="pyapi-mpconn.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.5 Filter Object (mp_filter) " - rel="next" title="4.5.5 Filter Object (mp_filter) " - href="pyapi-mpfilt.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.5.1 Connection Methods" + href="pyapi-mpconn-meth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.5 Connection Object (mp_conn)" + href="pyapi-mpconn.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.6 Filter Object (mp_filter)" + href="pyapi-mpfilt.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpconn-meth.html">4.5.4.1 Connection Methods</A> +<a class="sectref" rel="prev" href="pyapi-mpconn-meth.html">4.5.5.1 Connection Methods</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </A> +<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpconn-meth.html b/doc-html/pyapi-mpconn-meth.html index a1a66eebe5938e2dc7d9d0d5c1d751a27521122a..136a5b1396038ef1324dc187b96e13c7b0321522 100644 --- a/doc-html/pyapi-mpconn-meth.html +++ b/doc-html/pyapi-mpconn-meth.html @@ -1,65 +1,91 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mpconn-mem.html"> -<LINK REL="prev" href="pyapi-mpconn.html"> -<LINK REL="parent" href="pyapi-mpconn.html"> -<LINK REL="next" href="pyapi-mpconn-mem.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Connection Methods"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.4.1 Connection Methods</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mpconn-mem.html" /> +<link rel="prev" href="pyapi-mpconn.html" /> +<link rel="parent" href="pyapi-mpconn.html" /> +<link rel="next" href="pyapi-mpconn-mem.html" /> +<meta name='aesop' content='information' /> +<title>4.5.5.1 Connection Methods</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.4 Connection Object (mp_conn) " - href="pyapi-mpconn.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.4 Connection Object (mp_conn) " - href="pyapi-mpconn.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.4.2 Connection Members" - href="pyapi-mpconn-mem.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.5 Connection Object (mp_conn)" + href="pyapi-mpconn.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.5 Connection Object (mp_conn)" + href="pyapi-mpconn.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.5.2 Connection Members" + href="pyapi-mpconn-mem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </A> +<a class="sectref" rel="prev" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </A> +<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION006541000000000000000"> </A> +<H3><A NAME="SECTION006551000000000000000"></A><A NAME="pyapi-mpconn-meth"></A> <BR> -4.5.4.1 Connection Methods +4.5.5.1 Connection Methods </H3> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-131"><tt class="method">read</tt></a></b>(</nobr></td> - <td><big>[</big><var>length</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-145' xml:id='l2h-145' class="method">log_error</tt></b>(</nobr></td> + <td><var>message</var><big>[</big><var>, level</var><big>]</big><var></var>)</td></tr></table></dt> +<dd> + An interface to the Apache <code>ap_log_cerror</code> + function. <var>message</var> is a string with the error message, + <var>level</var> is one of the following flags constants: + +<P> +<div class="verbatim"><pre> + APLOG_EMERG + APLOG_ALERT + APLOG_CRIT + APLOG_ERR + APLOG_WARNING + APLOG_NOTICE + APLOG_INFO + APLOG_DEBUG + APLOG_NOERRNO +</pre></div> + +<P> +If you need to write to log and do not have a reference to a connection or + request object, use the <tt class="function">apache.log_error</tt> function. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-146' xml:id='l2h-146' class="method">read</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>length</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Reads at most <var>length</var> bytes from the client. The read blocks indefinitely until there is at least one byte to read. If length is @@ -67,7 +93,7 @@ is known as <code>EXHAUSTIVE</code> mode in the http server code). <P> -This method should only be used inside <i>Connection Handlers</i>. +This method should only be used inside <em>Connection Handlers</em>. <P> <div class="note"><b class="label">Note:</b> @@ -81,30 +107,30 @@ The behaviour of this method has changed since version 3.0.3. In <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-132"><tt class="method">readline</tt></a></b>(</nobr></td> - <td><big>[</big><var>length</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-147' xml:id='l2h-147' class="method">readline</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>length</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> Reads a line from the connection or up to <var>length</var> bytes. <P> -This method should only be used inside <i>Connection Handlers</i>. +This method should only be used inside <em>Connection Handlers</em>. <P> </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-133"><tt class="method">write</tt></a></b>(</nobr></td> - <td><var>string</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-148' xml:id='l2h-148' class="method">write</tt></b>(</nobr></td> + <td><var>string</var>)</td></tr></table></dt> <dd> <P> Writes <var>string</var> to the client. <P> -This method should only be used inside <i>Connection Handlers</i>. +This method should only be used inside <em>Connection Handlers</em>. <P> </dl> @@ -112,41 +138,40 @@ This method should only be used inside <i>Connection Handlers</i>. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.4 Connection Object (mp_conn) " - rel="prev" title="4.5.4 Connection Object (mp_conn) " - href="pyapi-mpconn.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.4 Connection Object (mp_conn) " - rel="parent" title="4.5.4 Connection Object (mp_conn) " - href="pyapi-mpconn.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.4.2 Connection Members" - rel="next" title="4.5.4.2 Connection Members" - href="pyapi-mpconn-mem.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.5 Connection Object (mp_conn)" + href="pyapi-mpconn.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.5 Connection Object (mp_conn)" + href="pyapi-mpconn.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.5.2 Connection Members" + href="pyapi-mpconn-mem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </A> +<a class="sectref" rel="prev" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </A> +<a class="sectref" rel="parent" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpconn.html b/doc-html/pyapi-mpconn.html index e40f4dfb58f55c170ffb6f53c11c9602ba4f09f7..b969e278d8571ca87de1c50eee9e03004b76937d 100644 --- a/doc-html/pyapi-mpconn.html +++ b/doc-html/pyapi-mpconn.html @@ -1,59 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mpfilt.html"> -<LINK REL="prev" href="pyapi-mprequest.html"> -<LINK REL="parent" href="module-apache.html"> -<LINK REL="next" href="pyapi-mpconn-meth.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Connection Object (mp_conn) "> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.4 Connection Object (mp_conn) </title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mpfilt.html" /> +<link rel="prev" href="pyapi-mprequest.html" /> +<link rel="parent" href="module-apache.html" /> +<link rel="next" href="pyapi-mpconn-meth.html" /> +<meta name='aesop' content='information' /> +<title>4.5.5 Connection Object (mp_conn)</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.3.2 Request Members" - href="pyapi-mprequest-mem.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.4.1 Connection Methods" - href="pyapi-mpconn-meth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.4.2 Request Members" + href="pyapi-mprequest-mem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.5.1 Connection Methods" + href="pyapi-mpconn-meth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mprequest-mem.html">4.5.3.2 Request Members</A> +<a class="sectref" rel="prev" href="pyapi-mprequest-mem.html">4.5.4.2 Request Members</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpconn-meth.html">4.5.4.1 Connection Methods</A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpconn-meth.html">4.5.5.1 Connection Methods</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006540000000000000000"> </A> +<H2><A NAME="SECTION006550000000000000000"></A><A NAME="pyapi-mpconn"></A> <BR> -4.5.4 Connection Object (mp_conn)<a name="l2h-130"> </a> +4.5.5 Connection Object (mp_conn)<a id='l2h-144' xml:id='l2h-144'></a> </H2> <P> @@ -62,52 +61,53 @@ structure. <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> -<LI><A href="pyapi-mpconn-meth.html">4.5.4.1 Connection Methods</a> -<LI><A href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</a> +<LI><A href="pyapi-mpconn-meth.html">4.5.5.1 Connection Methods</a> +<LI><A href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.3.2 Request Members" - rel="prev" title="4.5.3.2 Request Members" - href="pyapi-mprequest-mem.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.4.1 Connection Methods" - rel="next" title="4.5.4.1 Connection Methods" - href="pyapi-mpconn-meth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.4.2 Request Members" + href="pyapi-mprequest-mem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.5.1 Connection Methods" + href="pyapi-mpconn-meth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mprequest-mem.html">4.5.3.2 Request Members</A> +<a class="sectref" rel="prev" href="pyapi-mprequest-mem.html">4.5.4.2 Request Members</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpconn-meth.html">4.5.4.1 Connection Methods</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpconn-meth.html">4.5.5.1 Connection Methods</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpfilt-mem.html b/doc-html/pyapi-mpfilt-mem.html index 764c2b5c8e1e1b2a15ae5d741a70cfa135f3ce02..17cb2131a8cdc67eb4d907db697ce491004e056d 100644 --- a/doc-html/pyapi-mpfilt-mem.html +++ b/doc-html/pyapi-mpfilt-mem.html @@ -1,134 +1,132 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-mpfilt-meth.html"> -<LINK REL="parent" href="pyapi-mpfilt.html"> -<LINK REL="next" href="pyapi-mpserver.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Filter Members"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.5.2 Filter Members</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-mpfilt-meth.html" /> +<link rel="parent" href="pyapi-mpfilt.html" /> +<link rel="next" href="pyapi-mpserver.html" /> +<meta name='aesop' content='information' /> +<title>4.5.6.2 Filter Members</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.5.1 Filter Methods" - href="pyapi-mpfilt-meth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.5 Filter Object (mp_filter) " - href="pyapi-mpfilt.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.6 Server Object (mp_server) " - href="pyapi-mpserver.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.6.1 Filter Methods" + href="pyapi-mpfilt-meth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.6 Filter Object (mp_filter)" + href="pyapi-mpfilt.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.7 Server Object (mp_server)" + href="pyapi-mpserver.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpfilt-meth.html">4.5.5.1 Filter Methods</A> +<a class="sectref" rel="prev" href="pyapi-mpfilt-meth.html">4.5.6.1 Filter Methods</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </A> +<a class="sectref" rel="parent" href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION006552000000000000000"> </A> +<H3><A NAME="SECTION006562000000000000000"></A><A NAME="pyapi-mpfilt-mem"></A> <BR> -4.5.5.2 Filter Members +4.5.6.2 Filter Members </H3> <P> -<dl><dt><b><a name="l2h-159"><tt class="member">closed</tt></a></b> +<dl><dt><b><tt id='l2h-174' xml:id='l2h-174' class="member">closed</tt></b></dt> <dd> A boolean value indicating whether a filter is closed. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-160"><tt class="member">name</tt></a></b> +<dl><dt><b><tt id='l2h-175' xml:id='l2h-175' class="member">name</tt></b></dt> <dd> String. The name under which this filter is registered. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-161"><tt class="member">req</tt></a></b> +<dl><dt><b><tt id='l2h-176' xml:id='l2h-176' class="member">req</tt></b></dt> <dd> A reference to the request object. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-162"><tt class="member">is_input</tt></a></b> +<dl><dt><b><tt id='l2h-177' xml:id='l2h-177' class="member">is_input</tt></b></dt> <dd> Boolean. True if this is an input filter. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-163"><tt class="member">handler</tt></a></b> +<dl><dt><b><tt id='l2h-178' xml:id='l2h-178' class="member">handler</tt></b></dt> <dd> String. The name of the Python handler for this filter as specified in the configuration. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.5.1 Filter Methods" - rel="prev" title="4.5.5.1 Filter Methods" - href="pyapi-mpfilt-meth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.5 Filter Object (mp_filter) " - rel="parent" title="4.5.5 Filter Object (mp_filter) " - href="pyapi-mpfilt.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.6 Server Object (mp_server) " - rel="next" title="4.5.6 Server Object (mp_server) " - href="pyapi-mpserver.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.6.1 Filter Methods" + href="pyapi-mpfilt-meth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.6 Filter Object (mp_filter)" + href="pyapi-mpfilt.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.7 Server Object (mp_server)" + href="pyapi-mpserver.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpfilt-meth.html">4.5.5.1 Filter Methods</A> +<a class="sectref" rel="prev" href="pyapi-mpfilt-meth.html">4.5.6.1 Filter Methods</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </A> +<a class="sectref" rel="parent" href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpfilt-meth.html b/doc-html/pyapi-mpfilt-meth.html index 1d9a4650730542b64fa87c717678a8a4909168a1..8be8198c6e95d236ea07b05e52c55ce1dd157fd1 100644 --- a/doc-html/pyapi-mpfilt-meth.html +++ b/doc-html/pyapi-mpfilt-meth.html @@ -1,77 +1,76 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mpfilt-mem.html"> -<LINK REL="prev" href="pyapi-mpfilt.html"> -<LINK REL="parent" href="pyapi-mpfilt.html"> -<LINK REL="next" href="pyapi-mpfilt-mem.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Filter Methods"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.5.1 Filter Methods</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mpfilt-mem.html" /> +<link rel="prev" href="pyapi-mpfilt.html" /> +<link rel="parent" href="pyapi-mpfilt.html" /> +<link rel="next" href="pyapi-mpfilt-mem.html" /> +<meta name='aesop' content='information' /> +<title>4.5.6.1 Filter Methods</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.5 Filter Object (mp_filter) " - href="pyapi-mpfilt.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.5 Filter Object (mp_filter) " - href="pyapi-mpfilt.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.5.2 Filter Members" - href="pyapi-mpfilt-mem.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.6 Filter Object (mp_filter)" + href="pyapi-mpfilt.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.6 Filter Object (mp_filter)" + href="pyapi-mpfilt.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.6.2 Filter Members" + href="pyapi-mpfilt-mem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </A> +<a class="sectref" rel="prev" href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </A> +<a class="sectref" rel="parent" href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpfilt-mem.html">4.5.5.2 Filter Members</A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpfilt-mem.html">4.5.6.2 Filter Members</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION006551000000000000000"> </A> +<H3><A NAME="SECTION006561000000000000000"></A><A NAME="pyapi-mpfilt-meth"></A> <BR> -4.5.5.1 Filter Methods +4.5.6.1 Filter Methods </H3> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-152"><tt class="method">pass_on</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-167' xml:id='l2h-167' class="method">pass_on</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Passes all data through the filter without any processing. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-153"><tt class="method">read</tt></a></b>(</nobr></td> - <td><big>[</big><var>length</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-168' xml:id='l2h-168' class="method">read</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>length</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Reads at most <var>len</var> bytes from the next filter, returning a string with the data read or None if End Of Stream (EOS) has been reached. A - filter <i>must</i> be closed once the EOS has been encountered. + filter <em>must</em> be closed once the EOS has been encountered. <P> If the <var>len</var> argument is negative or omitted, reads all data @@ -80,32 +79,32 @@ If the <var>len</var> argument is negative or omitted, reads all data <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-154"><tt class="method">readline</tt></a></b>(</nobr></td> - <td><big>[</big><var>length</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-169' xml:id='l2h-169' class="method">readline</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>length</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Reads a line from the next filter or up to <var>length</var> bytes. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-155"><tt class="method">write</tt></a></b>(</nobr></td> - <td><var>string</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-170' xml:id='l2h-170' class="method">write</tt></b>(</nobr></td> + <td><var>string</var>)</td></tr></table></dt> <dd> Writes <var>string</var> to the next filter. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-156"><tt class="method">flush</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-171' xml:id='l2h-171' class="method">flush</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Flushes the output by sending a FLUSH bucket. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-157"><tt class="method">close</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-172' xml:id='l2h-172' class="method">close</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Closes the filter and sends an EOS bucket. Any further IO operations on this filter will throw an exception. @@ -113,8 +112,8 @@ If the <var>len</var> argument is negative or omitted, reads all data <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-158"><tt class="method">disable</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-173' xml:id='l2h-173' class="method">disable</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Tells mod_python to ignore the provided handler and just pass the data on. Used internally by mod_python to print traceback from exceptions @@ -124,41 +123,40 @@ If the <var>len</var> argument is negative or omitted, reads all data <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.5 Filter Object (mp_filter) " - rel="prev" title="4.5.5 Filter Object (mp_filter) " - href="pyapi-mpfilt.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.5 Filter Object (mp_filter) " - rel="parent" title="4.5.5 Filter Object (mp_filter) " - href="pyapi-mpfilt.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.5.2 Filter Members" - rel="next" title="4.5.5.2 Filter Members" - href="pyapi-mpfilt-mem.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.6 Filter Object (mp_filter)" + href="pyapi-mpfilt.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.6 Filter Object (mp_filter)" + href="pyapi-mpfilt.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.6.2 Filter Members" + href="pyapi-mpfilt-mem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </A> +<a class="sectref" rel="prev" href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter) </A> +<a class="sectref" rel="parent" href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpfilt-mem.html">4.5.5.2 Filter Members</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpfilt-mem.html">4.5.6.2 Filter Members</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpfilt.html b/doc-html/pyapi-mpfilt.html index 6115ff721a6100534c5875f6f92489b7ce5b71df..02f7538ae8990439960e9518ab2590d6a4f1dcef 100644 --- a/doc-html/pyapi-mpfilt.html +++ b/doc-html/pyapi-mpfilt.html @@ -1,59 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mpserver.html"> -<LINK REL="prev" href="pyapi-mpconn.html"> -<LINK REL="parent" href="module-apache.html"> -<LINK REL="next" href="pyapi-mpfilt-meth.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Filter Object (mp_filter) "> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.5 Filter Object (mp_filter) </title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mpserver.html" /> +<link rel="prev" href="pyapi-mpconn.html" /> +<link rel="parent" href="module-apache.html" /> +<link rel="next" href="pyapi-mpfilt-meth.html" /> +<meta name='aesop' content='information' /> +<title>4.5.6 Filter Object (mp_filter)</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.4.2 Connection Members" - href="pyapi-mpconn-mem.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.5.1 Filter Methods" - href="pyapi-mpfilt-meth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.5.2 Connection Members" + href="pyapi-mpconn-mem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.6.1 Filter Methods" + href="pyapi-mpfilt-meth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</A> +<a class="sectref" rel="prev" href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpfilt-meth.html">4.5.5.1 Filter Methods</A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpfilt-meth.html">4.5.6.1 Filter Methods</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006550000000000000000"> </A> +<H2><A NAME="SECTION006560000000000000000"></A><A NAME="pyapi-mpfilt"></A> <BR> -4.5.5 Filter Object (mp_filter)<a name="l2h-151"> </a> +4.5.6 Filter Object (mp_filter)<a id='l2h-166' xml:id='l2h-166'></a> </H2> <P> @@ -63,52 +62,53 @@ information to adjacent filters in the filter stack. <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> -<LI><A href="pyapi-mpfilt-meth.html">4.5.5.1 Filter Methods</a> -<LI><A href="pyapi-mpfilt-mem.html">4.5.5.2 Filter Members</a> +<LI><A href="pyapi-mpfilt-meth.html">4.5.6.1 Filter Methods</a> +<LI><A href="pyapi-mpfilt-mem.html">4.5.6.2 Filter Members</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.4.2 Connection Members" - rel="prev" title="4.5.4.2 Connection Members" - href="pyapi-mpconn-mem.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.5.1 Filter Methods" - rel="next" title="4.5.5.1 Filter Methods" - href="pyapi-mpfilt-meth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.5.2 Connection Members" + href="pyapi-mpconn-mem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.6.1 Filter Methods" + href="pyapi-mpfilt-meth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</A> +<a class="sectref" rel="prev" href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpfilt-meth.html">4.5.5.1 Filter Methods</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpfilt-meth.html">4.5.6.1 Filter Methods</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mprequest-mem.html b/doc-html/pyapi-mprequest-mem.html index 6aa6f35e37f512a6e15bce2eb9eb997ba681f4db..64aa449f2cd7f1ea75638ac4ba35389d0d3ce360 100644 --- a/doc-html/pyapi-mprequest-mem.html +++ b/doc-html/pyapi-mprequest-mem.html @@ -1,106 +1,105 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-mprequest-meth.html"> -<LINK REL="parent" href="pyapi-mprequest.html"> -<LINK REL="next" href="pyapi-mpconn.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Request Members"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.3.2 Request Members</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-mprequest-meth.html" /> +<link rel="parent" href="pyapi-mprequest.html" /> +<link rel="next" href="pyapi-mpconn.html" /> +<meta name='aesop' content='information' /> +<title>4.5.4.2 Request Members</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.3.1 Request Methods" - href="pyapi-mprequest-meth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.3 Request Object " - href="pyapi-mprequest.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.4 Connection Object (mp_conn) " - href="pyapi-mpconn.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.4.1 Request Methods" + href="pyapi-mprequest-meth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.4 Request Object" + href="pyapi-mprequest.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.5 Connection Object (mp_conn)" + href="pyapi-mpconn.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mprequest-meth.html">4.5.3.1 Request Methods</A> +<a class="sectref" rel="prev" href="pyapi-mprequest-meth.html">4.5.4.1 Request Methods</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mprequest.html">4.5.3 Request Object </A> +<a class="sectref" rel="parent" href="pyapi-mprequest.html">4.5.4 Request Object</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION006532000000000000000"> </A> +<H3><A NAME="SECTION006542000000000000000"></A><A NAME="pyapi-mprequest-mem"></A> <BR> -4.5.3.2 Request Members +4.5.4.2 Request Members </H3> <P> -<dl><dt><b><a name="l2h-67"><tt class="member">connection</tt></a></b> +<dl><dt><b><tt id='l2h-81' xml:id='l2h-81' class="member">connection</tt></b></dt> <dd> A <code>connection</code> object associated with this request. See Connection Object below for details. - <i>(Read-Only)</i> + <em>(Read-Only)</em> </dl> <P> -<dl><dt><b><a name="l2h-68"><tt class="member">server</tt></a></b> +<dl><dt><b><tt id='l2h-82' xml:id='l2h-82' class="member">server</tt></b></dt> <dd> A server object associate with this request. See Server Object below for details. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-69"><tt class="member">next</tt></a></b> +<dl><dt><b><tt id='l2h-83' xml:id='l2h-83' class="member">next</tt></b></dt> <dd> If this is an internal redirect, the request object we redirect to. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-70"><tt class="member">prev</tt></a></b> +<dl><dt><b><tt id='l2h-84' xml:id='l2h-84' class="member">prev</tt></b></dt> <dd> If this is an internal redirect, the request object we redirect from. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-71"><tt class="member">main</tt></a></b> +<dl><dt><b><tt id='l2h-85' xml:id='l2h-85' class="member">main</tt></b></dt> <dd> If this is a sub-request, pointer to the main request. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-72"><tt class="member">the_request</tt></a></b> +<dl><dt><b><tt id='l2h-86' xml:id='l2h-86' class="member">the_request</tt></b></dt> <dd> String containing the first line of the request. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-73"><tt class="member">assbackwards</tt></a></b> +<dl><dt><b><tt id='l2h-87' xml:id='l2h-87' class="member">assbackwards</tt></b></dt> <dd> Indicates an HTTP/0.9 ``simple'' request. This means that the response will contain no headers, only the body. Although this @@ -111,203 +110,202 @@ </dl> <P> -<dl><dt><b><a name="l2h-74"><tt class="member">proxyreq</tt></a></b> +<dl><dt><b><tt id='l2h-88' xml:id='l2h-88' class="member">proxyreq</tt></b></dt> <dd> A proxy request: one of <tt class="constant">apache.PROXYREQ_*</tt> values. - <i>(Read-Only</i>) </dl> <P> -<dl><dt><b><a name="l2h-75"><tt class="member">header_only</tt></a></b> +<dl><dt><b><tt id='l2h-89' xml:id='l2h-89' class="member">header_only</tt></b></dt> <dd> A boolean value indicating HEAD request, as opposed to GET. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-76"><tt class="member">protocol</tt></a></b> +<dl><dt><b><tt id='l2h-90' xml:id='l2h-90' class="member">protocol</tt></b></dt> <dd> - Protocol, as given by the client, or "<tt class="samp">HTTP/0.9</tt>". Same as CGI <a class="envvar" name="l2h-124">SERVER_PROTOCOL</a>. - <i>(Read-Only</i>) + Protocol, as given by the client, or "<tt class="samp">HTTP/0.9</tt>". Same as CGI <a class="envvar" id='l2h-138' xml:id='l2h-138'>SERVER_PROTOCOL</a>. + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-77"><tt class="member">proto_num</tt></a></b> +<dl><dt><b><tt id='l2h-91' xml:id='l2h-91' class="member">proto_num</tt></b></dt> <dd> Integer. Number version of protocol; 1.1 = 1001 - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-78"><tt class="member">hostname</tt></a></b> +<dl><dt><b><tt id='l2h-92' xml:id='l2h-92' class="member">hostname</tt></b></dt> <dd> String. Host, as set by full URI or Host: header. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-79"><tt class="member">request_time</tt></a></b> +<dl><dt><b><tt id='l2h-93' xml:id='l2h-93' class="member">request_time</tt></b></dt> <dd> A long integer. When request started. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-80"><tt class="member">status_line</tt></a></b> +<dl><dt><b><tt id='l2h-94' xml:id='l2h-94' class="member">status_line</tt></b></dt> <dd> Status line. E.g. "<tt class="samp">200 OK</tt>". - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-81"><tt class="member">status</tt></a></b> +<dl><dt><b><tt id='l2h-95' xml:id='l2h-95' class="member">status</tt></b></dt> <dd> Status. One of <tt class="constant">apache.HTTP_*</tt> values. </dl> <P> -<dl><dt><b><a name="l2h-82"><tt class="member">method</tt></a></b> +<dl><dt><b><tt id='l2h-96' xml:id='l2h-96' class="member">method</tt></b></dt> <dd> A string containing the method - 'GET', 'HEAD', 'POST', etc. - Same as CGI <a class="envvar" name="l2h-125">REQUEST_METHOD</a>. - <i>(Read-Only</i>) + Same as CGI <a class="envvar" id='l2h-139' xml:id='l2h-139'>REQUEST_METHOD</a>. + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-83"><tt class="member">method_number</tt></a></b> +<dl><dt><b><tt id='l2h-97' xml:id='l2h-97' class="member">method_number</tt></b></dt> <dd> Integer containing the method number. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-84"><tt class="member">allowed</tt></a></b> +<dl><dt><b><tt id='l2h-98' xml:id='l2h-98' class="member">allowed</tt></b></dt> <dd> Integer. A bitvector of the allowed methods. Used to construct the Allowed: header when responding with <tt class="constant">HTTP_METHOD_NOT_ALLOWED</tt> or <tt class="constant">HTTP_NOT_IMPLEMENTED</tt>. This field is for Apache's internal use, to set the Allowed: methods use <tt class="method">req.allow_methods()</tt> - method, described in section <A href="pyapi-mprequest-meth.html#pyapi-mprequest-meth">4.5.3</A>. - <i>(Read-Only</i>) + method, described in section <A href="pyapi-mprequest-meth.html#pyapi-mprequest-meth">4.5.4</A>. + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-85"><tt class="member">allowed_xmethods</tt></a></b> +<dl><dt><b><tt id='l2h-99' xml:id='l2h-99' class="member">allowed_xmethods</tt></b></dt> <dd> Tuple. Allowed extension methods. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-86"><tt class="member">allowed_methods</tt></a></b> +<dl><dt><b><tt id='l2h-100' xml:id='l2h-100' class="member">allowed_methods</tt></b></dt> <dd> Tuple. List of allowed methods. Used in relation with <tt class="constant">METHOD_NOT_ALLOWED</tt>. This member can be modified via <tt class="method">req.allow_methods()</tt> - described in section <A href="pyapi-mprequest-meth.html#pyapi-mprequest-meth">4.5.3</A>. - <i>(Read-Only</i>) + described in section <A href="pyapi-mprequest-meth.html#pyapi-mprequest-meth">4.5.4</A>. + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-87"><tt class="member">sent_bodyct</tt></a></b> +<dl><dt><b><tt id='l2h-101' xml:id='l2h-101' class="member">sent_bodyct</tt></b></dt> <dd> Integer. Byte count in stream is for body. (?) - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-88"><tt class="member">bytes_sent</tt></a></b> +<dl><dt><b><tt id='l2h-102' xml:id='l2h-102' class="member">bytes_sent</tt></b></dt> <dd> Long integer. Number of bytes sent. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-89"><tt class="member">mtime</tt></a></b> +<dl><dt><b><tt id='l2h-103' xml:id='l2h-103' class="member">mtime</tt></b></dt> <dd> Long integer. Time the resource was last modified. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-90"><tt class="member">chunked</tt></a></b> +<dl><dt><b><tt id='l2h-104' xml:id='l2h-104' class="member">chunked</tt></b></dt> <dd> Boolean value indicating when sending chunked transfer-coding. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-91"><tt class="member">range</tt></a></b> +<dl><dt><b><tt id='l2h-105' xml:id='l2h-105' class="member">range</tt></b></dt> <dd> String. The <code>Range:</code> header. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-92"><tt class="member">clength</tt></a></b> +<dl><dt><b><tt id='l2h-106' xml:id='l2h-106' class="member">clength</tt></b></dt> <dd> Long integer. The ``real'' content length. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-93"><tt class="member">remaining</tt></a></b> +<dl><dt><b><tt id='l2h-107' xml:id='l2h-107' class="member">remaining</tt></b></dt> <dd> Long integer. Bytes left to read. (Only makes sense inside a read operation.) - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-94"><tt class="member">read_length</tt></a></b> +<dl><dt><b><tt id='l2h-108' xml:id='l2h-108' class="member">read_length</tt></b></dt> <dd> Long integer. Number of bytes read. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-95"><tt class="member">read_body</tt></a></b> +<dl><dt><b><tt id='l2h-109' xml:id='l2h-109' class="member">read_body</tt></b></dt> <dd> Integer. How the request body should be read. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-96"><tt class="member">read_chunked</tt></a></b> +<dl><dt><b><tt id='l2h-110' xml:id='l2h-110' class="member">read_chunked</tt></b></dt> <dd> Boolean. Read chunked transfer coding. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-97"><tt class="member">expecting_100</tt></a></b> +<dl><dt><b><tt id='l2h-111' xml:id='l2h-111' class="member">expecting_100</tt></b></dt> <dd> Boolean. Is client waiting for a 100 (<tt class="constant">HTTP_CONTINUE</tt>) response. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-98"><tt class="member">headers_in</tt></a></b> +<dl><dt><b><tt id='l2h-112' xml:id='l2h-112' class="member">headers_in</tt></b></dt> <dd> A table object containing headers sent by the client. </dl> <P> -<dl><dt><b><a name="l2h-99"><tt class="member">headers_out</tt></a></b> +<dl><dt><b><tt id='l2h-113' xml:id='l2h-113' class="member">headers_out</tt></b></dt> <dd> A <code>table</code> object representing the headers to be sent to the client. </dl> <P> -<dl><dt><b><a name="l2h-100"><tt class="member">err_headers_out</tt></a></b> +<dl><dt><b><tt id='l2h-114' xml:id='l2h-114' class="member">err_headers_out</tt></b></dt> <dd> These headers get send with the error response, instead of headers_out. </dl> <P> -<dl><dt><b><a name="l2h-101"><tt class="member">subprocess_env</tt></a></b> +<dl><dt><b><tt id='l2h-115' xml:id='l2h-115' class="member">subprocess_env</tt></b></dt> <dd> A <code>table</code> object containing environment information typically usable for CGI. You may have to call <tt class="member">req.add_common_vars()</tt> first to fill in the information @@ -315,7 +313,7 @@ </dl> <P> -<dl><dt><b><a name="l2h-102"><tt class="member">notes</tt></a></b> +<dl><dt><b><tt id='l2h-116' xml:id='l2h-116' class="member">notes</tt></b></dt> <dd> A <code>table</code> object that could be used to store miscellaneous general purpose info that lives for as long as the request lives. If @@ -324,21 +322,21 @@ </dl> <P> -<dl><dt><b><a name="l2h-103"><tt class="member">phase</tt></a></b> +<dl><dt><b><tt id='l2h-117' xml:id='l2h-117' class="member">phase</tt></b></dt> <dd> The phase currently being being processed, e.g. "<tt class="samp">PythonHandler</tt>". - <i>(Read-Only)</i> + <em>(Read-Only)</em> </dl> <P> -<dl><dt><b><a name="l2h-104"><tt class="member">interpreter</tt></a></b> +<dl><dt><b><tt id='l2h-118' xml:id='l2h-118' class="member">interpreter</tt></b></dt> <dd> The name of the subinterpreter under which we're running. - <i>(Read-Only)</i> + <em>(Read-Only)</em> </dl> <P> -<dl><dt><b><a name="l2h-105"><tt class="member">content_type</tt></a></b> +<dl><dt><b><tt id='l2h-119' xml:id='l2h-119' class="member">content_type</tt></b></dt> <dd> String. The content type. Mod_python maintains an internal flag (<tt class="member">req._content_type_set</tt>) to keep track of whether @@ -349,123 +347,150 @@ </dl> <P> -<dl><dt><b><a name="l2h-106"><tt class="member">content_languages</tt></a></b> +<dl><dt><b><tt id='l2h-120' xml:id='l2h-120' class="member">content_languages</tt></b></dt> <dd> Tuple. List of strings representing the content languages. </dl> <P> -<dl><dt><b><a name="l2h-107"><tt class="member">handler</tt></a></b> +<dl><dt><b><tt id='l2h-121' xml:id='l2h-121' class="member">handler</tt></b></dt> <dd> - The name of the handler currently being processed. This is the handler - set by mod_mime, not the mod_python handler. In most cases it will be - ""<tt class="samp">mod_python</tt>". <i>(Read-Only</i>) + The symbolic name of the content handler (as in module, not mod_python + handler) that will service the request during the response phase. When + the SetHandler/AddHandler directives are used to trigger mod_python, this + will be set to "<tt class="samp">mod_python</tt>" by mod_mime. A mod_python handler executing + prior to the response phase may also set this to "<tt class="samp">mod_python</tt>" along + with calling "<tt class="samp">req.add_handler()</tt>" to register a mod_python handler + for the response phase. + +<P> +<div class="verbatim"><pre> +def typehandler(req): + if os.path.splitext(req.filename)[1] == ".py": + req.handler = "mod_python" + req.add_handler("PythonHandler", "mod_python.publisher") + return apache.OK + return apache.DECLINED +</pre></div> + +<P> </dl> <P> -<dl><dt><b><a name="l2h-108"><tt class="member">content_encoding</tt></a></b> +<dl><dt><b><tt id='l2h-122' xml:id='l2h-122' class="member">content_encoding</tt></b></dt> <dd> String. Content encoding. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-109"><tt class="member">vlist_validator</tt></a></b> +<dl><dt><b><tt id='l2h-123' xml:id='l2h-123' class="member">vlist_validator</tt></b></dt> <dd> Integer. Variant list validator (if negotiated). - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-110"><tt class="member">user</tt></a></b> +<dl><dt><b><tt id='l2h-124' xml:id='l2h-124' class="member">user</tt></b></dt> <dd> If an authentication check is made, this will hold the user - name. Same as CGI <a class="envvar" name="l2h-126">REMOTE_USER</a>. - <i>(Read-Only</i>) + name. Same as CGI <a class="envvar" id='l2h-140' xml:id='l2h-140'>REMOTE_USER</a>. <div class="note"><b class="label">Note:</b> <tt class="method">req.get_basic_auth_pw()</tt> must be called prior to using this value. </div> </dl> <P> -<dl><dt><b><a name="l2h-111"><tt class="member">ap_auth_type</tt></a></b> +<dl><dt><b><tt id='l2h-125' xml:id='l2h-125' class="member">ap_auth_type</tt></b></dt> <dd> - Authentication type. Same as CGI <a class="envvar" name="l2h-127">AUTH_TYPE</a>. - <i>(Read-Only</i>) + Authentication type. Same as CGI <a class="envvar" id='l2h-141' xml:id='l2h-141'>AUTH_TYPE</a>. </dl> <P> -<dl><dt><b><a name="l2h-112"><tt class="member">no_cache</tt></a></b> +<dl><dt><b><tt id='l2h-126' xml:id='l2h-126' class="member">no_cache</tt></b></dt> <dd> - Boolean. No cache if true. - <i>(Read-Only</i>) + Boolean. This response cannot be cached. </dl> <P> -<dl><dt><b><a name="l2h-113"><tt class="member">no_local_copy</tt></a></b> +<dl><dt><b><tt id='l2h-127' xml:id='l2h-127' class="member">no_local_copy</tt></b></dt> <dd> Boolean. No local copy exists. - <i>(Read-Only</i>) </dl> <P> -<dl><dt><b><a name="l2h-114"><tt class="member">unparsed_uri</tt></a></b> +<dl><dt><b><tt id='l2h-128' xml:id='l2h-128' class="member">unparsed_uri</tt></b></dt> <dd> The URI without any parsing performed. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-115"><tt class="member">uri</tt></a></b> +<dl><dt><b><tt id='l2h-129' xml:id='l2h-129' class="member">uri</tt></b></dt> <dd> The path portion of the URI. - <i>(Read-Only</i>) </dl> <P> -<dl><dt><b><a name="l2h-116"><tt class="member">filename</tt></a></b> +<dl><dt><b><tt id='l2h-130' xml:id='l2h-130' class="member">filename</tt></b></dt> <dd> String. File name being requested. </dl> <P> -<dl><dt><b><a name="l2h-117"><tt class="member">canonical_filename</tt></a></b> +<dl><dt><b><tt id='l2h-131' xml:id='l2h-131' class="member">canonical_filename</tt></b></dt> <dd> String. The true filename (<tt class="member">req.filename</tt> is canonicalized if - they don't match). <i>(Read-Only)</i> + they don't match). </dl> <P> -<dl><dt><b><a name="l2h-118"><tt class="member">path_info</tt></a></b> +<dl><dt><b><tt id='l2h-132' xml:id='l2h-132' class="member">path_info</tt></b></dt> <dd> String. What follows after the file name, but is before query args, if - anything. Same as CGI <a class="envvar" name="l2h-128">PATH_INFO</a>. + anything. Same as CGI <a class="envvar" id='l2h-142' xml:id='l2h-142'>PATH_INFO</a>. </dl> <P> -<dl><dt><b><a name="l2h-119"><tt class="member">args</tt></a></b> +<dl><dt><b><tt id='l2h-133' xml:id='l2h-133' class="member">args</tt></b></dt> <dd> - String. Same as CGI <a class="envvar" name="l2h-129">QUERY_ARGS</a>. - <i>(Read-Only</i>) + String. Same as CGI <a class="envvar" id='l2h-143' xml:id='l2h-143'>QUERY_ARGS</a>. </dl> <P> -<dl><dt><b><a name="l2h-120"><tt class="member">finfo</tt></a></b> +<dl><dt><b><tt id='l2h-134' xml:id='l2h-134' class="member">finfo</tt></b></dt> <dd> - Tuple. A file information structure, analogous to POSIX stat, - describing the file pointed to by the URI. <code>(mode, ino, - dev, nlink, uid, gid, size, atime, mtime, ctime, fname, - name)</code>. The <code>apache</code> module defines a set of <tt class="constant">FINFO_*</tt> - constants that should be used to access elements of this - tuple. Example: - <div class="verbatim"><pre> -fname = req.finfo[apache.FINFO_FNAME] + A file information object with type <code>mp_finfo</code>, analogous to the + result of the POSIX stat function, describing the + file pointed to by the URI. The object provides the attributes + <code>fname</code>, <code>filetype</code>, <code>valid</code>, <code>protection</code>, + <code>user</code>, <code>group</code>, <code>size</code>, <code>inode</code>, <code>device</code>, + <code>nlink</code>, <code>atime</code>, <code>mtime</code>, <code>ctime</code> and <code>name</code>. + +<P> +The attribute may be assigned to using the result of <code>apache.stat()</code>. + For example: + +<P> +<div class="verbatim"><pre> +if req.finfo.filetype == apache.APR_DIR: + req.filename = posixpath.join(req.filename, 'index.html') + req.finfo = apache.stat(req.filename, apache.APR_FINFO_MIN) +</pre></div> + +<P> +For backward compatability, the object can also be accessed as if it + were a tuple. The <code>apache</code> module defines a set of <tt class="constant">FINFO_*</tt> + constants that should be used to access elements of this tuple. + +<P> +<div class="verbatim"><pre> +user = req.finfo[apache.FINFO_USER] </pre></div> - <i>(Read-Only</i>) </dl> <P> -<dl><dt><b><a name="l2h-121"><tt class="member">parsed_uri</tt></a></b> +<dl><dt><b><tt id='l2h-135' xml:id='l2h-135' class="member">parsed_uri</tt></b></dt> <dd> Tuple. The URI broken down into pieces. <code>(scheme, hostinfo, user, password, hostname, port, path, query, fragment)</code>. @@ -474,61 +499,59 @@ fname = req.finfo[apache.FINFO_FNAME] <div class="verbatim"><pre> fname = req.parsed_uri[apache.URI_PATH] </pre></div> - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-122"><tt class="member">used_path_info</tt></a></b> +<dl><dt><b><tt id='l2h-136' xml:id='l2h-136' class="member">used_path_info</tt></b></dt> <dd> Flag to accept or reject path_info on current request. - <i>(Read-Only</i>) </dl> <P> -<dl><dt><b><a name="l2h-123"><tt class="member">eos_sent</tt></a></b> +<dl><dt><b><tt id='l2h-137' xml:id='l2h-137' class="member">eos_sent</tt></b></dt> <dd> Boolean. EOS bucket sent. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.3.1 Request Methods" - rel="prev" title="4.5.3.1 Request Methods" - href="pyapi-mprequest-meth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.3 Request Object " - rel="parent" title="4.5.3 Request Object " - href="pyapi-mprequest.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.4 Connection Object (mp_conn) " - rel="next" title="4.5.4 Connection Object (mp_conn) " - href="pyapi-mpconn.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.4.1 Request Methods" + href="pyapi-mprequest-meth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.4 Request Object" + href="pyapi-mprequest.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.5 Connection Object (mp_conn)" + href="pyapi-mpconn.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mprequest-meth.html">4.5.3.1 Request Methods</A> +<a class="sectref" rel="prev" href="pyapi-mprequest-meth.html">4.5.4.1 Request Methods</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mprequest.html">4.5.3 Request Object </A> +<a class="sectref" rel="parent" href="pyapi-mprequest.html">4.5.4 Request Object</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn) </A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mprequest-meth.html b/doc-html/pyapi-mprequest-meth.html index 08ede9433d6165a8ddb01787bbacca659befdde7..6c203f565cb7530b8e21160fe58dfdb72e6a95a6 100644 --- a/doc-html/pyapi-mprequest-meth.html +++ b/doc-html/pyapi-mprequest-meth.html @@ -1,65 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mprequest-mem.html"> -<LINK REL="prev" href="pyapi-mprequest.html"> -<LINK REL="parent" href="pyapi-mprequest.html"> -<LINK REL="next" href="pyapi-mprequest-mem.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Request Methods"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.3.1 Request Methods</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mprequest-mem.html" /> +<link rel="prev" href="pyapi-mprequest.html" /> +<link rel="parent" href="pyapi-mprequest.html" /> +<link rel="next" href="pyapi-mprequest-mem.html" /> +<meta name='aesop' content='information' /> +<title>4.5.4.1 Request Methods</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.3 Request Object " - href="pyapi-mprequest.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.3 Request Object " - href="pyapi-mprequest.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.3.2 Request Members" - href="pyapi-mprequest-mem.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.4 Request Object" + href="pyapi-mprequest.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.4 Request Object" + href="pyapi-mprequest.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.4.2 Request Members" + href="pyapi-mprequest-mem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mprequest.html">4.5.3 Request Object </A> +<a class="sectref" rel="prev" href="pyapi-mprequest.html">4.5.4 Request Object</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mprequest.html">4.5.3 Request Object </A> +<a class="sectref" rel="parent" href="pyapi-mprequest.html">4.5.4 Request Object</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mprequest-mem.html">4.5.3.2 Request Members</A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mprequest-mem.html">4.5.4.2 Request Members</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION006531000000000000000"> </A> +<H3><A NAME="SECTION006541000000000000000"></A><A NAME="pyapi-mprequest-meth"></A> <BR> -4.5.3.1 Request Methods +4.5.4.1 Request Methods </H3> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-45"><tt class="method">add_common_vars</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-48' xml:id='l2h-48' class="method">add_common_vars</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Calls the Apache <tt class="cfunction">ap_add_common_vars()</tt> function. After a call to this method, <tt class="member">req.subprocess_env</tt> will contain a @@ -68,8 +67,8 @@ <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-46"><tt class="method">add_handler</tt></a></b>(</nobr></td> - <td><var>htype, handler</var><big>[</big><var>, dir</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-49' xml:id='l2h-49' class="method">add_handler</tt></b>(</nobr></td> + <td><var>htype, handler</var><big>[</big><var>, dir</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -77,20 +76,17 @@ Allows dynamic handler registration. <var>htype</var> is a string containing the name of any of the apache request (but not filter or connection) handler directives, e.g. "<tt class="samp">PythonHandler</tt>". <var>handler</var> is a string containing the - name of the module and the handler function. Optional <var>dir</var> is - a string containing the name of the directory to be added to the - pythonpath. If no directory is specified, then, if there is already - a handler of the same type specified, its directory is inherited, - otherwise the directory of the presently executing handler is - used. If there is a <code>PythonPath</code> directive in effect, then - <code>sys.path</code> will be set exactly according to it (no directories - added, the <var>dir</var> argument is ignored). + name of the module and the handler function, or the callable object + itself. Optional <var>dir</var> is a string containing the name of the + directory to be added to the module search path when looking for the + handler. If no directory is specified, then the directory to search + in is inherited from the handler which is making the registration, <P> A handler added this way only persists throughout the life of the request. It is possible to register more handlers while inside the - handler of the same type. One has to be careful as to not to create - an infinite loop this way. + handler of the same type. One has to be careful as to not to create an + infinite loop this way. <P> Dynamic handler registration is a useful technique that allows the @@ -112,12 +108,48 @@ else: If you pass this function an invalid handler, an exception will be generated at the time an attempt is made to find the handler. </div> + +<P> </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-47"><tt class="method">allow_methods</tt></a></b>(</nobr></td> - <td><var>methods</var><big>[</big><var>, reset</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-50' xml:id='l2h-50' class="method">add_input_filter</tt></b>(</nobr></td> + <td><var>filter_name</var>)</td></tr></table></dt> +<dd> + Adds the named filter into the input filter chain for the current request. + The filter should be added before the first attempt to read any data from + the request. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-51' xml:id='l2h-51' class="method">add_output_filter</tt></b>(</nobr></td> + <td><var>filter_name</var>)</td></tr></table></dt> +<dd> + Adds the named filter into the output filter chain for the current request. + The filter should be added before the first attempt to write any data for + the response. + +<P> +Provided that all data written is being buffered and not flushed, this + could be used to add the "CONTENT_LENGTH" filter into the chain of + output filters. The purpose of the "CONTENT_LENGTH" filter is to add a + <code>Content-Length:</code> header to the response. + +<P> +<div class="verbatim"><pre> + req.add_output_filter("CONTENT_LENGTH") + req.write("content",0) +</pre></div> + +<P> +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-52' xml:id='l2h-52' class="method">allow_methods</tt></b>(</nobr></td> + <td><var>methods</var><big>[</big><var>, reset</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Adds methods to the <tt class="member">req.allowed_methods</tt> list. This list will be passed in <code>Allowed:</code> header if @@ -134,16 +166,59 @@ If you pass this function an invalid handler, an exception will be <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-48"><tt class="method">document_root</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-53' xml:id='l2h-53' class="method">auth_name</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> +<dd> + Returns AuthName setting. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-54' xml:id='l2h-54' class="method">auth_type</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> +<dd> + Returns AuthType setting. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-55' xml:id='l2h-55' class="method">construct_url</tt></b>(</nobr></td> + <td><var>uri</var>)</td></tr></table></dt> +<dd> + This function returns a fully qualified URI string from the path specified + by uri, using the information stored in the request to determine the scheme, + server name and port. The port number is not included in the string if it + is the same as the default port 80. + +<P> +For example, imagine that the current request is directed to the virtual + server www.modpython.org at port 80. Then supplying "<tt class="samp">/index.html</tt>" will + yield the string "<tt class="samp">http://www.modpython.org/index.html</tt>". + +<P> +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-56' xml:id='l2h-56' class="method">discard_request_body</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> +<dd> + Tests for and reads any message body in the request, simply discarding + whatever it receives. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-57' xml:id='l2h-57' class="method">document_root</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns DocumentRoot setting. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-49"><tt class="method">get_basic_auth_pw</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-58' xml:id='l2h-58' class="method">get_basic_auth_pw</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns a string containing the password when Basic authentication is used. @@ -151,8 +226,8 @@ If you pass this function an invalid handler, an exception will be <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-50"><tt class="method">get_config</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-59' xml:id='l2h-59' class="method">get_config</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns a reference to the table object containing the mod_python configuration in effect for this request except for @@ -163,8 +238,8 @@ If you pass this function an invalid handler, an exception will be <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-51"><tt class="method">get_remote_host</tt></a></b>(</nobr></td> - <td><big>[</big><var>type, str_is_ip</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-60' xml:id='l2h-60' class="method">get_remote_host</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>type, str_is_ip</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -184,7 +259,7 @@ The optional <var>type</var> argument can specify the following: <P> </LI> -<LI><code>apache.REMOTE_NAME</code> <i>(Default)</i> Return the DNS name if +<LI><code>apache.REMOTE_NAME</code> <em>(Default)</em> Return the DNS name if possible, or the IP (as a string in dotted decimal notation) otherwise. @@ -220,8 +295,8 @@ On failure, <code>None</code> is returned. <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-52"><tt class="method">get_options</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-61' xml:id='l2h-61' class="method">get_options</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns a reference to the table object containing the options set by the <code>PythonOption</code> directives. @@ -229,8 +304,8 @@ On failure, <code>None</code> is returned. <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-53"><tt class="method">internal_redirect</tt></a></b>(</nobr></td> - <td><var>new_uri</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-62' xml:id='l2h-62' class="method">internal_redirect</tt></b>(</nobr></td> + <td><var>new_uri</var>)</td></tr></table></dt> <dd> Internally redirects the request to the <var>new_uri</var>. <var>new_uri</var> must be a string. @@ -246,8 +321,8 @@ The httpd server handles internal redirection by creating a new <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-54"><tt class="method">is_https</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-63' xml:id='l2h-63' class="method">is_https</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns non-zero if the connection is using SSL/TLS. Will always return zero if the mod_ssl Apache module is not loaded. @@ -268,8 +343,8 @@ Note that this method will not determine the quality of the <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-55"><tt class="method">log_error</tt></a></b>(</nobr></td> - <td><var>message</var><big>[</big><var>, level</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-64' xml:id='l2h-64' class="method">log_error</tt></b>(</nobr></td> + <td><var>message</var><big>[</big><var>, level</var><big>]</big><var></var>)</td></tr></table></dt> <dd> An interface to the Apache <code>ap_log_rerror</code> function. <var>message</var> is a string with the error message, @@ -295,23 +370,24 @@ If you need to write to log and do not have a reference to a request object, <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-56"><tt class="method">meets_conditions</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-65' xml:id='l2h-65' class="method">meets_conditions</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> - Calls the Apache <tt class="cfunction">ap_meets_conditions()</tt> function which - returns a status code. If <var>status</var> is <tt class="constant">apache.OK</tt>, generate - the content of the response normally. If not, simply return <var>status</var>. - Note that <tt class="member">req.headers_out</tt> should be set prior to calling this - function. The same goes for <tt class="member">req.status</tt> if the status differs - from <tt class="constant">apache.OK</tt>. + Calls the Apache <tt class="cfunction">ap_meets_conditions()</tt> function which returns + a status code. If <var>status</var> is <tt class="constant">apache.OK</tt>, generate the + content of the response normally. If not, simply return <var>status</var>. + Note that <var>mtime</var> (and possibly the ETag header) should be set as + appropriate prior to calling this function. The same goes for + <tt class="member">req.status</tt> if the status differs from <tt class="constant">apache.OK</tt>. <P> Example: <div class="verbatim"><pre> ... -r.headers_out['ETag'] = "1130794f-3774-4584-a4ea-0ab19e684268" -r.headers_out['Last-Modified'] = 'Wed, 23 Feb 2005 00:00:00 GMT' +r.headers_out['ETag'] = '"1130794f-3774-4584-a4ea-0ab19e684268"' r.headers_out['Expires'] = 'Mon, 18 Apr 2005 17:30:00 GMT' +r.update_mtime(1000000000) +r.set_last_modified() status = r.meets_conditions() if status != apache.OK: @@ -325,8 +401,8 @@ if status != apache.OK: <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-57"><tt class="method">requires</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-66' xml:id='l2h-66' class="method">requires</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> <P> @@ -346,8 +422,8 @@ require valid-user <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-58"><tt class="method">read</tt></a></b>(</nobr></td> - <td><big>[</big><var>len</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-67' xml:id='l2h-67' class="method">read</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>len</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -375,8 +451,8 @@ Incorrect <code>Content-length</code> may cause the function to try to read <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-59"><tt class="method">readline</tt></a></b>(</nobr></td> - <td><big>[</big><var>len</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-68' xml:id='l2h-68' class="method">readline</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>len</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Like <tt class="function">read()</tt> but reads until end of line. @@ -392,17 +468,19 @@ In accordance with the HTTP specification, most clients will <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-60"><tt class="method">readlines</tt></a></b>(</nobr></td> - <td><big>[</big><var>sizehint</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-69' xml:id='l2h-69' class="method">readlines</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>sizehint</var><big>]</big><var></var>)</td></tr></table></dt> <dd> - Reads all or up to <var>sizehint</var> bytes of lines using - <tt class="method">readline</tt> and returns a list of the lines read. + Reads all lines using <tt class="method">readline</tt> and returns a list of the lines read. + If the optional <var>sizehint</var> parameter is given in, the method will read + at least <var>sizehint</var> bytes of data, up to the completion of the line in + which the <var>sizehint</var> bytes limit is reached. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-61"><tt class="method">register_cleanup</tt></a></b>(</nobr></td> - <td><var>callable</var><big>[</big><var>, data</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-70' xml:id='l2h-70' class="method">register_cleanup</tt></b>(</nobr></td> + <td><var>callable</var><big>[</big><var>, data</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -432,8 +510,52 @@ If the server is shut down before the cleanup had a chance to run, <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-62"><tt class="method">sendfile</tt></a></b>(</nobr></td> - <td><var>path</var><big>[</big><var>, offset, len</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-71' xml:id='l2h-71' class="method">register_input_filter</tt></b>(</nobr></td> + <td><var>filter_name, filter</var><big>[</big><var>, dir</var><big>]</big><var></var>)</td></tr></table></dt> +<dd> + +<P> +Allows dynamic registration of mod_python input filters. <var>filter_name</var> + is a string which would then subsequently be used to identify the filter. + <var>filter</var> is a string containing the name of the module and the filter + function or the callable object itself. Optional <var>dir</var> is a string + containing the name of the directory to be added to the module search when + looking for the module. + +<P> +The registration of the filter this way only persists for the life of the + request. To actually add the filter into the chain of input filters for + the current request <code>req.add_input_filter()</code> would be used. + +<P> +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-72' xml:id='l2h-72' class="method">register_output_filter</tt></b>(</nobr></td> + <td><var>filter_name, filter</var><big>[</big><var>, dir</var><big>]</big><var></var>)</td></tr></table></dt> +<dd> + +<P> +Allows dynamic registration of mod_python output filters. <var>filter_name</var> + is a string which would then subsequently be used to identify the filter. + <var>filter</var> is a string containing the name of the module and the filter + function or the callable object itself. Optional <var>dir</var> is a string + containing the name of the directory to be added to the module search + path when looking for the handler. + +<P> +The registration of the filter this way only persists for the life of the + request. To actually add the filter into the chain of output filters for + the current request <code>req.add_output_filter()</code> would be used. + +<P> +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-73' xml:id='l2h-73' class="method">sendfile</tt></b>(</nobr></td> + <td><var>path</var><big>[</big><var>, offset, len</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Sends <var>len</var> bytes of file <var>path</var> directly to the client, starting at offset <var>offset</var> using the server's internal @@ -451,8 +573,25 @@ This function provides the most efficient way to send a file to the <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-63"><tt class="method">ssl_var_lookup</tt></a></b>(</nobr></td> - <td><var>var_name</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-74' xml:id='l2h-74' class="method">set_etag</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> +<dd> + Sets the outgoing "<tt class="samp">ETag</tt>" header. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-75' xml:id='l2h-75' class="method">set_last_modified</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> +<dd> + Sets the outgoing "<tt class="samp">Last-Modified</tt>" header based on value of + <code>mtime</code> attribute. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-76' xml:id='l2h-76' class="method">ssl_var_lookup</tt></b>(</nobr></td> + <td><var>var_name</var>)</td></tr></table></dt> <dd> Looks up the value of the named SSL variable. This method queries the mod_ssl Apache module directly, and may therefore be used in @@ -495,8 +634,17 @@ Not all SSL variables are defined or have useful values in every <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-64"><tt class="method">write</tt></a></b>(</nobr></td> - <td><var>string</var><big>[</big><var>, flush=1</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-77' xml:id='l2h-77' class="method">update_mtime</tt></b>(</nobr></td> + <td><var>dependency_mtime</var>)</td></tr></table></dt> +<dd> + If <var>dependency_mtime</var> is later than the value in the <code>mtime</code> + attribute, sets the attribute to the new value. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-78' xml:id='l2h-78' class="method">write</tt></b>(</nobr></td> + <td><var>string</var><big>[</big><var>, flush=1</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Writes <var>string</var> directly to the client, then flushes the buffer, unless flush is 0. @@ -504,16 +652,16 @@ Not all SSL variables are defined or have useful values in every <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-65"><tt class="method">flush</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-79' xml:id='l2h-79' class="method">flush</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Flushes the output buffer. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-66"><tt class="method">set_content_length</tt></a></b>(</nobr></td> - <td><var>len</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-80' xml:id='l2h-80' class="method">set_content_length</tt></b>(</nobr></td> + <td><var>len</var>)</td></tr></table></dt> <dd> Sets the value of <tt class="member">req.clength</tt> and the "<tt class="samp">Content-Length</tt>" header to len. Note that after the headers have been sent out (which happens just before the first byte of the body is written, @@ -524,41 +672,40 @@ Not all SSL variables are defined or have useful values in every <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.3 Request Object " - rel="prev" title="4.5.3 Request Object " - href="pyapi-mprequest.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.3 Request Object " - rel="parent" title="4.5.3 Request Object " - href="pyapi-mprequest.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.3.2 Request Members" - rel="next" title="4.5.3.2 Request Members" - href="pyapi-mprequest-mem.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.4 Request Object" + href="pyapi-mprequest.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.4 Request Object" + href="pyapi-mprequest.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.4.2 Request Members" + href="pyapi-mprequest-mem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mprequest.html">4.5.3 Request Object </A> +<a class="sectref" rel="prev" href="pyapi-mprequest.html">4.5.4 Request Object</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mprequest.html">4.5.3 Request Object </A> +<a class="sectref" rel="parent" href="pyapi-mprequest.html">4.5.4 Request Object</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mprequest-mem.html">4.5.3.2 Request Members</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mprequest-mem.html">4.5.4.2 Request Members</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mprequest.html b/doc-html/pyapi-mprequest.html index 8e882dadf17d5da1ee00befe68f860dc41899ae4..584ed6da1bde627f29e13080e26b8e97eb603768 100644 --- a/doc-html/pyapi-mprequest.html +++ b/doc-html/pyapi-mprequest.html @@ -1,59 +1,58 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mpconn.html"> -<LINK REL="prev" href="pyapi-mptable.html"> -<LINK REL="parent" href="module-apache.html"> -<LINK REL="next" href="pyapi-mprequest-meth.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Request Object "> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.3 Request Object </title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mpconn.html" /> +<link rel="prev" href="pyapi-mptable.html" /> +<link rel="parent" href="module-apache.html" /> +<link rel="next" href="pyapi-mprequest-meth.html" /> +<meta name='aesop' content='information' /> +<title>4.5.4 Request Object</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.2 Table Object (mp_table) " - href="pyapi-mptable.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.3.1 Request Methods" - href="pyapi-mprequest-meth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.3 Table Object (mp_table)" + href="pyapi-mptable.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.4.1 Request Methods" + href="pyapi-mprequest-meth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mptable.html">4.5.2 Table Object (mp_table) </A> +<a class="sectref" rel="prev" href="pyapi-mptable.html">4.5.3 Table Object (mp_table)</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mprequest-meth.html">4.5.3.1 Request Methods</A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mprequest-meth.html">4.5.4.1 Request Methods</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006530000000000000000"> </A> +<H2><A NAME="SECTION006540000000000000000"></A><A NAME="pyapi-mprequest"></A> <BR> -4.5.3 Request Object<a name="l2h-44"> </a> +4.5.4 Request Object<a id='l2h-47' xml:id='l2h-47'></a> </H2> <P> @@ -67,52 +66,53 @@ between handlers. <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> -<LI><A href="pyapi-mprequest-meth.html">4.5.3.1 Request Methods</a> -<LI><A href="pyapi-mprequest-mem.html">4.5.3.2 Request Members</a> +<LI><A href="pyapi-mprequest-meth.html">4.5.4.1 Request Methods</a> +<LI><A href="pyapi-mprequest-mem.html">4.5.4.2 Request Members</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.2 Table Object (mp_table) " - rel="prev" title="4.5.2 Table Object (mp_table) " - href="pyapi-mptable.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.3.1 Request Methods" - rel="next" title="4.5.3.1 Request Methods" - href="pyapi-mprequest-meth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.3 Table Object (mp_table)" + href="pyapi-mptable.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.4.1 Request Methods" + href="pyapi-mprequest-meth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mptable.html">4.5.2 Table Object (mp_table) </A> +<a class="sectref" rel="prev" href="pyapi-mptable.html">4.5.3 Table Object (mp_table)</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mprequest-meth.html">4.5.3.1 Request Methods</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mprequest-meth.html">4.5.4.1 Request Methods</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpserver.html b/doc-html/pyapi-mpserver.html index 7458de9aead5cffc8bfbbff78951332f321d0ddb..693f6e37f7e36a8aac445656e234fdeefb08b447 100644 --- a/doc-html/pyapi-mpserver.html +++ b/doc-html/pyapi-mpserver.html @@ -1,58 +1,57 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-mpfilt.html"> -<LINK REL="parent" href="module-apache.html"> -<LINK REL="next" href="pyapi-mpsrv-meth.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Server Object (mp_server) "> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.6 Server Object (mp_server) </title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-mpfilt.html" /> +<link rel="parent" href="module-apache.html" /> +<link rel="next" href="pyapi-mpsrv-meth.html" /> +<meta name='aesop' content='information' /> +<title>4.5.7 Server Object (mp_server)</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.5.2 Filter Members" - href="pyapi-mpfilt-mem.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.6.1 Server Methods" - href="pyapi-mpsrv-meth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.6.2 Filter Members" + href="pyapi-mpfilt-mem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.7.1 Server Methods" + href="pyapi-mpsrv-meth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpfilt-mem.html">4.5.5.2 Filter Members</A> +<a class="sectref" rel="prev" href="pyapi-mpfilt-mem.html">4.5.6.2 Filter Members</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpsrv-meth.html">4.5.6.1 Server Methods</A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpsrv-meth.html">4.5.7.1 Server Methods</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006560000000000000000"> </A> +<H2><A NAME="SECTION006570000000000000000"></A><A NAME="pyapi-mpserver"></A> <BR> -4.5.6 Server Object (mp_server)<a name="l2h-164"> </a> +4.5.7 Server Object (mp_server)<a id='l2h-179' xml:id='l2h-179'></a> </H2> <P> @@ -62,52 +61,53 @@ server) serving the request. <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> <UL CLASS="ChildLinks"> -<LI><A href="pyapi-mpsrv-meth.html">4.5.6.1 Server Methods</a> -<LI><A href="pyapi-mpsrv-mem.html">4.5.6.2 Server Members</a> +<LI><A href="pyapi-mpsrv-meth.html">4.5.7.1 Server Methods</a> +<LI><A href="pyapi-mpsrv-mem.html">4.5.7.2 Server Members</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.5.2 Filter Members" - rel="prev" title="4.5.5.2 Filter Members" - href="pyapi-mpfilt-mem.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.6.1 Server Methods" - rel="next" title="4.5.6.1 Server Methods" - href="pyapi-mpsrv-meth.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.6.2 Filter Members" + href="pyapi-mpfilt-mem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.7.1 Server Methods" + href="pyapi-mpsrv-meth.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpfilt-mem.html">4.5.5.2 Filter Members</A> +<a class="sectref" rel="prev" href="pyapi-mpfilt-mem.html">4.5.6.2 Filter Members</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpsrv-meth.html">4.5.6.1 Server Methods</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpsrv-meth.html">4.5.7.1 Server Methods</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpsrv-mem.html b/doc-html/pyapi-mpsrv-mem.html index a1eb3323583a57dee62726d124e8cd48308f689e..89de188f074aad3489ea089b6c38271853236fb0 100644 --- a/doc-html/pyapi-mpsrv-mem.html +++ b/doc-html/pyapi-mpsrv-mem.html @@ -1,234 +1,232 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-mpsrv-meth.html"> -<LINK REL="parent" href="pyapi-mpserver.html"> -<LINK REL="next" href="pyapi-util.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Server Members"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.6.2 Server Members</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-mpsrv-meth.html" /> +<link rel="parent" href="pyapi-mpserver.html" /> +<link rel="next" href="pyapi-util.html" /> +<meta name='aesop' content='information' /> +<title>4.5.7.2 Server Members</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.6.1 Server Methods" - href="pyapi-mpsrv-meth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.6 Server Object (mp_server) " - href="pyapi-mpserver.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.7.1 Server Methods" + href="pyapi-mpsrv-meth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.7 Server Object (mp_server)" + href="pyapi-mpserver.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpsrv-meth.html">4.5.6.1 Server Methods</A> +<a class="sectref" rel="prev" href="pyapi-mpsrv-meth.html">4.5.7.1 Server Methods</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </A> +<a class="sectref" rel="parent" href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util.html">4.6 util - Miscellaneous</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION006562000000000000000"> </A> +<H3><A NAME="SECTION006572000000000000000"></A><A NAME="pyapi-mpsrv-mem"></A> <BR> -4.5.6.2 Server Members +4.5.7.2 Server Members </H3> <P> -<dl><dt><b><a name="l2h-168"><tt class="member">defn_name</tt></a></b> +<dl><dt><b><tt id='l2h-184' xml:id='l2h-184' class="member">defn_name</tt></b></dt> <dd> String. The name of the configuration file where the server definition was found. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-169"><tt class="member">defn_line_number</tt></a></b> +<dl><dt><b><tt id='l2h-185' xml:id='l2h-185' class="member">defn_line_number</tt></b></dt> <dd> Integer. Line number in the config file where the server definition is found. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-170"><tt class="member">server_admin</tt></a></b> +<dl><dt><b><tt id='l2h-186' xml:id='l2h-186' class="member">server_admin</tt></b></dt> <dd> Value of the <code>ServerAdmin</code> directive. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-171"><tt class="member">server_hostname</tt></a></b> +<dl><dt><b><tt id='l2h-187' xml:id='l2h-187' class="member">server_hostname</tt></b></dt> <dd> - Value of the <code>ServerName</code> directive. Same as CGI <a class="envvar" name="l2h-187">SERVER_NAME</a>.<i>(Read-Only</i>) + Value of the <code>ServerName</code> directive. Same as CGI <a class="envvar" id='l2h-203' xml:id='l2h-203'>SERVER_NAME</a>.<em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-172"><tt class="member">names</tt></a></b> +<dl><dt><b><tt id='l2h-188' xml:id='l2h-188' class="member">names</tt></b></dt> <dd> Tuple. List of normal server names specified in the <code>ServerAlias</code> directive. This list does not include wildcarded names, which are listed - separately in <code>wild_names</code>. <i>(Read-Only)</i> + separately in <code>wild_names</code>. <em>(Read-Only)</em> </dl> <P> -<dl><dt><b><a name="l2h-173"><tt class="member">wild_names</tt></a></b> +<dl><dt><b><tt id='l2h-189' xml:id='l2h-189' class="member">wild_names</tt></b></dt> <dd> Tuple. List of wildcarded server names specified in the <code>ServerAlias</code> - directive. <i>(Read-Only)</i> + directive. <em>(Read-Only)</em> </dl> <P> -<dl><dt><b><a name="l2h-174"><tt class="member">port</tt></a></b> +<dl><dt><b><tt id='l2h-190' xml:id='l2h-190' class="member">port</tt></b></dt> <dd> - Integer. TCP/IP port number. Same as CGI <a class="envvar" name="l2h-188">SERVER_PORT</a>. - <i>This member appears to be 0 on Apache 2.0, look at req.connection.local_addr instead</i> - <i>(Read-Only</i>) + Integer. TCP/IP port number. Same as CGI <a class="envvar" id='l2h-204' xml:id='l2h-204'>SERVER_PORT</a>. + <em>This member appears to be 0 on Apache 2.0, look at req.connection.local_addr instead</em> + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-175"><tt class="member">error_fname</tt></a></b> +<dl><dt><b><tt id='l2h-191' xml:id='l2h-191' class="member">error_fname</tt></b></dt> <dd> The name of the error log file for this server, if any. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-176"><tt class="member">loglevel</tt></a></b> +<dl><dt><b><tt id='l2h-192' xml:id='l2h-192' class="member">loglevel</tt></b></dt> <dd> Integer. Logging level. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-177"><tt class="member">is_virtual</tt></a></b> +<dl><dt><b><tt id='l2h-193' xml:id='l2h-193' class="member">is_virtual</tt></b></dt> <dd> Boolean. True if this is a virtual server. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-178"><tt class="member">timeout</tt></a></b> +<dl><dt><b><tt id='l2h-194' xml:id='l2h-194' class="member">timeout</tt></b></dt> <dd> Integer. Value of the <code>Timeout</code> directive. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-179"><tt class="member">keep_alive_timeout</tt></a></b> +<dl><dt><b><tt id='l2h-195' xml:id='l2h-195' class="member">keep_alive_timeout</tt></b></dt> <dd> Integer. Keepalive timeout. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-180"><tt class="member">keep_alive_max</tt></a></b> +<dl><dt><b><tt id='l2h-196' xml:id='l2h-196' class="member">keep_alive_max</tt></b></dt> <dd> Maximum number of requests per keepalive. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-181"><tt class="member">keep_alive</tt></a></b> +<dl><dt><b><tt id='l2h-197' xml:id='l2h-197' class="member">keep_alive</tt></b></dt> <dd> Use persistent connections? - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-182"><tt class="member">path</tt></a></b> +<dl><dt><b><tt id='l2h-198' xml:id='l2h-198' class="member">path</tt></b></dt> <dd> String. Path for <code>ServerPath</code> - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-183"><tt class="member">pathlen</tt></a></b> +<dl><dt><b><tt id='l2h-199' xml:id='l2h-199' class="member">pathlen</tt></b></dt> <dd> Integer. Path length. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-184"><tt class="member">limit_req_line</tt></a></b> +<dl><dt><b><tt id='l2h-200' xml:id='l2h-200' class="member">limit_req_line</tt></b></dt> <dd> Integer. Limit on size of the HTTP request line. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-185"><tt class="member">limit_req_fieldsize</tt></a></b> +<dl><dt><b><tt id='l2h-201' xml:id='l2h-201' class="member">limit_req_fieldsize</tt></b></dt> <dd> Integer. Limit on size of any request header field. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> -<dl><dt><b><a name="l2h-186"><tt class="member">limit_req_fields</tt></a></b> +<dl><dt><b><tt id='l2h-202' xml:id='l2h-202' class="member">limit_req_fields</tt></b></dt> <dd> Integer. Limit on number of request header fields. - <i>(Read-Only</i>) + <em>(Read-Only</em>) </dl> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.6.1 Server Methods" - rel="prev" title="4.5.6.1 Server Methods" - href="pyapi-mpsrv-meth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.6 Server Object (mp_server) " - rel="parent" title="4.5.6 Server Object (mp_server) " - href="pyapi-mpserver.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6 util - Miscellaneous" - rel="next" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.7.1 Server Methods" + href="pyapi-mpsrv-meth.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.7 Server Object (mp_server)" + href="pyapi-mpserver.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpsrv-meth.html">4.5.6.1 Server Methods</A> +<a class="sectref" rel="prev" href="pyapi-mpsrv-meth.html">4.5.7.1 Server Methods</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </A> +<a class="sectref" rel="parent" href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util.html">4.6 util - Miscellaneous</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mpsrv-meth.html b/doc-html/pyapi-mpsrv-meth.html index 9369b09dedeb23da82d47f7985de26e3ac0711ab..6738cc5bfb5563f5ea6379f877b8c1d033e4f5e4 100644 --- a/doc-html/pyapi-mpsrv-meth.html +++ b/doc-html/pyapi-mpsrv-meth.html @@ -1,74 +1,75 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mpsrv-mem.html"> -<LINK REL="prev" href="pyapi-mpserver.html"> -<LINK REL="parent" href="pyapi-mpserver.html"> -<LINK REL="next" href="pyapi-mpsrv-mem.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Server Methods"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.6.1 Server Methods</title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mpsrv-mem.html" /> +<link rel="prev" href="pyapi-mpserver.html" /> +<link rel="parent" href="pyapi-mpserver.html" /> +<link rel="next" href="pyapi-mpsrv-mem.html" /> +<meta name='aesop' content='information' /> +<title>4.5.7.1 Server Methods</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.6 Server Object (mp_server) " - href="pyapi-mpserver.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.6 Server Object (mp_server) " - href="pyapi-mpserver.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.6.2 Server Members" - href="pyapi-mpsrv-mem.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.7 Server Object (mp_server)" + href="pyapi-mpserver.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.7 Server Object (mp_server)" + href="pyapi-mpserver.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.7.2 Server Members" + href="pyapi-mpsrv-mem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </A> +<a class="sectref" rel="prev" href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </A> +<a class="sectref" rel="parent" href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpsrv-mem.html">4.5.6.2 Server Members</A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mpsrv-mem.html">4.5.7.2 Server Members</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H3><A NAME="SECTION006561000000000000000"> </A> +<H3><A NAME="SECTION006571000000000000000"></A><A NAME="pyapi-mpsrv-meth"></A> <BR> -4.5.6.1 Server Methods +4.5.7.1 Server Methods </H3> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-165"><tt class="method">get_config</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-180' xml:id='l2h-180' class="method">get_config</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> - Similar to <code>req.get_config()</code>, but returns a config pointed to - by <code>server->module_config</code> Apache config vector. + Similar to <code>req.get_config()</code>, but returns a table object holding + only the mod_python configuration defined at global scope within the + Apache configuration. That is, outside of the context of any VirtualHost, + Location, Directory or Files directives. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-166"><tt class="method">get_options</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-181' xml:id='l2h-181' class="method">get_options</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Similar to <code>req.get_options()</code>, but returns a table object holding only the mod_python options defined at global scope within the Apache @@ -78,52 +79,84 @@ <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-167"><tt class="method">register_cleanup</tt></a></b>(</nobr></td> - <td><var>request, callable</var><big>[</big><var>, data</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-182' xml:id='l2h-182' class="method">log_error</tt></b>(</nobr></td> + <td><var>message</var><big>[</big><var>, level</var><big>]</big><var></var>)</td></tr></table></dt> +<dd> + An interface to the Apache <code>ap_log_error</code> + function. <var>message</var> is a string with the error message, + <var>level</var> is one of the following flags constants: + +<P> +<div class="verbatim"><pre> + APLOG_EMERG + APLOG_ALERT + APLOG_CRIT + APLOG_ERR + APLOG_WARNING + APLOG_NOTICE + APLOG_INFO + APLOG_DEBUG + APLOG_NOERRNO +</pre></div> + +<P> +If you need to write to log and do not have a reference to a server or + request object, use the <tt class="function">apache.log_error</tt> function. +</dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-183' xml:id='l2h-183' class="method">register_cleanup</tt></b>(</nobr></td> + <td><var>request, callable</var><big>[</big><var>, data</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Registers a cleanup. Very similar to <tt class="function">req.register_cleanup()</tt>, except this cleanup will be executed at child termination time. This function - requires one extra argument - the request object. + requires the request object be supplied to infer the interpreter name. + If you don't have any request object at hand, then you must use the + <tt class="function">apache.register_cleanup</tt> variant. + <em>Warning:</em> do not pass directly or indirectly a request object in the + data parameter. Since the callable will be called at server shutdown time, + the request object won't exist anymore and any manipulation of it in the + callable will give undefined behaviour. </dl> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.6 Server Object (mp_server) " - rel="prev" title="4.5.6 Server Object (mp_server) " - href="pyapi-mpserver.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5.6 Server Object (mp_server) " - rel="parent" title="4.5.6 Server Object (mp_server) " - href="pyapi-mpserver.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.6.2 Server Members" - rel="next" title="4.5.6.2 Server Members" - href="pyapi-mpsrv-mem.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.7 Server Object (mp_server)" + href="pyapi-mpserver.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5.7 Server Object (mp_server)" + href="pyapi-mpserver.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.7.2 Server Members" + href="pyapi-mpsrv-mem.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </A> +<a class="sectref" rel="prev" href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" href="pyapi-mpserver.html">4.5.6 Server Object (mp_server) </A> +<a class="sectref" rel="parent" href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mpsrv-mem.html">4.5.6.2 Server Members</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mpsrv-mem.html">4.5.7.2 Server Members</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-mptable.html b/doc-html/pyapi-mptable.html index 5a0ccb386765cac32f1b08e8e6d8919683e6e66b..1f2f36f1c8ae5738c0c59fe252a4feb9c1573925 100644 --- a/doc-html/pyapi-mptable.html +++ b/doc-html/pyapi-mptable.html @@ -1,69 +1,68 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-mprequest.html"> -<LINK REL="prev" href="pyapi-apmeth.html"> -<LINK REL="parent" href="module-apache.html"> -<LINK REL="next" href="pyapi-mprequest.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Table Object (mp_table) "> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> -<title>4.5.2 Table Object (mp_table) </title> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-mprequest.html" /> +<link rel="prev" href="pyapi-apmem.html" /> +<link rel="parent" href="module-apache.html" /> +<link rel="next" href="pyapi-mprequest.html" /> +<meta name='aesop' content='information' /> +<title>4.5.3 Table Object (mp_table)</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.1 Functions" - href="pyapi-apmeth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.3 Request Object " - href="pyapi-mprequest.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.2 Attributes" + href="pyapi-apmem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.4 Request Object" + href="pyapi-mprequest.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-apmeth.html">4.5.1 Functions</A> +<a class="sectref" rel="prev" href="pyapi-apmem.html">4.5.2 Attributes</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mprequest.html">4.5.3 Request Object </A> -<br><hr> +<a class="sectref" rel="next" href="pyapi-mprequest.html">4.5.4 Request Object</A> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006520000000000000000"> </A> +<H2><A NAME="SECTION006530000000000000000"></A><A NAME="pyapi-mptable"></A> <BR> -4.5.2 Table Object (mp_table)<a name="l2h-40"> </a> +4.5.3 Table Object (mp_table)<a id='l2h-43' xml:id='l2h-43'></a> </H2> <P> -<a name="l2h-43"> </a> +<a id='l2h-46' xml:id='l2h-46'></a> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-41"><tt class="class">table</tt></a></b>(</nobr></td> - <td><big>[</big><var>mapping-or-sequence</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-44' xml:id='l2h-44' class="class">table</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>mapping-or-sequence</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Returns a new empty object of type <code>mp_table</code>. See Section - <A HREF="#pyapi-mptable">4.5.2</A> for description of the table object. The + <A HREF="#pyapi-mptable">4.5.3</A> for description of the table object. The <var>mapping-or-sequence</var> will be used to provide initial values for the table. @@ -101,8 +100,8 @@ In addition to normal dictionary-like behavior, the table object also <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-42"><tt class="method">add</tt></a></b>(</nobr></td> - <td><var>key, val</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-45' xml:id='l2h-45' class="method">add</tt></b>(</nobr></td> + <td><var>key, val</var>)</td></tr></table></dt> <dd> <tt class="function">add()</tt> allows for creating duplicate keys, which is useful when multiple headers, such as <code>Set-Cookie:</code> are required. @@ -117,41 +116,40 @@ In addition to normal dictionary-like behavior, the table object also <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.1 Functions" - rel="prev" title="4.5.1 Functions" - href="pyapi-apmeth.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.5 apache - Access" - rel="parent" title="4.5 apache - Access" - href="module-apache.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.5.3 Request Object " - rel="next" title="4.5.3 Request Object " - href="pyapi-mprequest.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.2 Attributes" + href="pyapi-apmem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.5 apache - Access" + href="module-apache.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.5.4 Request Object" + href="pyapi-mprequest.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-apmeth.html">4.5.1 Functions</A> +<a class="sectref" rel="prev" href="pyapi-apmem.html">4.5.2 Attributes</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="module-apache.html">4.5 apache - Access</A> <b class="navlabel">Next:</b> -<a class="sectref" rel="next" href="pyapi-mprequest.html">4.5.3 Request Object </A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +<a class="sectref" rel="next" href="pyapi-mprequest.html">4.5.4 Request Object</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-psp.html b/doc-html/pyapi-psp.html index 3776239921f359a86d604861ad5f9c0aa544f60a..edfeaed5804013f3f9229db08aeacd4113722196 100644 --- a/doc-html/pyapi-psp.html +++ b/doc-html/pyapi-psp.html @@ -1,60 +1,59 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-sess.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="directives.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="psp - Python Server Pages"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-sess.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="directives.html" /> +<meta name='aesop' content='information' /> <title>4.9 psp - Python Server Pages</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.8.2 Examples" - href="pyapi-sess-example.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5. Apache Configuration Directives" - href="directives.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.8.2 Examples" + href="pyapi-sess-example.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5. Apache Configuration Directives" + href="directives.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-sess-example.html">4.8.2 Examples</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="directives.html">5. Apache Configuration Directives</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006900000000000000000"> </A> +<H1><A NAME="SECTION006900000000000000000"></A><A NAME="pyapi-psp"></A> <BR> 4.9 <tt class="module">psp</tt> - Python Server Pages </H1> - +<A NAME="module-psp"></A> <P> The <tt class="module">psp</tt> module provides a way to convert text documents @@ -69,8 +68,8 @@ The parser used by <tt class="module">psp</tt> is written in C (generated using and is therefore very fast. <P> -<i>See <A href="hand-psp.html#hand-psp">6.2</A> ``PSP Handler'' for additional PSP -information.</i> +<em>See <A href="hand-psp.html#hand-psp">7.2</A> ``PSP Handler'' for additional PSP +information.</em> <P> Inside the document, Python <i class="dfn">code</i> needs to be surrounded by @@ -195,8 +194,8 @@ it has to be absolute. <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-235"><tt class="class">PSP</tt></a></b>(</nobr></td> - <td><var>req, </var><big>[</big><var>, filename, string, vars</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-258' xml:id='l2h-258' class="class">PSP</tt></b>(</nobr></td> + <td><var>req, </var><big>[</big><var>, filename, string, vars</var><big>]</big><var></var>)</td></tr></table></dt> <dd> This class represents a PSP object. @@ -230,11 +229,12 @@ The cache is limited to 512 pages, which depending on the size of bsd db. You will need to check which implementation <tt class="module">anydbm</tt> defaults to on your system as some dbm libraries impose a limit on the size of the entry making them unsuitable. Dbm caching can be - enabled via <code>PSPDbmCache</code> Python option, e.g.: + enabled via <code>mod_python.psp.cache_database_filename</code> Python + option, e.g.: <P> <div class="verbatim"><pre> -PythonOption PSPDbmCache ``/tmp/pspcache.dbm'' +PythonOption mod_python.psp.cache_database_filename ``/tmp/pspcache.dbm'' </pre></div> Note that the dbm cache file is not deleted when the server restarts. @@ -244,15 +244,23 @@ Unlike with files, the code objects resulting from a string are cached in memory only. There is no option to cache in a dbm file at this time. +<P> +Note that the above name for the option setting was only changed to + this value in mod_python 3.3. If you need to retain backward compatability + with older versions of mod_python use the <code>PSPDbmCache</code> option + instead. + <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-236"><tt class="method">run</tt></a></b>(</nobr></td> - <td><big>[</big><var>vars</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-259' xml:id='l2h-259' class="method">run</tt></b>(</nobr></td> + <td><var></var><big>[</big><var>vars, flush</var><big>]</big><var></var>)</td></tr></table></dt> <dd> This method will execute the code (produced at object initialization time by parsing and compiling the PSP source). Optional argument <var>vars</var> is a dictionary keyed by - strings that will be passed in as global variables. + strings that will be passed in as global variables. Optional + argument <var>flush</var> is a boolean flag indicating whether output + should be flushed. The default is not to flush output. <P> Additionally, the PSP code will be given global variables @@ -268,15 +276,15 @@ Additionally, the PSP code will be given global variables <P> The object passed in <code>psp</code> is an instance of - <tt class="class">PSPInstance</tt>. + <tt class="class">PSPInterface</tt>. <P> </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-237"><tt class="method">display_code</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-260' xml:id='l2h-260' class="method">display_code</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns an HTML-formatted string representing a side-by-side listing of the original PSP code and resulting Python code @@ -310,8 +318,8 @@ def handler(req): <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-238"><tt class="class">PSPInstance</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-261' xml:id='l2h-261' class="class">PSPInterface</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> An object of this class is passed as a global variable <code>psp</code> to the PSP code. Objects of this class are instantiated internally and @@ -319,8 +327,8 @@ def handler(req): <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-239"><tt class="method">set_error_page</tt></a></b>(</nobr></td> - <td><var>filename</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-262' xml:id='l2h-262' class="method">set_error_page</tt></b>(</nobr></td> + <td><var>filename</var>)</td></tr></table></dt> <dd> Used to set a psp page to be processed when an exception occurs. If the path is absolute, it will be appended to document @@ -332,8 +340,8 @@ def handler(req): <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-240"><tt class="method">apply_data</tt></a></b>(</nobr></td> - <td><var>object</var><big>[</big><var>, **kw</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-263' xml:id='l2h-263' class="method">apply_data</tt></b>(</nobr></td> + <td><var>object</var><big>[</big><var>, **kw</var><big>]</big><var></var>)</td></tr></table></dt> <dd> This method will call the callable object <var>object</var>, passing form data as keyword arguments, and return the result. @@ -341,8 +349,8 @@ def handler(req): <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-241"><tt class="method">redirect</tt></a></b>(</nobr></td> - <td><var>location</var><big>[</big><var>, permanent=0</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-264' xml:id='l2h-264' class="method">redirect</tt></b>(</nobr></td> + <td><var>location</var><big>[</big><var>, permanent=0</var><big>]</big><var></var>)</td></tr></table></dt> <dd> This method will redirect the browser to location <var>location</var>. If <var>permanent</var> is true, then @@ -377,8 +385,8 @@ functions: <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-242"><tt class="function">parse</tt></a></b>(</nobr></td> - <td><var>filename</var><big>[</big><var>, dir</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-265' xml:id='l2h-265' class="function">parse</tt></b>(</nobr></td> + <td><var>filename</var><big>[</big><var>, dir</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -395,8 +403,8 @@ If <var>dir</var> is specified, then the ultimate filename to be parsed <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-243"><tt class="function">parsestring</tt></a></b>(</nobr></td> - <td><var>string</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-266' xml:id='l2h-266' class="function">parsestring</tt></b>(</nobr></td> + <td><var>string</var>)</td></tr></table></dt> <dd> <P> @@ -407,41 +415,40 @@ This function will parse contents of <var>string</var> and return a string </dl> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.8.2 Examples" - rel="prev" title="4.8.2 Examples" - href="pyapi-sess-example.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="5. Apache Configuration Directives" - rel="next" title="5. Apache Configuration Directives" - href="directives.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.8.2 Examples" + href="pyapi-sess-example.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="5. Apache Configuration Directives" + href="directives.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-sess-example.html">4.8.2 Examples</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="directives.html">5. Apache Configuration Directives</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-sess-classes.html b/doc-html/pyapi-sess-classes.html index 8febaa837226fb72cc752ce3c27be96c485672b0..92797aa65436196ef323cb830bd1abdf70b633a2 100644 --- a/doc-html/pyapi-sess-classes.html +++ b/doc-html/pyapi-sess-classes.html @@ -1,65 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-sess-example.html"> -<LINK REL="prev" href="pyapi-sess.html"> -<LINK REL="parent" href="pyapi-sess.html"> -<LINK REL="next" href="pyapi-sess-example.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Classes"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-sess-example.html" /> +<link rel="prev" href="pyapi-sess.html" /> +<link rel="parent" href="pyapi-sess.html" /> +<link rel="next" href="pyapi-sess-example.html" /> +<meta name='aesop' content='information' /> <title>4.8.1 Classes</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.8 Session - Session" - href="pyapi-sess.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.8 Session - Session" - href="pyapi-sess.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.8.2 Examples" - href="pyapi-sess-example.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.8 Session - Session" + href="pyapi-sess.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.8 Session - Session" + href="pyapi-sess.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.8.2 Examples" + href="pyapi-sess-example.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-sess.html">4.8 Session - Session</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-sess.html">4.8 Session - Session</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-sess-example.html">4.8.2 Examples</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006810000000000000000"> </A> +<H2><A NAME="SECTION006810000000000000000"></A><A NAME="pyapi-sess-classes"></A> <BR> 4.8.1 Classes </H2> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-215"><tt class="function">Session</tt></a></b>(</nobr></td> - <td><var>req</var><big>[</big><var>, sid, secret, timeout, lock</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-238' xml:id='l2h-238' class="function">Session</tt></b>(</nobr></td> + <td><var>req</var><big>[</big><var>, sid, secret, timeout, lock</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -67,27 +66,39 @@ <P> This function returns a instance of the default session class. The - the session class to be used can be specified using - <var>PythonOption session value</var>, where <var>value</var> is one of - <tt class="class">DbmSession</tt>, <tt class="class">MemorySession</tt> or <tt class="class">FileSession</tt>. Specifying - custom session classes using PythonOption session is not yet supported. + session class to be used can be specified using <var>PythonOption + mod_python.session.session_type value</var>, where <var>value</var> is one of + <tt class="class">DbmSession</tt>, <tt class="class">MemorySession</tt> or <tt class="class">FileSession</tt>. + Specifying custom session classes using <code>PythonOption</code> session is + not yet supported. <P> -If <var>PythonOption session</var> is not found, the function queries - the MPM and based on that returns either a new instance of - <tt class="class">DbmSession</tt> or <tt class="class">MemorySession</tt>. +If session type option is not found, the function queries the MPM and + based on that returns either a new instance of <tt class="class">DbmSession</tt> or + <tt class="class">MemorySession</tt>. <tt class="class">MemorySession</tt> will be used if the MPM is + threaded and not forked (such is the case on Windows), or if it threaded, + forked, but only one process is allowed (the worker MPM can be configured + to run this way). In all other cases <tt class="class">DbmSession</tt> is used. <P> -<tt class="class">MemorySession</tt> will be used if the MPM is threaded and not - forked (such is the case on Windows), or if it threaded, forked, but - only one process is allowed (the worker MPM can be configured to run - this way). In all other cases <tt class="class">DbmSession</tt> is used. +Note that on Windows if you are using multiple Python interpreter + instances and you need sessions to be shared between applications + running within the context of the distinct Python interpreter + instances, you must specifically indicate that <tt class="class">DbmSession</tt> + should be used, as <tt class="class">MemorySession</tt> will only allow a session + to be valid within the context of the same Python interpreter instance. + +<P> +Also note that the option name <code>mod_python.session.session_type</code> + only started to be used from mod_python 3.3 onwards. If you need to + retain compatability with older versions of mod_python, you should + use the now obsolete <code>session</code> option instead. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-216"><tt class="class">BaseSession</tt></a></b>(</nobr></td> - <td><var>req</var><big>[</big><var>, sid, secret, timeout, lock</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-239' xml:id='l2h-239' class="class">BaseSession</tt></b>(</nobr></td> + <td><var>req</var><big>[</big><var>, sid, secret, timeout, lock</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -111,13 +122,33 @@ This class is meant to be used as a base class for other classes <P> Cookies generated by sessions will have a path attribute which is - calculated by comparing the server <code>DocumentRoot</code> and the - directory in which the <code>PythonHandler</code> directive currently in - effect was specified. E.g. if document root is <span class="file">/a/b/c</span> and - <code>PythonHandler</code> was specified in <span class="file">/a/b/c/d/e</span>, the path - will be set to <span class="file">/d/e</span>. You can force a specific path by using - <code>ApplicationPath</code> option ("<tt class="samp">PythonOption ApplicationPath - /my/path</tt>" in server configuration). + calculated by comparing the server <code>DocumentRoot</code> and the directory + in which the <code>PythonHandler</code> directive currently in effect was + specified. E.g. if document root is <span class="file">/a/b/c</span> and the directory + <code>PythonHandler</code> was specified was <span class="file">/a/b/c/d/e</span>, the path will be + set to <span class="file">/d/e</span>. + +<P> +The deduction of the path in this way will only work though where the + <code>Directory</code> directive is used and the directory is actually within + the document root. If the <code>Location</code> directive is used or the + directory is outside of the document root, the path will be set to + <span class="file">/</span>. You can force a specific path by setting the + <code>mod_python.session.application_path</code> option ("<tt class="samp">PythonOption + mod_python.session.application_path /my/path</tt>" in server configuration). + +<P> +Note that prior to mod_python 3.3, the option was <code>ApplicationPath</code>. + If your system needs to be compatible with older versions of mod_python, + you should continue to use the now obsolete option name. + +<P> +The domain of a cookie is by default not set for a session and as such + the session is only valid for the host which generated it. In order to + have a session which spans across common sub domains, you can specify the + parent domain using the <code>mod_python.session.application_domain</code> + option ("<tt class="samp">PythonOption mod_python.session.application_domain + mod_python.org</tt>" in server configuration). <P> When a <var>secret</var> is provided, <tt class="class">BaseSession</tt> will use @@ -127,8 +158,10 @@ When a <var>secret</var> is provided, <tt class="class">BaseSession</tt> will us generated to be very difficult to guess). <P> -A session will timeout if it has not been accessed for more than - <var>timeout</var>, which defaults to 30 minutes. An attempt to load an +A session will timeout if it has not been accessed and a save performed, + within the <var>timeout</var> period. Upon a save occuring the time of last + access is updated and the period until the session will timeout be reset. + The default <var>timeout</var> period is 30 minutes. An attempt to load an expired session will result in a ``new'' session. <P> @@ -143,8 +176,8 @@ A session is in ``new'' state when the session id was just <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-217"><tt class="method">is_new</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-240' xml:id='l2h-240' class="method">is_new</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns 1 if this session is new. A session will also be ``new'' after an attempt to instantiate an expired or non-existent @@ -160,16 +193,16 @@ if sess.is_new(): <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-218"><tt class="method">id</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-241' xml:id='l2h-241' class="method">id</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns the session id. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-219"><tt class="method">created</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-242' xml:id='l2h-242' class="method">created</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns the session creation time in seconds since beginning of epoch. @@ -177,32 +210,32 @@ if sess.is_new(): <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-220"><tt class="method">last_accessed</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-243' xml:id='l2h-243' class="method">last_accessed</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns last access time in seconds since beginning of epoch. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-221"><tt class="method">timeout</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-244' xml:id='l2h-244' class="method">timeout</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Returns session timeout interval in seconds. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-222"><tt class="method">set_timeout</tt></a></b>(</nobr></td> - <td><var>secs</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-245' xml:id='l2h-245' class="method">set_timeout</tt></b>(</nobr></td> + <td><var>secs</var>)</td></tr></table></dt> <dd> Set timeout to <var>secs</var>. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-223"><tt class="method">invalidate</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-246' xml:id='l2h-246' class="method">invalidate</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> This method will remove the session from the persistent store and also place a header in outgoing headers to invalidate the session @@ -211,32 +244,32 @@ if sess.is_new(): <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-224"><tt class="method">load</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-247' xml:id='l2h-247' class="method">load</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Load the session values from storage. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-225"><tt class="method">save</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-248' xml:id='l2h-248' class="method">save</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> This method writes session values to storage. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-226"><tt class="method">delete</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-249' xml:id='l2h-249' class="method">delete</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Remove the session from storage. </dl> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-227"><tt class="method">init_lock</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-250' xml:id='l2h-250' class="method">init_lock</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> This method initializes the session lock. There is no need to ever call this method, it is intended for subclasses that wish to use @@ -245,8 +278,8 @@ if sess.is_new(): <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-228"><tt class="method">lock</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-251' xml:id='l2h-251' class="method">lock</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Locks this session. If the session is already locked by another thread/process, wait until that lock is released. There is no need @@ -259,8 +292,8 @@ This method registeres a cleanup which always unlocks the session <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-229"><tt class="method">unlock</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-252' xml:id='l2h-252' class="method">unlock</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> Unlocks this session. (Same as <tt class="method">lock()</tt> - when locking is handled automatically (default), there is no need to call this @@ -269,8 +302,8 @@ This method registeres a cleanup which always unlocks the session <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-230"><tt class="method">cleanup</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><tt id='l2h-253' xml:id='l2h-253' class="method">cleanup</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> This method is for subclasses to implement session storage cleaning mechanism (i.e. deleting expired sessions, etc.). It will @@ -289,8 +322,8 @@ This method registeres a cleanup which always unlocks the session <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-231"><tt class="class">DbmSession</tt></a></b>(</nobr></td> - <td><var>req, </var><big>[</big><var>, dbm, sid, secret, dbmtype, timeout, lock</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-254' xml:id='l2h-254' class="class">DbmSession</tt></b>(</nobr></td> + <td><var>req, </var><big>[</big><var>, dbm, sid, secret, dbmtype, timeout, lock</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -306,10 +339,18 @@ This class provides session storage using a dbm file. Generally, dbm server restarts). By default the session information is stored in a dbmfile named <span class="file">mp_sess.dbm</span> and stored in a temporary directory returned by <code>tempfile.gettempdir()</code> standard library - function. An alternative directory can be specified with the - <code>PythonOption session_directory</code> directive. - The path and filename can can be overridden by setting <code>PythonOption - session_dbm filename</code>. + function. An alternative directory can be specified using + <code>PythonOption mod_python.dbm_session.database_directory + /path/to/directory</code>. The path and filename can can be overridden by + setting <code>PythonOption mod_python.dbm_session.database_filename + filename</code>. + +<P> +Note that the above names for the <code>PythonOption</code> settings were + changed to these values in mod_python 3.3. If you need to retain + compatability with older versions of mod_python, you should continue + to use the now obsolete <code>session_directory</code> and <code>session_dbm</code> + options. <P> The implementation uses Python <tt class="module">anydbm</tt> module, which will @@ -327,8 +368,8 @@ Note that using this class directly is not cross-platform. For best <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-232"><tt class="class">FileSession</tt></a></b>(</nobr></td> - <td><var>req, </var><big>[</big><var>, sid, secret, timeout, lock, fast_cleanup, verify_cleanup</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-255' xml:id='l2h-255' class="class">FileSession</tt></b>(</nobr></td> + <td><var>req, </var><big>[</big><var>, sid, secret, timeout, lock, fast_cleanup, verify_cleanup</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -345,16 +386,22 @@ Session data is stored in a separate file for each session. These The session files are saved in a directory named mp_sess in the temporary directory returned by the <code>tempfile.gettempdir()</code> standard library function. An alternate path can be set using - <code>PythonOption session_directory /path/to/directory</code>. This - directory must exist and be readable and writeable by the apache - process. + <code>PythonOption mod_python.file_session.database_directory + /path/to/directory</code>. This directory must exist and be readable and + writeable by the apache process. + +<P> +Note that the above name for the <code>PythonOption</code> setting was + changed to these values in mod_python 3.3. If you need to retain + compatability with older versions of mod_python, you should continue + to use the now obsolete <code>session_directory</code> option. <P> -Expired session files are periodically removed by the cleanup - mechanism. The behaviour of the cleanup can be controlled using the - <var>fast_cleanup</var> and <var>verify_cleanup</var> parameters, as well as - <var>PythonOption session_grace_period</var> and - <var>PythonOption session_cleanup_time_limit</var>. +Expired session files are periodically removed by the cleanup mechanism. + The behaviour of the cleanup can be controlled using the + <var>fast_cleanup</var> and <var>verify_cleanup</var> parameters, as well as + <var>PythonOption mod_python.file_session.cleanup_time_limit</var> and + <var>PythonOption mod_python.file_session.cleanup_grace_period</var>. <P> @@ -388,7 +435,7 @@ The timeout used in the fast_cleanup calculation is same as the <P> The value of <var>fast_cleanup</var> can also be set using - <code>PythonOption session_fast_cleanup</code>. + <code>PythonOption mod_python.file_session.enable_fast_cleanup</code>. <P> </LI> @@ -412,11 +459,11 @@ When <var>verify_cleanup</var> is False, the timeout value for the current <P> The value of <var>verify_cleanup</var> can also be set using - <code>PythonOption session_verify_cleanup</code> + <code>PythonOption mod_python.file_session.verify_session_timeout</code>. <P> </LI> -<LI><var>PythonOption session_cleanup_time_limit [value]</var> +<LI><var>PythonOption mod_python.file_session.cleanup_time_limit [value]</var> Integer value in seconds. Default is 2 seconds. <P> @@ -435,7 +482,7 @@ Setting <var>session_cleanup_time_limit</var> to 0 will disable this <P> </LI> -<LI><var>PythonOption session_grace_period [value]</var> +<LI><var>PythonOption mod_python.file_session.cleanup_grace_period [value]</var> Integer value in seconds. Default is 240 seconds. This value is added to the session timeout in determining if a session file should be deleted. @@ -462,15 +509,17 @@ The default value should be sufficient for most applications. <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-233"><tt class="class">MemorySession</tt></a></b>(</nobr></td> - <td><var>req, </var><big>[</big><var>, sid, secret, timeout, lock</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-256' xml:id='l2h-256' class="class">MemorySession</tt></b>(</nobr></td> + <td><var>req, </var><big>[</big><var>, sid, secret, timeout, lock</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> This class provides session storage using a global dictionary. This class provides by far the best performance, but cannot be used in a multi-process configuration, and also consumes memory for every - active session. + active session. It also cannot be used where multiple Python interpreters + are used within the one Apache process and it is necessary to share + sessions between applications running in the distinct interpreters. <P> Note that using this class directly is not cross-platform. For best @@ -483,41 +532,40 @@ Note that using this class directly is not cross-platform. For best <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.8 Session - Session" - rel="prev" title="4.8 Session - Session" - href="pyapi-sess.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.8 Session - Session" - rel="parent" title="4.8 Session - Session" - href="pyapi-sess.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.8.2 Examples" - rel="next" title="4.8.2 Examples" - href="pyapi-sess-example.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.8 Session - Session" + href="pyapi-sess.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.8 Session - Session" + href="pyapi-sess.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.8.2 Examples" + href="pyapi-sess-example.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-sess.html">4.8 Session - Session</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-sess.html">4.8 Session - Session</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-sess-example.html">4.8.2 Examples</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-sess-example.html b/doc-html/pyapi-sess-example.html index 7c45ef2f5d92794b37455c33a6da3e585a199977..ebaa79c8dd9ae71bdc5697d553496648058cffeb 100644 --- a/doc-html/pyapi-sess-example.html +++ b/doc-html/pyapi-sess-example.html @@ -1,56 +1,55 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-sess-classes.html"> -<LINK REL="parent" href="pyapi-sess.html"> -<LINK REL="next" href="pyapi-psp.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Examples"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-sess-classes.html" /> +<link rel="parent" href="pyapi-sess.html" /> +<link rel="next" href="pyapi-psp.html" /> +<meta name='aesop' content='information' /> <title>4.8.2 Examples</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.8.1 Classes" - href="pyapi-sess-classes.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.8 Session - Session" - href="pyapi-sess.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.9 psp - Python" - href="pyapi-psp.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.8.1 Classes" + href="pyapi-sess-classes.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.8 Session - Session" + href="pyapi-sess.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.9 psp - Python" + href="pyapi-psp.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-sess-classes.html">4.8.1 Classes</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-sess.html">4.8 Session - Session</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-psp.html">4.9 psp - Python</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006820000000000000000"> </A> +<H2><A NAME="SECTION006820000000000000000"></A><A NAME="pyapi-sess-example"></A> <BR> 4.8.2 Examples </H2> @@ -78,41 +77,40 @@ def handler(req): <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.8.1 Classes" - rel="prev" title="4.8.1 Classes" - href="pyapi-sess-classes.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.8 Session - Session" - rel="parent" title="4.8 Session - Session" - href="pyapi-sess.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.9 psp - Python" - rel="next" title="4.9 psp - Python" - href="pyapi-psp.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.8.1 Classes" + href="pyapi-sess-classes.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.8 Session - Session" + href="pyapi-sess.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.9 psp - Python" + href="pyapi-psp.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-sess-classes.html">4.8.1 Classes</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-sess.html">4.8 Session - Session</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-psp.html">4.9 psp - Python</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-sess.html b/doc-html/pyapi-sess.html index 3ed10cc79086d269be44a00c1337c0b2e60f982c..5874730e861b730d8a86db1a649b99b0fdedf691 100644 --- a/doc-html/pyapi-sess.html +++ b/doc-html/pyapi-sess.html @@ -1,61 +1,60 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-psp.html"> -<LINK REL="prev" href="pyapi-cookie.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="pyapi-sess-classes.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Session - Session Management"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-psp.html" /> +<link rel="prev" href="pyapi-cookie.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="pyapi-sess-classes.html" /> +<meta name='aesop' content='information' /> <title>4.8 Session - Session Management</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.7.3 Examples" - href="pyapi-cookie-example.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.8.1 Classes" - href="pyapi-sess-classes.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.7.3 Examples" + href="pyapi-cookie-example.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.8.1 Classes" + href="pyapi-sess-classes.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-cookie-example.html">4.7.3 Examples</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-sess-classes.html">4.8.1 Classes</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006800000000000000000"> </A> +<H1><A NAME="SECTION006800000000000000000"></A><A NAME="pyapi-sess"></A> <BR> 4.8 <tt class="module">Session</tt> - Session Management </H1> - +<A NAME="module-Session"></A> <P> The <tt class="module">Session</tt> module provides objects for maintaining persistent @@ -80,7 +79,8 @@ delay.) <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -89,43 +89,43 @@ delay.) <LI><A href="pyapi-sess-example.html">4.8.2 Examples</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.7.3 Examples" - rel="prev" title="4.7.3 Examples" - href="pyapi-cookie-example.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.8.1 Classes" - rel="next" title="4.8.1 Classes" - href="pyapi-sess-classes.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.7.3 Examples" + href="pyapi-cookie-example.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.8.1 Classes" + href="pyapi-sess-classes.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-cookie-example.html">4.7.3 Examples</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-sess-classes.html">4.8.1 Classes</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-util-fstor-examples.html b/doc-html/pyapi-util-fstor-examples.html index 7a0010562408d5a1160e7a3b2a0da38ad61e916b..25c4da6263152d16be94b5f10d6fe0797c5b077c 100644 --- a/doc-html/pyapi-util-fstor-examples.html +++ b/doc-html/pyapi-util-fstor-examples.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-util-fstor-fld.html"> -<LINK REL="prev" href="pyapi-util-fstor.html"> -<LINK REL="parent" href="pyapi-util.html"> -<LINK REL="next" href="pyapi-util-fstor-fld.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="FieldStorage Examples"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-util-fstor-fld.html" /> +<link rel="prev" href="pyapi-util-fstor.html" /> +<link rel="parent" href="pyapi-util.html" /> +<link rel="next" href="pyapi-util-fstor-fld.html" /> +<meta name='aesop' content='information' /> <title>4.6.2 FieldStorage Examples</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6.1 FieldStorage class" - href="pyapi-util-fstor.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6.3 Field class" - href="pyapi-util-fstor-fld.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6.1 FieldStorage class" + href="pyapi-util-fstor.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6.3 Field class" + href="pyapi-util-fstor-fld.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util-fstor.html">4.6.1 FieldStorage class</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util-fstor-fld.html">4.6.3 Field class</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006620000000000000000"> </A> +<H2><A NAME="SECTION006620000000000000000"></A><A NAME="pyapi-util-fstor-examples"></A> <BR> 4.6.2 FieldStorage Examples </H2> @@ -148,41 +147,40 @@ request_data = util.FieldStorage(request, keep_blank_values=True, <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6.1 FieldStorage class" - rel="prev" title="4.6.1 FieldStorage class" - href="pyapi-util-fstor.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.6 util - Miscellaneous" - rel="parent" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6.3 Field class" - rel="next" title="4.6.3 Field class" - href="pyapi-util-fstor-fld.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6.1 FieldStorage class" + href="pyapi-util-fstor.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6.3 Field class" + href="pyapi-util-fstor-fld.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util-fstor.html">4.6.1 FieldStorage class</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util-fstor-fld.html">4.6.3 Field class</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-util-fstor-fld.html b/doc-html/pyapi-util-fstor-fld.html index 4b0d548f266a0f2c4baff7ba6c7a1ce097766f3b..3c2e690046ef23d2dcb8356098b51ca940c4701f 100644 --- a/doc-html/pyapi-util-fstor-fld.html +++ b/doc-html/pyapi-util-fstor-fld.html @@ -1,65 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-util-funcs.html"> -<LINK REL="prev" href="pyapi-util-fstor-examples.html"> -<LINK REL="parent" href="pyapi-util.html"> -<LINK REL="next" href="pyapi-util-funcs.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Field class"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-util-funcs.html" /> +<link rel="prev" href="pyapi-util-fstor-examples.html" /> +<link rel="parent" href="pyapi-util.html" /> +<link rel="next" href="pyapi-util-funcs.html" /> +<meta name='aesop' content='information' /> <title>4.6.3 Field class</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6.2 FieldStorage Examples" - href="pyapi-util-fstor-examples.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6.4 Other functions" - href="pyapi-util-funcs.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6.2 FieldStorage Examples" + href="pyapi-util-fstor-examples.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6.4 Other functions" + href="pyapi-util-funcs.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util-fstor-examples.html">4.6.2 FieldStorage Examples</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util-funcs.html">4.6.4 Other functions</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006630000000000000000"> </A> +<H2><A NAME="SECTION006630000000000000000"></A><A NAME="pyapi-util-fstor-fld"></A> <BR> 4.6.3 Field class </H2> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-194"><tt class="class">Field</tt></a></b>(</nobr></td> - <td>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-216' xml:id='l2h-216' class="class">Field</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> <dd> This class is used internally by <tt class="class">FieldStorage</tt> and is not meant to be instantiated by the user. Each instance of a <tt class="class">Field</tt> @@ -69,13 +68,13 @@ <tt class="class">Field</tt> instances have the following attributes: <P> -<dl><dt><b><a name="l2h-195"><tt class="member">name</tt></a></b> +<dl><dt><b><tt id='l2h-217' xml:id='l2h-217' class="member">name</tt></b></dt> <dd> The input name. </dl> <P> -<dl><dt><b><a name="l2h-196"><tt class="member">value</tt></a></b> +<dl><dt><b><tt id='l2h-218' xml:id='l2h-218' class="member">value</tt></b></dt> <dd> The input value. This attribute can be used to read data from a file upload as well, but one has to exercise caution when dealing with @@ -84,7 +83,7 @@ </dl> <P> -<dl><dt><b><a name="l2h-197"><tt class="member">file</tt></a></b> +<dl><dt><b><tt id='l2h-219' xml:id='l2h-219' class="member">file</tt></b></dt> <dd> This is a file-like object. For file uploads it points to a <tt class="class">TemporaryFile</tt> instance. (For more information see the TemporaryFile @@ -101,32 +100,32 @@ For simple values, it is a <tt class="class">StringIO</tt> object, so you can re </dl> <P> -<dl><dt><b><a name="l2h-198"><tt class="member">filename</tt></a></b> +<dl><dt><b><tt id='l2h-220' xml:id='l2h-220' class="member">filename</tt></b></dt> <dd> The name of the file as provided by the client. </dl> <P> -<dl><dt><b><a name="l2h-199"><tt class="member">type</tt></a></b> +<dl><dt><b><tt id='l2h-221' xml:id='l2h-221' class="member">type</tt></b></dt> <dd> The content-type for this input as provided by the client. </dl> <P> -<dl><dt><b><a name="l2h-200"><tt class="member">type_options</tt></a></b> +<dl><dt><b><tt id='l2h-222' xml:id='l2h-222' class="member">type_options</tt></b></dt> <dd> This is what follows the actual content type in the <code>content-type</code> header provided by the client, if anything. This is a dictionary. </dl> <P> -<dl><dt><b><a name="l2h-201"><tt class="member">disposition</tt></a></b> +<dl><dt><b><tt id='l2h-223' xml:id='l2h-223' class="member">disposition</tt></b></dt> <dd> The value of the first part of the <code>content-disposition</code> header. </dl> <P> -<dl><dt><b><a name="l2h-202"><tt class="member">disposition_options</tt></a></b> +<dl><dt><b><tt id='l2h-224' xml:id='l2h-224' class="member">disposition_options</tt></b></dt> <dd> The second part (if any) of the <code>content-disposition</code> header in the form of a dictionary. @@ -134,9 +133,9 @@ For simple values, it is a <tt class="class">StringIO</tt> object, so you can re <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seerfc"> + <dl compact="compact" class="seerfc"> <dt><a href="http://www.faqs.org/rfcs/rfc1867.html" title="Form-based File Upload in HTML" >RFC 1867, <em>Form-based File Upload in HTML</em></a> @@ -149,41 +148,40 @@ For simple values, it is a <tt class="class">StringIO</tt> object, so you can re <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6.2 FieldStorage Examples" - rel="prev" title="4.6.2 FieldStorage Examples" - href="pyapi-util-fstor-examples.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.6 util - Miscellaneous" - rel="parent" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6.4 Other functions" - rel="next" title="4.6.4 Other functions" - href="pyapi-util-funcs.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6.2 FieldStorage Examples" + href="pyapi-util-fstor-examples.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6.4 Other functions" + href="pyapi-util-funcs.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util-fstor-examples.html">4.6.2 FieldStorage Examples</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util-funcs.html">4.6.4 Other functions</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-util-fstor.html b/doc-html/pyapi-util-fstor.html index 18e9589d38b83fd2725bccd8a771e14f42d2d200..ec06932d810097c43282c8c7528e85826557b113 100644 --- a/doc-html/pyapi-util-fstor.html +++ b/doc-html/pyapi-util-fstor.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-util-fstor-examples.html"> -<LINK REL="prev" href="pyapi-util.html"> -<LINK REL="parent" href="pyapi-util.html"> -<LINK REL="next" href="pyapi-util-fstor-examples.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="FieldStorage class"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-util-fstor-examples.html" /> +<link rel="prev" href="pyapi-util.html" /> +<link rel="parent" href="pyapi-util.html" /> +<link rel="next" href="pyapi-util-fstor-examples.html" /> +<meta name='aesop' content='information' /> <title>4.6.1 FieldStorage class</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6.2 FieldStorage Examples" - href="pyapi-util-fstor-examples.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6.2 FieldStorage Examples" + href="pyapi-util-fstor-examples.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util-fstor-examples.html">4.6.2 FieldStorage Examples</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006610000000000000000"> </A> +<H2><A NAME="SECTION006610000000000000000"></A><A NAME="pyapi-util-fstor"></A> <BR> 4.6.1 FieldStorage class </H2> @@ -63,8 +62,8 @@ class. This class is similar to the standard library module <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><span class="typelabel">class</span> <a name="l2h-190"><tt class="class">FieldStorage</tt></a></b>(</nobr></td> - <td><var>req</var><big>[</big><var>, keep_blank_values, strict_parsing, file_callback, field_callback</var><big>]</big>)</td></tr></table> + <td><nobr><b><span class="typelabel">class</span> <tt id='l2h-206' xml:id='l2h-206' class="class">FieldStorage</tt></b>(</nobr></td> + <td><var>req</var><big>[</big><var>, keep_blank_values, strict_parsing, file_callback, field_callback</var><big>]</big><var></var>)</td></tr></table></dt> <dd> This class provides uniform access to HTML form data submitted by the client. <var>req</var> is an instance of the mod_python request object. @@ -82,11 +81,11 @@ The optional argument <var>strict_parsing</var> is not yet implemented. The optional argument <var>file_callback</var> allows the application to override both file creation/deletion semantics and location. See <A href="pyapi-util-fstor-examples.html#pyapi-util-fstor-examples">4.6.2</A> ``FieldStorage Examples'' for additional - information. <i>New in version 3.2</i> + information. <em>New in version 3.2</em> <P> The optional argument <var>field_callback</var> allows the application to override - both the creation/deletion semantics and behaviour. <i>New in version 3.2</i> + both the creation/deletion semantics and behaviour. <em>New in version 3.2</em> <P> During initialization, <tt class="class">FieldStorage</tt> class reads all of the @@ -94,18 +93,29 @@ During initialization, <tt class="class">FieldStorage</tt> class reads all of th consumed at this point, there should be no more than one <tt class="class">FieldStorage</tt> class instantiated per single request, nor should you make any attempts to read client data before or after - instantiating a <tt class="class">FieldStorage</tt>. + instantiating a <tt class="class">FieldStorage</tt>. A suggested strategy for dealing + with this is that any handler should first check for the existance of + a <code>form</code> attribute within the request object. If this exists, it + should be taken to be an existing instance of the <tt class="class">FieldStorage</tt> + class and that should be used. If the attribute does not exist + and needs to be created, it should be cached as the <code>form</code> + attribute of the request object so later handler code can use it. <P> -The data read from the client is then parsed into separate fields and - packaged in <tt class="class">Field</tt> objects, one per field. For HTML form inputs - of type <code>file</code>, a temporary file is created that can later be - accessed via the <tt class="member">file</tt> attribute of a <tt class="class">Field</tt> object. +When the <tt class="class">FieldStorage</tt> class instance is created, the data read + from the client is then parsed into separate fields and packaged in + <tt class="class">Field</tt> objects, one per field. For HTML form inputs of type + <code>file</code>, a temporary file is created that can later be accessed via + the <tt class="member">file</tt> attribute of a <tt class="class">Field</tt> object. <P> The <tt class="class">FieldStorage</tt> class has a mapping object interface, i.e. it - can be treated like a dictionary. When used as a mapping, the keys are - form input names, and the returned dictionary value can be: + can be treated like a dictionary in most instances, but is not strictly + compatible as is it missing some methods provided by dictionaries and + some methods don't behave entirely like their counterparts, especially + when there is more than one value associated with a form field. When used + as a mapping, the keys are form input names, and the returned dictionary + value can be: <P> @@ -129,7 +139,7 @@ The <tt class="class">FieldStorage</tt> class has a mapping object interface, i. <div class="note"><b class="label">Note:</b> Unlike the standard library <tt class="module">cgi</tt> module <tt class="class">FieldStorage</tt> class, a <tt class="class">Field</tt> object is returned - <i>only</i> when it is a file upload. In all other cases the + <em>only</em> when it is a file upload. In all other cases the return is an instance of <tt class="class">StringField</tt>. This means that you do not need to use the <tt class="member">.value</tt> attribute to access values of fields in most cases. @@ -140,7 +150,7 @@ In addition to standard mapping object methods, <tt class="class">FieldStorage</ have the following attributes: <P> -<dl><dt><b><a name="l2h-191"><tt class="member">list</tt></a></b> +<dl><dt><b><tt id='l2h-207' xml:id='l2h-207' class="member">list</tt></b></dt> <dd> This is a list of <tt class="class">Field</tt> objects, one for each input. Multiple inputs with the same name will have multiple elements in this list. @@ -151,8 +161,50 @@ In addition to standard mapping object methods, <tt class="class">FieldStorage</ <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-192"><tt class="method">getfirst</tt></a></b>(</nobr></td> - <td><var>name</var><big>[</big><var>, default</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-208' xml:id='l2h-208' class="method">add_field</tt></b>(</nobr></td> + <td><var>name, value</var>)</td></tr></table></dt> +<dd> + Adds an additional form field with <var>name</var> and <var>value</var>. + If a form field already exists with <var>name</var>, the <var>value</var> + will be added to the list of existing values for the form field. + This method should be used for adding additional fields in + preference to adding new fields direct to the list of fields. + +<P> +If the value associated with a field should be replaced when it + already exists, rather than an additional value being associated + with the field, the dictionary like subscript operator should + be used to set the value, or the existing field deleted altogether + first using the <code>del</code> operator. + </dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-209' xml:id='l2h-209' class="method">clear</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> +<dd> + Removes all form fields. Individual form fields can be deleted + using the <code>del</code> operator. + </dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-210' xml:id='l2h-210' class="method">get</tt></b>(</nobr></td> + <td><var>name, default</var>)</td></tr></table></dt> +<dd> + If there is only one value associated with form field <var>name</var>, that + single value will be returned. If there are multiple values, a list is + returned holding all values. If no such form field or value exists then + the method returns the value specified by the parameter <var>default</var>. + A subscript operator is also available which yields the same result + except that an exception will be raised where the form field <var>name</var> + does not exist. + </dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-211' xml:id='l2h-211' class="method">getfirst</tt></b>(</nobr></td> + <td><var>name</var><big>[</big><var>, default</var><big>]</big><var></var>)</td></tr></table></dt> <dd> Always returns only one value associated with form field <var>name</var>. If no such form field or value exists then the method @@ -163,8 +215,8 @@ In addition to standard mapping object methods, <tt class="class">FieldStorage</ <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-193"><tt class="method">getlist</tt></a></b>(</nobr></td> - <td><var>name</var>)</td></tr></table> + <td><nobr><b><tt id='l2h-212' xml:id='l2h-212' class="method">getlist</tt></b>(</nobr></td> + <td><var>name</var>)</td></tr></table></dt> <dd> This method always returns a list of values associated with form field <var>name</var>. The method returns an empty list if no such form @@ -172,47 +224,74 @@ In addition to standard mapping object methods, <tt class="class">FieldStorage</ of one item if only one such value exists. </dl> +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-213' xml:id='l2h-213' class="method">has_key</tt></b>(</nobr></td> + <td><var>name</var>)</td></tr></table></dt> +<dd> + Returns <code>True</code> if <var>name</var> is a valid form field. The <code>in</code> + operator is also supported and will call this method. + </dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-214' xml:id='l2h-214' class="method">items</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> +<dd> + Returns a list consisting of tuples for each combination of form + field name and value. + </dl> + +<P> +<dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> + <td><nobr><b><tt id='l2h-215' xml:id='l2h-215' class="method">keys</tt></b>(</nobr></td> + <td><var></var>)</td></tr></table></dt> +<dd> + This method returns the names of the form fields. The <code>len</code> + operator is also supported and will return the number of names + which would be returned by this method. + </dl> + <P> </dl> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6 util - Miscellaneous" - rel="prev" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.6 util - Miscellaneous" - rel="parent" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6.2 FieldStorage Examples" - rel="next" title="4.6.2 FieldStorage Examples" - href="pyapi-util-fstor-examples.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6.2 FieldStorage Examples" + href="pyapi-util-fstor-examples.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util-fstor-examples.html">4.6.2 FieldStorage Examples</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-util-funcs.html b/doc-html/pyapi-util-funcs.html index 3eb8ab1ed629f9f8c0963ef474d6e2e9a1ccc10b..119985ee86cff03b6f3ad3a83cabf505c649c891 100644 --- a/doc-html/pyapi-util-funcs.html +++ b/doc-html/pyapi-util-funcs.html @@ -1,64 +1,63 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="pyapi-util-fstor-fld.html"> -<LINK REL="parent" href="pyapi-util.html"> -<LINK REL="next" href="pyapi-cookie.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Other functions"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="pyapi-util-fstor-fld.html" /> +<link rel="parent" href="pyapi-util.html" /> +<link rel="next" href="pyapi-cookie.html" /> +<meta name='aesop' content='information' /> <title>4.6.4 Other functions</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6.3 Field class" - href="pyapi-util-fstor-fld.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6.3 Field class" + href="pyapi-util-fstor-fld.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util-fstor-fld.html">4.6.3 Field class</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H2><A NAME="SECTION006640000000000000000"> </A> +<H2><A NAME="SECTION006640000000000000000"></A><A NAME="pyapi-util-funcs"></A> <BR> 4.6.4 Other functions </H2> <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-203"><tt class="function">parse_qs</tt></a></b>(</nobr></td> - <td><var>qs</var><big>[</big><var>, keep_blank_values, strict_parsing</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-225' xml:id='l2h-225' class="function">parse_qs</tt></b>(</nobr></td> + <td><var>qs</var><big>[</big><var>, keep_blank_values, strict_parsing</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -89,8 +88,8 @@ The <var>strict_parsing</var> argument is not yet implemented. <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-204"><tt class="function">parse_qsl</tt></a></b>(</nobr></td> - <td><var>qs</var><big>[</big><var>, keep_blank_values, strict_parsing</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-226' xml:id='l2h-226' class="function">parse_qsl</tt></b>(</nobr></td> + <td><var>qs</var><big>[</big><var>, keep_blank_values, strict_parsing</var><big>]</big><var></var>)</td></tr></table></dt> <dd> <P> @@ -120,8 +119,8 @@ The <var>strict_parsing</var> argument is not yet implemented. <P> <dl><dt><table cellpadding="0" cellspacing="0"><tr valign="baseline"> - <td><nobr><b><a name="l2h-205"><tt class="function">redirect</tt></a></b>(</nobr></td> - <td><var>req, location</var><big>[</big><var>, permanent=0, text=None</var><big>]</big>)</td></tr></table> + <td><nobr><b><tt id='l2h-227' xml:id='l2h-227' class="function">redirect</tt></b>(</nobr></td> + <td><var>req, location</var><big>[</big><var>, permanent=0, text=None</var><big>]</big><var></var>)</td></tr></table></dt> <dd> This is a convenience function to redirect the browser to another location. When <var>permanent</var> is true, <tt class="constant">MOVED_PERMANENTLY</tt> @@ -136,50 +135,50 @@ If this function is called after the headers have already been sent, an <tt class="exception">IOError</tt> is raised. <P> -This function raises <tt class="exception">apache.SERVER_RETURN</tt> exception to - abandon any further processing of the handle. If you do not want - this, you can wrap the call to <tt class="function">redirect</tt> in a try/except - block catching the <tt class="exception">apache.SERVER_RETURN</tt>. +This function raises <tt class="exception">apache.SERVER_RETURN</tt> exception with + a value of <tt class="constant">apache.DONE</tt> to ensuring that any later phases or + stacked handlers do not run. If you do not want this, you can wrap the + call to <tt class="function">redirect</tt> in a try/except block catching the + <tt class="exception">apache.SERVER_RETURN</tt>. </dl> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.6.3 Field class" - rel="prev" title="4.6.3 Field class" - href="pyapi-util-fstor-fld.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4.6 util - Miscellaneous" - rel="parent" title="4.6 util - Miscellaneous" - href="pyapi-util.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.7 Cookie - HTTP" - rel="next" title="4.7 Cookie - HTTP" - href="pyapi-cookie.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.6.3 Field class" + href="pyapi-util-fstor-fld.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4.6 util - Miscellaneous" + href="pyapi-util.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.7 Cookie - HTTP" + href="pyapi-cookie.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="pyapi-util-fstor-fld.html">4.6.3 Field class</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pyapi-util.html">4.6 util - Miscellaneous</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-cookie.html">4.7 Cookie - HTTP</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyapi-util.html b/doc-html/pyapi-util.html index 6489f4902712dd64f1b060fb1cb7ceed23ac4e58..02c6712d7597f52f222c7a2fb121ec059a0fbe61 100644 --- a/doc-html/pyapi-util.html +++ b/doc-html/pyapi-util.html @@ -1,61 +1,60 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pyapi-cookie.html"> -<LINK REL="prev" href="module-apache.html"> -<LINK REL="parent" href="pythonapi.html"> -<LINK REL="next" href="pyapi-util-fstor.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="util - Miscellaneous Utilities"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pyapi-cookie.html" /> +<link rel="prev" href="module-apache.html" /> +<link rel="parent" href="pythonapi.html" /> +<link rel="next" href="pyapi-util-fstor.html" /> +<meta name='aesop' content='information' /> <title>4.6 util - Miscellaneous Utilities</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.6.2 Server Members" - href="pyapi-mpsrv-mem.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6.1 FieldStorage class" - href="pyapi-util-fstor.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.7.2 Server Members" + href="pyapi-mpsrv-mem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6.1 FieldStorage class" + href="pyapi-util-fstor.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpsrv-mem.html">4.5.6.2 Server Members</A> +<a class="sectref" rel="prev" href="pyapi-mpsrv-mem.html">4.5.7.2 Server Members</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util-fstor.html">4.6.1 FieldStorage class</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006600000000000000000"> </A> +<H1><A NAME="SECTION006600000000000000000"></A><A NAME="pyapi-util"></A> <BR> 4.6 <tt class="module">util</tt> - Miscellaneous Utilities </H1> - +<A NAME="module-util"></A> <P> The <tt class="module">util</tt> module provides a number of utilities handy to a web @@ -73,18 +72,19 @@ from mod_python import util <P> <div class="seealso"> - <p class="heading"><b>See Also:</b></p> + <p class="heading">See Also:</p> - <dl compact class="seetitle"> + <dl compact="compact" class="seetitle"> <dt><em class="citetitle"><a href="http://CGI-Spec.Golux.Com/" - >Common Gateway Interface RFC Project Page</a></em> - <dd>for detailed information on the CGI specification + >Common Gateway Interface RFC Project Page</a></em></dt> + <dd>for detailed information on the CGI specification</dd> </dl> </div> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -95,43 +95,43 @@ from mod_python import util <LI><A href="pyapi-util-funcs.html">4.6.4 Other functions</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="4.5.6.2 Server Members" - rel="prev" title="4.5.6.2 Server Members" - href="pyapi-mpsrv-mem.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="4. Python API" - rel="parent" title="4. Python API" - href="pythonapi.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.6.1 FieldStorage class" - rel="next" title="4.6.1 FieldStorage class" - href="pyapi-util-fstor.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="4.5.7.2 Server Members" + href="pyapi-mpsrv-mem.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="4. Python API" + href="pythonapi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.6.1 FieldStorage class" + href="pyapi-util-fstor.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> -<a class="sectref" rel="prev" href="pyapi-mpsrv-mem.html">4.5.6.2 Server Members</A> +<a class="sectref" rel="prev" href="pyapi-mpsrv-mem.html">4.5.7.2 Server Members</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="pythonapi.html">4. Python API</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-util-fstor.html">4.6.1 FieldStorage class</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/pyfav.gif b/doc-html/pyfav.gif deleted file mode 100644 index 58271edec49353382f935ada2de138a1f5b35d9a..0000000000000000000000000000000000000000 Binary files a/doc-html/pyfav.gif and /dev/null differ diff --git a/doc-html/pyfav.png b/doc-html/pyfav.png new file mode 100644 index 0000000000000000000000000000000000000000..d2d8669d512e9cb5d66fe86fe2a53c78049dd339 Binary files /dev/null and b/doc-html/pyfav.png differ diff --git a/doc-html/pythonapi.html b/doc-html/pythonapi.html index 83c4593fc81712c367fa0f1f008d2157ef6123c0..15f4d5b9eb41b966e006fbe29783b41701ad42f9 100644 --- a/doc-html/pythonapi.html +++ b/doc-html/pythonapi.html @@ -1,64 +1,64 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="directives.html"> -<LINK REL="prev" href="tutorial.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="pyapi-interps.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT=". Python API"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="directives.html" /> +<link rel="prev" href="tutorial.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="pyapi-interps.html" /> +<meta name='aesop' content='information' /> <title>4. Python API</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.5 Your Own 404" - href="tut-404-handler.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.1 Multiple Interpreters" - href="pyapi-interps.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.5 Your Own 404" + href="tut-404-handler.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.1 Multiple Interpreters" + href="pyapi-interps.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-404-handler.html">3.5 Your Own 404</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-interps.html">4.1 Multiple Interpreters</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION006000000000000000000"> </A> +<H1><A NAME="SECTION006000000000000000000"></A><A NAME="pythonapi"></A> <BR> 4. Python API </H1> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -70,26 +70,27 @@ <LI><A href="module-apache.html">4.5 <tt class="module">apache</tt> - Access to Apache Internals.</a> <UL> <LI><A href="pyapi-apmeth.html">4.5.1 Functions</a> -<LI><A href="pyapi-mptable.html">4.5.2 Table Object (mp_table)<a name="l2h-40"> </a></a> -<LI><A href="pyapi-mprequest.html">4.5.3 Request Object<a name="l2h-44"> </a></a> +<LI><A href="pyapi-apmem.html">4.5.2 Attributes</a> +<LI><A href="pyapi-mptable.html">4.5.3 Table Object (mp_table)<a id='l2h-43' xml:id='l2h-43'></a></a> +<LI><A href="pyapi-mprequest.html">4.5.4 Request Object<a id='l2h-47' xml:id='l2h-47'></a></a> <UL> -<LI><A href="pyapi-mprequest-meth.html">4.5.3.1 Request Methods</a> -<LI><A href="pyapi-mprequest-mem.html">4.5.3.2 Request Members</a> +<LI><A href="pyapi-mprequest-meth.html">4.5.4.1 Request Methods</a> +<LI><A href="pyapi-mprequest-mem.html">4.5.4.2 Request Members</a> </ul> -<LI><A href="pyapi-mpconn.html">4.5.4 Connection Object (mp_conn)<a name="l2h-130"> </a></a> +<LI><A href="pyapi-mpconn.html">4.5.5 Connection Object (mp_conn)<a id='l2h-144' xml:id='l2h-144'></a></a> <UL> -<LI><A href="pyapi-mpconn-meth.html">4.5.4.1 Connection Methods</a> -<LI><A href="pyapi-mpconn-mem.html">4.5.4.2 Connection Members</a> +<LI><A href="pyapi-mpconn-meth.html">4.5.5.1 Connection Methods</a> +<LI><A href="pyapi-mpconn-mem.html">4.5.5.2 Connection Members</a> </ul> -<LI><A href="pyapi-mpfilt.html">4.5.5 Filter Object (mp_filter)<a name="l2h-151"> </a></a> +<LI><A href="pyapi-mpfilt.html">4.5.6 Filter Object (mp_filter)<a id='l2h-166' xml:id='l2h-166'></a></a> <UL> -<LI><A href="pyapi-mpfilt-meth.html">4.5.5.1 Filter Methods</a> -<LI><A href="pyapi-mpfilt-mem.html">4.5.5.2 Filter Members</a> +<LI><A href="pyapi-mpfilt-meth.html">4.5.6.1 Filter Methods</a> +<LI><A href="pyapi-mpfilt-mem.html">4.5.6.2 Filter Members</a> </ul> -<LI><A href="pyapi-mpserver.html">4.5.6 Server Object (mp_server)<a name="l2h-164"> </a></a> +<LI><A href="pyapi-mpserver.html">4.5.7 Server Object (mp_server)<a id='l2h-179' xml:id='l2h-179'></a></a> <UL> -<LI><A href="pyapi-mpsrv-meth.html">4.5.6.1 Server Methods</a> -<LI><A href="pyapi-mpsrv-mem.html">4.5.6.2 Server Members</a> +<LI><A href="pyapi-mpsrv-meth.html">4.5.7.1 Server Methods</a> +<LI><A href="pyapi-mpsrv-mem.html">4.5.7.2 Server Members</a> </ul> </ul> <LI><A href="pyapi-util.html">4.6 <tt class="module">util</tt> - Miscellaneous Utilities</a> @@ -113,43 +114,43 @@ <LI><A href="pyapi-psp.html">4.9 <tt class="module">psp</tt> - Python Server Pages</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.5 Your Own 404" - rel="prev" title="3.5 Your Own 404" - href="tut-404-handler.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4.1 Multiple Interpreters" - rel="next" title="4.1 Multiple Interpreters" - href="pyapi-interps.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.5 Your Own 404" + href="tut-404-handler.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4.1 Multiple Interpreters" + href="pyapi-interps.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-404-handler.html">3.5 Your Own 404</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pyapi-interps.html">4.1 Multiple Interpreters</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/security.html b/doc-html/security.html new file mode 100644 index 0000000000000000000000000000000000000000..06122e0dd6b9a847d09169d48cb038554b464570 --- /dev/null +++ b/doc-html/security.html @@ -0,0 +1,111 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="app-changes-from-3.2.10.html" /> +<link rel="prev" href="handlers.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="app-changes-from-3.2.10.html" /> +<meta name='aesop' content='information' /> +<title>8. Security</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="7.3 CGI Handler" + href="hand-cgi.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="A. Changes from Version" + href="app-changes-from-3.2.10.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="hand-cgi.html">7.3 CGI Handler</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="app-changes-from-3.2.10.html">A. Changes from Version</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION0010000000000000000000"></A><A NAME="security"></A> +<BR> +8. Security +</H1> + +<P> +Considerations on using mod_python in a secure manner can be found +in the <em class="citetitle"><a + href="http://wiki.apache.org/mod_python" + title="mod_python wiki" + >mod_python wiki</a></em> +at <em class="citetitle"><a + href="http://wiki.apache.org/mod_python/CategorySecurity" + title="CategorySecurity" + >CategorySecurity</a></em>. + + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="7.3 CGI Handler" + href="hand-cgi.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="A. Changes from Version" + href="app-changes-from-3.2.10.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="hand-cgi.html">7.3 CGI Handler</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="app-changes-from-3.2.10.html">A. Changes from Version</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/ssi-conditionals.html b/doc-html/ssi-conditionals.html new file mode 100644 index 0000000000000000000000000000000000000000..f3fd6ab3bc11c6fc5749cb05475e44b01626ce00 --- /dev/null +++ b/doc-html/ssi-conditionals.html @@ -0,0 +1,160 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="ssi-output-filter.html" /> +<link rel="prev" href="ssi-globals.html" /> +<link rel="parent" href="ssi.html" /> +<link rel="next" href="ssi-output-filter.html" /> +<meta name='aesop' content='information' /> +<title>6.5 Conditional Expressions</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.4 Pre-propulating Globals" + href="ssi-globals.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.6 Enabling INCLUDES Filter" + href="ssi-output-filter.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-globals.html">6.4 Pre-propulating Globals</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-output-filter.html">6.6 Enabling INCLUDES Filter</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION008500000000000000000"></A><A NAME="ssi-conditionals"></A> +<BR> +6.5 Conditional Expressions +</H1> + +<P> +SSI allows for some programmability in its own right through the use of +conditional expressions. The structure of this conditional construct is: + +<P> +<div class="verbatim"><pre> +<!--#if expr="test_condition" --> +<!--#elif expr="test_condition" --> +<!--#else --> +<!--#endif --> +</pre></div> + +<P> +A test condition can be any sort of logical comparison, either comparing +values to one another, or testing the 'truth' of a particular value. + +<P> +The source of variables used in conditional expressions is distinct from +the set of global data used by the Python code executed within a page. +Instead, the variables are sourced from the <code>subprocess_env</code> table +object contained within the request object. The values of these variables +can be set from within a page using the SSI 'set' directive, or by a range +of other Apache directives within the Apache configuration files such as +<code>BrowserMatchNoCase</code> and <code>SetEnvIf</code>. + +<P> +To set these variables from within a mod_python handler, the +<code>subprocess_env</code> table object would be manipulated directly through +the request object. + +<P> +<div class="verbatim"><pre> +from mod_python import apache + +def fixuphandler(req): + debug = req.get_config().get('PythonDebug', '0') + req.subprocess_env['DEBUG'] = debug + return apache.OK +</pre></div> + +<P> +If being done from within Python code contained within the page itself, the +request object would first have to be accessed via the filter object. + +<P> +<div class="verbatim"><pre> +<!--#python exec=" +debug = filter.req.get_config().get('PythonDebug', '0') +filter.req.subprocess_env['DEBUG'] = debug +" --> +<html> +<body> +<!--#if expr="${DEBUG} != 0" --> +DEBUG ENABLED +<!--#else --> +DEBUG DISABLED +<!--#endif --> +</body> +</html> +</pre></div> + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.4 Pre-propulating Globals" + href="ssi-globals.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.6 Enabling INCLUDES Filter" + href="ssi-output-filter.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-globals.html">6.4 Pre-propulating Globals</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-output-filter.html">6.6 Enabling INCLUDES Filter</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/ssi-data-scope.html b/doc-html/ssi-data-scope.html new file mode 100644 index 0000000000000000000000000000000000000000..7d9c72f39a5ccba46830a660c406b0d121d27b1f --- /dev/null +++ b/doc-html/ssi-data-scope.html @@ -0,0 +1,138 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="ssi-globals.html" /> +<link rel="prev" href="ssi-python-code.html" /> +<link rel="parent" href="ssi.html" /> +<link rel="next" href="ssi-globals.html" /> +<meta name='aesop' content='information' /> +<title>6.3 Scope of Global Data</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.2 Using Python Code" + href="ssi-python-code.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.4 Pre-propulating Globals" + href="ssi-globals.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-python-code.html">6.2 Using Python Code</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-globals.html">6.4 Pre-propulating Globals</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION008300000000000000000"></A><A NAME="ssi-data-scope"></A> +<BR> +6.3 Scope of Global Data +</H1> + +<P> +Multiple instances of 'eval' or 'exec' code blocks may be used within the +one page. Any changes to or creation of global data which is performed +within one code block will be reflected in any following code blocks. +Global data constitutes variables as well as module imports, function and +class definitions. + +<P> +<div class="verbatim"><pre> +<!--#python exec=" +import cgi, time, os +def _escape(object): + return cgi.escape(str(object)) +now = time.time() +" --> +<html> +<body> +<pre> +<!--#python eval="_escape(time.asctime(time.localtime(now)))"--> + +<!--#python exec=" +keys = os.environ.keys() +keys.sort() +for key in keys: + print >> filter, _escape(key), + print >> filter, '=', + print >> filter, _escape(repr(os.environ.get(key))) +" --> +</pre> +</body> +</html> +</pre></div> + +<P> +The lifetime of any global data is for the current request only. If data +must persist between requests, it must reside in external modules and as +necessary be protected against multithreaded access in the event that a +multithreaded Apache MPM is used. + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.2 Using Python Code" + href="ssi-python-code.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.4 Pre-propulating Globals" + href="ssi-globals.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-python-code.html">6.2 Using Python Code</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-globals.html">6.4 Pre-propulating Globals</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/ssi-globals.html b/doc-html/ssi-globals.html new file mode 100644 index 0000000000000000000000000000000000000000..391db59e1136dd4aa96774db18354048a3872b71 --- /dev/null +++ b/doc-html/ssi-globals.html @@ -0,0 +1,169 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="ssi-conditionals.html" /> +<link rel="prev" href="ssi-data-scope.html" /> +<link rel="parent" href="ssi.html" /> +<link rel="next" href="ssi-conditionals.html" /> +<meta name='aesop' content='information' /> +<title>6.4 Pre-propulating Globals</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.3 Scope of Global" + href="ssi-data-scope.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.5 Conditional Expressions" + href="ssi-conditionals.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-data-scope.html">6.3 Scope of Global</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-conditionals.html">6.5 Conditional Expressions</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION008400000000000000000"></A><A NAME="ssi-globals"></A> +<BR> +6.4 Pre-propulating Globals +</H1> + +<P> +Any Python code which appears within the page has to be compiled each time +the page is accessed before it is executed. In other words, the compiled +code is not cached between requests. To limit such recompilation and to +avoid duplication of common code amongst many pages, it is preferable to +pre-populate the global data from within a mod_python handler prior to the +page being processed. + +<P> +In most cases, a fixup handler would be used for this purpose. For this to +work, first need to configure Apache so that it knows to call the fixup +handler. + +<P> +<div class="verbatim"><pre> +PythonFixupHandler _handlers +</pre></div> + +<P> +The implementation of the fixup handler contained in <code>_handlers.py</code> +then needs to create an instance of a Python dictionary, store that in the +mod_python request object as <code>ssi_globals</code> and then populate that +dictionary with any data to be available to the Python code executing +within the page. + +<P> +<div class="verbatim"><pre> +from mod_python import apache + +import cgi, time + +def _escape(object): + return cgi.escape(str(object)) + +def _header(filter): + print >> filter, '...' + +def _footer(filter): + print >> filter, '...' + +def fixuphandler(req): + req.ssi_globals = {} + req.ssi_globals['time'] = time + req.ssi_globals['_escape'] = _escape + req.ssi_globals['_header'] = _header + req.ssi_globals['_footer'] = _footer + return apache.OK +</pre></div> + +<P> +This is most useful where it is necessary to insert common information such +as headers, footers or menu panes which are dynamically generated into many +pages. + +<P> +<div class="verbatim"><pre> +<!--#python exec=" +now = time.time() +" --> +<html> +<body> +<!--#python exec="_header(filter)" --> +<pre> +<!--#python eval="_escape(time.asctime(time.localtime(now)))"--> +</pre> +<!--#python exec="_footer(filter)" --> +</body> +</html> +</pre></div> + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.3 Scope of Global" + href="ssi-data-scope.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.5 Conditional Expressions" + href="ssi-conditionals.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-data-scope.html">6.3 Scope of Global</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-conditionals.html">6.5 Conditional Expressions</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/ssi-output-filter.html b/doc-html/ssi-output-filter.html new file mode 100644 index 0000000000000000000000000000000000000000..d356ead2f446b6bccc649f578f7179b7155002d5 --- /dev/null +++ b/doc-html/ssi-output-filter.html @@ -0,0 +1,126 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="ssi-conditionals.html" /> +<link rel="parent" href="ssi.html" /> +<link rel="next" href="handlers.html" /> +<meta name='aesop' content='information' /> +<title>6.6 Enabling INCLUDES Filter</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.5 Conditional Expressions" + href="ssi-conditionals.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7. Standard Handlers" + href="handlers.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-conditionals.html">6.5 Conditional Expressions</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="handlers.html">7. Standard Handlers</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION008600000000000000000"></A><A NAME="ssi-output-filter"></A> +<BR> +6.6 Enabling INCLUDES Filter +</H1> + +<P> +SSI is traditionally enabled using the <code>AddOutputFilter</code> directive in +the Apache configuration files. Normally this would be where the request +mapped to a static file. + +<P> +<div class="verbatim"><pre> +AddOutputFilter INCLUDES .shtml +</pre></div> + +<P> +When mod_python is being used, the ability to dynamically enable output +filters for the current request can instead be used. This could be done +just for where the request maps to a static file, but may just as easily be +carried out where the content of a response is generated dynamically. In +either case, to enable SSI for the current request, the +<code>add_output_filter()</code> method of the mod_python request object would be +used. + +<P> +<div class="verbatim"><pre> +from mod_python import apache + +def fixuphandler(req): + req.add_output_filter('INCLUDES') + return apache.OK +</pre></div> + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.5 Conditional Expressions" + href="ssi-conditionals.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="7. Standard Handlers" + href="handlers.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-conditionals.html">6.5 Conditional Expressions</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="handlers.html">7. Standard Handlers</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/ssi-overview.html b/doc-html/ssi-overview.html new file mode 100644 index 0000000000000000000000000000000000000000..c2070752aa99902944680ebf06d623d276222939 --- /dev/null +++ b/doc-html/ssi-overview.html @@ -0,0 +1,136 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="ssi-python-code.html" /> +<link rel="prev" href="ssi.html" /> +<link rel="parent" href="ssi.html" /> +<link rel="next" href="ssi-python-code.html" /> +<meta name='aesop' content='information' /> +<title>6.1 Overview of SSI</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6. Server Side Includes" + href="ssi.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.2 Using Python Code" + href="ssi-python-code.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-python-code.html">6.2 Using Python Code</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION008100000000000000000"></A><A NAME="ssi-overview"></A> +<BR> +6.1 Overview of SSI +</H1> + +<P> +SSI (Server Side Includes) are directives that are placed in HTML pages, +and evaluated on the server while the pages are being served. They let you +add dynamically generated content to an existing HTML page, without having +to serve the entire page via a CGI program, or other dynamic technology +such as a mod_python handler. + +<P> +SSI directives have the following syntax: + +<P> +<div class="verbatim"><pre> +<!--#element attribute=value attribute=value ... --> +</pre></div> + +<P> +It is formatted like an HTML comment, so if you don't have SSI correctly +enabled, the browser will ignore it, but it will still be visible in the +HTML source. If you have SSI correctly configured, the directive will be +replaced with its results. + +<P> +For a more thorough description of the SSI mechanism and how to enable it, +see the <em class="citetitle"><a + href="http://httpd.apache.org/docs/2.0/howto/ssi.html" + title="SSI +tutorial" + >SSI +tutorial</a></em> provided with the Apache documentation. + +<P> +Version 3.3 of mod_python introduces support for using Python code within +SSI files. Note that mod_python honours the intent of the Apache +<code>IncludesNOEXEC</code> option to the <code>Options</code> directive. That is, if +<code>IncludesNOEXEC</code> is enabled, then Python code within a SSI file will +not be executed. + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6. Server Side Includes" + href="ssi.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.2 Using Python Code" + href="ssi-python-code.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-python-code.html">6.2 Using Python Code</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/ssi-python-code.html b/doc-html/ssi-python-code.html new file mode 100644 index 0000000000000000000000000000000000000000..5df4e577600ae28994e742d12d779311810bab9c --- /dev/null +++ b/doc-html/ssi-python-code.html @@ -0,0 +1,151 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="ssi-data-scope.html" /> +<link rel="prev" href="ssi-overview.html" /> +<link rel="parent" href="ssi.html" /> +<link rel="next" href="ssi-data-scope.html" /> +<meta name='aesop' content='information' /> +<title>6.2 Using Python Code</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.1 Overview of SSI" + href="ssi-overview.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.3 Scope of Global" + href="ssi-data-scope.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-overview.html">6.1 Overview of SSI</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-data-scope.html">6.3 Scope of Global</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION008200000000000000000"></A><A NAME="ssi-python-code"></A> +<BR> +6.2 Using Python Code +</H1> + +<P> +The extensions to mod_python to allow Python code to be used in conjunction +with SSI introduces the new SSI directive called 'python'. This directive +can be used in two forms, these being 'eval' and 'exec' modes. In the case +of 'eval', a Python expression is used and it is the result of that +expression which is substituted in place into the page. + +<P> +<div class="verbatim"><pre> +<!--#python eval="10*'HELLO '" --> +<!--#python eval="len('HELLO')" --> +</pre></div> + +<P> +Where the result of the expression is not a string, the value will be +automatically converted to a string by applying <code>str()</code> to the value. + +<P> +In the case of 'exec' a block of Python code may be included. For any +output from this code to appear in the page, it must be written back +explicitly as being part of the response. As SSI are processed by an Apache +output filter, this is done by using an instance of the mod_python +<code>filter</code> object which is pushed into the global data set available to +the code. + +<P> +<div class="verbatim"><pre> +<!--#python exec=" +filter.write(10*'HELLO ') +filter.write(str(len('HELLO'))) +" --> +</pre></div> + +<P> +Any Python code within the 'exec' block must have a zero first level +indent. You cannot start the code block with an arbitrary level of indent +such that it lines up with any indenting used for surrounding HTML +elements. + +<P> +Although the mod_python <code>filter</code> object is not a true file object, that +it provides the <code>write()</code> method is sufficient to allow the <code>print</code> +statement to be used on it directly. This will avoid the need to explicitly +convert non string objects to a string before being output. + +<P> +<div class="verbatim"><pre> +<!--#python exec=" +print >> filter, len('HELLO') +" --> +</pre></div> + +<P> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="6.1 Overview of SSI" + href="ssi-overview.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="6. Server Side Includes" + href="ssi.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.3 Scope of Global" + href="ssi-data-scope.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="ssi-overview.html">6.1 Overview of SSI</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="ssi.html">6. Server Side Includes</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-data-scope.html">6.3 Scope of Global</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/ssi.html b/doc-html/ssi.html new file mode 100644 index 0000000000000000000000000000000000000000..d6ac33ef2c80361d2384340c2106713fde470818 --- /dev/null +++ b/doc-html/ssi.html @@ -0,0 +1,115 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> +<head> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="handlers.html" /> +<link rel="prev" href="directives.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="ssi-overview.html" /> +<meta name='aesop' content='information' /> +<title>6. Server Side Includes</title> +</head> +<body> +<DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="5.4.11 PythonPath" + href="dir-other-pp.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.1 Overview of SSI" + href="ssi-overview.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="dir-other-pp.html">5.4.11 PythonPath</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-overview.html">6.1 Overview of SSI</A> +</div> +<hr /></div> +</DIV> +<!--End of Navigation Panel--> + +<H1><A NAME="SECTION008000000000000000000"></A><A NAME="ssi"></A> +<BR> +6. Server Side Includes +</H1> + +<P> + +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> +<!--Table of Child-Links--> +<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> + +<UL CLASS="ChildLinks"> +<LI><A href="ssi-overview.html">6.1 Overview of SSI</a> +<LI><A href="ssi-python-code.html">6.2 Using Python Code</a> +<LI><A href="ssi-data-scope.html">6.3 Scope of Global Data</a> +<LI><A href="ssi-globals.html">6.4 Pre-propulating Globals</a> +<LI><A href="ssi-conditionals.html">6.5 Conditional Expressions</a> +<LI><A href="ssi-output-filter.html">6.6 Enabling INCLUDES Filter</a> +</ul> +<!--End of Table of Child-Links--> +</div> + +<DIV CLASS="navigation"> +<div class='online-navigation'> +<p></p><hr /> +<table align="center" width="100%" cellpadding="0" cellspacing="2"> +<tr> +<td class='online-navigation'><a rel="prev" title="5.4.11 PythonPath" + href="dir-other-pp.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="6.1 Overview of SSI" + href="ssi-overview.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> +<td align="center" width="100%">Mod_python Manual</td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> +</tr></table> +<div class='online-navigation'> +<b class="navlabel">Previous:</b> +<a class="sectref" rel="prev" href="dir-other-pp.html">5.4.11 PythonPath</A> +<b class="navlabel">Up:</b> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> +<b class="navlabel">Next:</b> +<a class="sectref" rel="next" href="ssi-overview.html">6.1 Overview of SSI</A> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> +</DIV> +<!--End of Navigation Panel--> + +</BODY> +</HTML> diff --git a/doc-html/tut-404-handler.html b/doc-html/tut-404-handler.html index 8d0dcb21a36d2b9994823239f6d674865a37255f..1987d46de47668a9155a38b7e67269a189715a30 100644 --- a/doc-html/tut-404-handler.html +++ b/doc-html/tut-404-handler.html @@ -1,56 +1,55 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="prev" href="tut-more-complicated.html"> -<LINK REL="parent" href="tutorial.html"> -<LINK REL="next" href="pythonapi.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Your Own 404 Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="prev" href="tut-more-complicated.html" /> +<link rel="parent" href="tutorial.html" /> +<link rel="next" href="pythonapi.html" /> +<meta name='aesop' content='information' /> <title>3.5 Your Own 404 Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.4 Now something More" - href="tut-more-complicated.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4. Python API" - href="pythonapi.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.4 Now something More" + href="tut-more-complicated.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4. Python API" + href="pythonapi.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-more-complicated.html">3.4 Now something More</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pythonapi.html">4. Python API</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION005500000000000000000"> </A> +<H1><A NAME="SECTION005500000000000000000"></A><A NAME="tut-404-handler"></A> <BR> 3.5 Your Own 404 Handler </H1> @@ -87,44 +86,53 @@ render your page, and then <code>return(apache.OK)</code>: return(apache.OK) </pre></div> +<P> +Note that if wishing to returning an error page from a handler phase other +than the response handler, the value <code>apache.DONE</code> must be returned +instead of <code>apache.OK</code>. If this is not done, subsequent handler phases +will still be run. The value of <code>apache.DONE</code> indicates that processing +of the request should be stopped immediately. If using stacked response +handlers, then <code>apache.DONE</code> should also be returned in that situation +to prevent subsequent handlers registered for that phase being run if +appropriate. + <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.4 Now something More" - rel="prev" title="3.4 Now something More" - href="tut-more-complicated.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="4. Python API" - rel="next" title="4. Python API" - href="pythonapi.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.4 Now something More" + href="tut-more-complicated.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="4. Python API" + href="pythonapi.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-more-complicated.html">3.4 Now something More</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="pythonapi.html">4. Python API</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/tut-more-complicated.html b/doc-html/tut-more-complicated.html index 3a854b8de58856b034da002b6ab43101e5d3063a..992201f495ad6e7f3bca75e5d7875c5b5c264e2d 100644 --- a/doc-html/tut-more-complicated.html +++ b/doc-html/tut-more-complicated.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="tut-404-handler.html"> -<LINK REL="prev" href="tut-what-it-do.html"> -<LINK REL="parent" href="tutorial.html"> -<LINK REL="next" href="tut-404-handler.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Now something More Complicated - Authentication"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="tut-404-handler.html" /> +<link rel="prev" href="tut-what-it-do.html" /> +<link rel="parent" href="tutorial.html" /> +<link rel="next" href="tut-404-handler.html" /> +<meta name='aesop' content='information' /> <title>3.4 Now something More Complicated - Authentication</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.3 So what Exactly" - href="tut-what-it-do.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.5 Your Own 404" - href="tut-404-handler.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.3 So what Exactly" + href="tut-what-it-do.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.5 Your Own 404" + href="tut-404-handler.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-what-it-do.html">3.3 So what Exactly</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-404-handler.html">3.5 Your Own 404</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION005400000000000000000"> </A> +<H1><A NAME="SECTION005400000000000000000"></A><A NAME="tut-more-complicated"></A> <BR> 3.4 Now something More Complicated - Authentication </H1> @@ -65,7 +64,7 @@ Let's say we want to password-protect this directory. We want the login to be "<tt class="samp">spam</tt>", and the password to be "<tt class="samp">eggs</tt>". <P> -First, we need to tell Apache to call our <i>authentication</i> +First, we need to tell Apache to call our <em>authentication</em> handler when authentication is needed. We do this by adding the <code>PythonAuthenHandler</code>. So now our config looks like this: @@ -103,6 +102,12 @@ looks like this now: </Directory> </pre></div> +<P> +Note that depending on which version of Apache is being used, you may need +to set either the <code>AuthAuthoritative</code> or <code>AuthBasicAuthoritative</code> +directive to <code>Off</code> to tell Apache that you want allow the task of +performing basic authentication to fall through to your handler. + <P> Now we need to write an authentication handler function in <span class="file">myscript.py</span>. A basic authentication handler would look like @@ -195,41 +200,40 @@ Else, we tell Apache to return <tt class="constant">HTTP_UNAUTHORIZED</tt> to th <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.3 So what Exactly" - rel="prev" title="3.3 So what Exactly" - href="tut-what-it-do.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.5 Your Own 404" - rel="next" title="3.5 Your Own 404" - href="tut-404-handler.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.3 So what Exactly" + href="tut-what-it-do.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.5 Your Own 404" + href="tut-404-handler.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-what-it-do.html">3.3 So what Exactly</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-404-handler.html">3.5 Your Own 404</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/tut-overview.html b/doc-html/tut-overview.html index 8abff39750ec094d969fdbae1b155a3786034ca5..6d2914e9c0f31cc43d3143bba6b239b78dfe6cba 100644 --- a/doc-html/tut-overview.html +++ b/doc-html/tut-overview.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="tut-what-it-do.html"> -<LINK REL="prev" href="tut-pub.html"> -<LINK REL="parent" href="tutorial.html"> -<LINK REL="next" href="tut-what-it-do.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="Quick Overview of how Apache Handles Requests"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="tut-what-it-do.html" /> +<link rel="prev" href="tut-pub.html" /> +<link rel="parent" href="tutorial.html" /> +<link rel="next" href="tut-what-it-do.html" /> +<meta name='aesop' content='information' /> <title>3.2 Quick Overview of how Apache Handles Requests</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.1 A Quick Start" - href="tut-pub.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.3 So what Exactly" - href="tut-what-it-do.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.1 A Quick Start" + href="tut-pub.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.3 So what Exactly" + href="tut-what-it-do.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-pub.html">3.1 A Quick Start</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-what-it-do.html">3.3 So what Exactly</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION005200000000000000000"> </A> +<H1><A NAME="SECTION005200000000000000000"></A><A NAME="tut-overview"></A> <BR> 3.2 Quick Overview of how Apache Handles Requests </H1> @@ -103,41 +102,40 @@ handlers, refer to Section <A href="directives.html#directives">5</A>, <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.1 A Quick Start" - rel="prev" title="3.1 A Quick Start" - href="tut-pub.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.3 So what Exactly" - rel="next" title="3.3 So what Exactly" - href="tut-what-it-do.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.1 A Quick Start" + href="tut-pub.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.3 So what Exactly" + href="tut-what-it-do.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-pub.html">3.1 A Quick Start</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-what-it-do.html">3.3 So what Exactly</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/tut-pub.html b/doc-html/tut-pub.html index 08210224c2e6c35c54753cb0113ad6c32ccbb214..c80e2505b921ab4741f7a10b26eb413aeb6931d1 100644 --- a/doc-html/tut-pub.html +++ b/doc-html/tut-pub.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="tut-overview.html"> -<LINK REL="prev" href="tutorial.html"> -<LINK REL="parent" href="tutorial.html"> -<LINK REL="next" href="tut-overview.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="A Quick Start with the Publisher Handler"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="tut-overview.html" /> +<link rel="prev" href="tutorial.html" /> +<link rel="parent" href="tutorial.html" /> +<link rel="next" href="tut-overview.html" /> +<meta name='aesop' content='information' /> <title>3.1 A Quick Start with the Publisher Handler</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3. Tutorial" - href="tutorial.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.2 Quick Overview of" - href="tut-overview.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3. Tutorial" + href="tutorial.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.2 Quick Overview of" + href="tut-overview.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-overview.html">3.2 Quick Overview of</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION005100000000000000000"> </A> +<H1><A NAME="SECTION005100000000000000000"></A><A NAME="tut-pub"></A> <BR> 3.1 A Quick Start with the Publisher Handler </H1> @@ -181,7 +180,7 @@ and from the client via <tt class="method">req.write()</tt> and <tt class="metho etc. <P> -Read Section <A href="hand-pub.html#hand-pub">6.1</A> <em class="citetitle"><a +Read Section <A href="hand-pub.html#hand-pub">7.1</A> <em class="citetitle"><a href="hand-pub.html" title="Publisher Handler" >Publisher Handler</a></em> @@ -190,41 +189,40 @@ for more information on the publisher handler. <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3. Tutorial" - rel="prev" title="3. Tutorial" - href="tutorial.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.2 Quick Overview of" - rel="next" title="3.2 Quick Overview of" - href="tut-overview.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3. Tutorial" + href="tutorial.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.2 Quick Overview of" + href="tut-overview.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-overview.html">3.2 Quick Overview of</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/tut-what-it-do.html b/doc-html/tut-what-it-do.html index 834fcee39b50f21511be0284b08b7389c41bd262..93a077a3e150370a24a82e1943cb83a1e96425d9 100644 --- a/doc-html/tut-what-it-do.html +++ b/doc-html/tut-what-it-do.html @@ -1,57 +1,56 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="tut-more-complicated.html"> -<LINK REL="prev" href="tut-overview.html"> -<LINK REL="parent" href="tutorial.html"> -<LINK REL="next" href="tut-more-complicated.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT="So what Exactly does Mod-python do?"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="tut-more-complicated.html" /> +<link rel="prev" href="tut-overview.html" /> +<link rel="parent" href="tutorial.html" /> +<link rel="next" href="tut-more-complicated.html" /> +<meta name='aesop' content='information' /> <title>3.3 So what Exactly does Mod-python do?</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.2 Quick Overview of" - href="tut-overview.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.4 Now something More" - href="tut-more-complicated.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.2 Quick Overview of" + href="tut-overview.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.4 Now something More" + href="tut-more-complicated.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-overview.html">3.2 Quick Overview of</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-more-complicated.html">3.4 Now something More</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION005300000000000000000"> </A> +<H1><A NAME="SECTION005300000000000000000"></A><A NAME="tut-what-it-do"></A> <BR> 3.3 So what Exactly does Mod-python do? </H1> @@ -67,7 +66,7 @@ Let's pretend we have the following configuration: </pre></div> <P> -<b>NB:</b> <span class="file">/mywebdir</span> is an absolute physical path. +<strong>NB:</strong> <span class="file">/mywebdir</span> is an absolute physical path. <P> And let's say that we have a python program (Windows users: substitute @@ -153,7 +152,7 @@ def handler(req): </pre></div> <P> -<a name="l2h-23"> </a> This is our <i class="dfn">handler</i> function declaration. It +<a id='l2h-23' xml:id='l2h-23'></a> This is our <i class="dfn">handler</i> function declaration. It is called "<tt class="samp">handler</tt>" because mod_python takes the name of the directive, converts it to lower case and removes the word "<tt class="samp">python</tt>". Thus "<tt class="samp">PythonHandler</tt>" becomes @@ -180,8 +179,8 @@ req.content_type = "text/plain" This sets the content type to "<tt class="samp">text/plain</tt>". The default is usually "<tt class="samp">text/html</tt>", but since our handler doesn't produce any html, "<tt class="samp">text/plain</tt>" is more appropriate. - <b>Important:</b> you should <b>always</b> make sure this is set - <b>before</b> any call to "<tt class="samp">req.write</tt>". When you first call + <strong>Important:</strong> you should <strong>always</strong> make sure this is set + <strong>before</strong> any call to "<tt class="samp">req.write</tt>". When you first call "<tt class="samp">req.write</tt>", the response HTTP header is sent to the client and all subsequent changes to the content type (or other HTTP headers) are simply lost. @@ -215,7 +214,7 @@ This tells Apache that everything went OK and that the request has </OL> <P> -<b>Some food for thought:</b> If you were paying attention, you +<strong>Some food for thought:</strong> If you were paying attention, you noticed that the text above didn't specify that in order for the handler code to be executed, the URL needs to refer to <span class="file">myscript.py</span>. The only requirement was that it refers to a @@ -228,47 +227,46 @@ augments the server behaviour when processing a specific type of file, not an individual file. <P> -<i>At this point, if you didn't understand the above paragraph, go - back and read it again, until you do.</i> +<em>At this point, if you didn't understand the above paragraph, go + back and read it again, until you do.</em> <P> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="3.2 Quick Overview of" - rel="prev" title="3.2 Quick Overview of" - href="tut-overview.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="3. Tutorial" - rel="parent" title="3. Tutorial" - href="tutorial.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.4 Now something More" - rel="next" title="3.4 Now something More" - href="tut-more-complicated.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="3.2 Quick Overview of" + href="tut-overview.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="3. Tutorial" + href="tutorial.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.4 Now something More" + href="tut-more-complicated.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="tut-overview.html">3.2 Quick Overview of</A> <b class="navlabel">Up:</b> <a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-more-complicated.html">3.4 Now something More</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/tutorial.html b/doc-html/tutorial.html index 717373962e7e7f97b0c17e0b43e664dcc6f13a09..f75adad4b96c090addb71a3fa260761e8f39aa2b 100644 --- a/doc-html/tutorial.html +++ b/doc-html/tutorial.html @@ -1,83 +1,83 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> -<link rel="STYLESHEET" href="modpython.css" type='text/css'> -<link rel="first" href="modpython.html" title='Mod_python Manual'> -<link rel='contents' href='contents.html' title="Contents"> -<link rel='index' href='genindex.html' title='Index'> -<link rel='last' href='about.html' title='About this document...'> -<link rel='help' href='about.html' title='About this document...'> -<LINK REL="next" href="pythonapi.html"> -<LINK REL="prev" href="installation.html"> -<LINK REL="parent" HREF="modpython.html"> -<LINK REL="next" href="tut-pub.html"> -<meta name='aesop' content='information'> -<META NAME="description" CONTENT=". Tutorial"> -<META NAME="keywords" CONTENT="modpython"> -<META NAME="resource-type" CONTENT="document"> -<META NAME="distribution" CONTENT="global"> +<link rel="STYLESHEET" href="modpython.css" type='text/css' /> +<link rel="first" href="modpython.html" title='Mod_python Manual' /> +<link rel='contents' href='contents.html' title="Contents" /> +<link rel='index' href='genindex.html' title='Index' /> +<link rel='last' href='about.html' title='About this document...' /> +<link rel='help' href='about.html' title='About this document...' /> +<link rel="next" href="pythonapi.html" /> +<link rel="prev" href="installation.html" /> +<link rel="parent" href="modpython.html" /> +<link rel="next" href="tut-pub.html" /> +<meta name='aesop' content='information' /> <title>3. Tutorial</title> </head> <body> <DIV CLASS="navigation"> +<div id='top-navigation-panel' xml:id='top-navigation-panel'> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.5 Troubleshooting" - href="inst-trouble.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.1 A Quick Start" - href="tut-pub.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.5 Troubleshooting" + href="inst-trouble.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.1 A Quick Start" + href="tut-pub.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-trouble.html">2.5 Troubleshooting</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-pub.html">3.1 A Quick Start</A> -<br><hr> +</div> +<hr /></div> </DIV> <!--End of Navigation Panel--> -<H1><A NAME="SECTION005000000000000000000"> </A> +<H1><A NAME="SECTION005000000000000000000"></A><A NAME="tutorial"></A> <BR> 3. Tutorial </H1> <P> <DIV ALIGN="RIGHT"> -<i>So how can I make this work?</i> +<em>So how can I make this work?</em> </DIV> <P> -<i>This is a quick guide to getting started with mod_python +<em>This is a quick guide to getting started with mod_python programming once you have it installed. This is <b>not</b> an - installation manual!</i> + installation manual!</em> <P> -<i>It is also highly recommended to read (at least the top part of) +<em>It is also highly recommended to read (at least the top part of) Section <A href="pythonapi.html#pythonapi">4</A>, <em class="citetitle"><a href="pythonapi.html" title="Python API" >Python API</a></em> after - completing this tutorial.</i> + completing this tutorial.</em> <P> -<p><hr> +<p><br /></p><hr class='online-navigation' /> +<div class='online-navigation'> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></a> @@ -89,43 +89,43 @@ <LI><A href="tut-404-handler.html">3.5 Your Own 404 Handler</a> </ul> <!--End of Table of Child-Links--> +</div> <DIV CLASS="navigation"> -<p><hr> +<div class='online-navigation'> +<p></p><hr /> <table align="center" width="100%" cellpadding="0" cellspacing="2"> <tr> -<td><a rel="prev" title="2.5 Troubleshooting" - rel="prev" title="2.5 Troubleshooting" - href="inst-trouble.html"><img src='previous.gif' - border='0' height='32' alt='Previous Page' width='32'></A></td> -<td><a rel="parent" title="Mod_python Manual" - rel="parent" title="Mod_python Manual" - HREF="modpython.html"><img src='up.gif' - border='0' height='32' alt='Up One Level' width='32'></A></td> -<td><a rel="next" title="3.1 A Quick Start" - rel="next" title="3.1 A Quick Start" - href="tut-pub.html"><img src='next.gif' - border='0' height='32' alt='Next Page' width='32'></A></td> +<td class='online-navigation'><a rel="prev" title="2.5 Troubleshooting" + href="inst-trouble.html"><img src='previous.png' + border='0' height='32' alt='Previous Page' width='32' /></A></td> +<td class='online-navigation'><a rel="parent" title="Mod_python Manual" + href="modpython.html"><img src='up.png' + border='0' height='32' alt='Up One Level' width='32' /></A></td> +<td class='online-navigation'><a rel="next" title="3.1 A Quick Start" + href="tut-pub.html"><img src='next.png' + border='0' height='32' alt='Next Page' width='32' /></A></td> <td align="center" width="100%">Mod_python Manual</td> -<td><a rel="contents" title="Table of Contents" - rel="contents" title="Table of Contents" - href="contents.html"><img src='contents.gif' - border='0' height='32' alt='Contents' width='32'></A></td> -<td><img src='blank.gif' - border='0' height='32' alt='' width='32'></td> -<td><a rel="index" title="Index" - rel="index" title="Index" - href="genindex.html"><img src='index.gif' - border='0' height='32' alt='Index' width='32'></A></td> +<td class='online-navigation'><a rel="contents" title="Table of Contents" + href="contents.html"><img src='contents.png' + border='0' height='32' alt='Contents' width='32' /></A></td> +<td class='online-navigation'><img src='blank.png' + border='0' height='32' alt='' width='32' /></td> +<td class='online-navigation'><a rel="index" title="Index" + href="genindex.html"><img src='index.png' + border='0' height='32' alt='Index' width='32' /></A></td> </tr></table> +<div class='online-navigation'> <b class="navlabel">Previous:</b> <a class="sectref" rel="prev" href="inst-trouble.html">2.5 Troubleshooting</A> <b class="navlabel">Up:</b> -<a class="sectref" rel="parent" HREF="modpython.html">Mod_python Manual</A> +<a class="sectref" rel="parent" href="modpython.html">Mod_python Manual</A> <b class="navlabel">Next:</b> <a class="sectref" rel="next" href="tut-pub.html">3.1 A Quick Start</A> -<hr> -<span class="release-info">Release 3.2.10, documentation updated on July 19, 2006.</span> +</div> +</div> +<hr /> +<span class="release-info">Release 3.3.1, documentation updated on January 29, 2007.</span> </DIV> <!--End of Navigation Panel--> diff --git a/doc-html/up.gif b/doc-html/up.gif deleted file mode 100644 index a9d3e13e47a031bc4ab5e0bf8485fc844233e2a0..0000000000000000000000000000000000000000 Binary files a/doc-html/up.gif and /dev/null differ diff --git a/doc-html/up.png b/doc-html/up.png new file mode 100644 index 0000000000000000000000000000000000000000..a90e0284436f3823439ae6c00a5fdd692a0663ff Binary files /dev/null and b/doc-html/up.png differ diff --git a/lib/python/mod_python/Cookie.py b/lib/python/mod_python/Cookie.py index ea017c35ec4751098d11556f476473ebfad205b8..2e200aa4fddb919cbbd21b28b268916c7cd0ecf3 100644 --- a/lib/python/mod_python/Cookie.py +++ b/lib/python/mod_python/Cookie.py @@ -1,3 +1,4 @@ + # vim: set sw=4 expandtab : # # Copyright 2004 Apache Software Foundation # @@ -15,7 +16,7 @@ # # Originally developed by Gregory Trubetskoy. # - # $Id: Cookie.py 374268 2006-02-02 05:31:45Z nlehuen $ + # $Id: Cookie.py 472053 2006-11-07 10:11:01Z grahamd $ """ @@ -59,7 +60,9 @@ class metaCookie(type): "version", "path", "domain", "secure", "comment", "expires", "max_age", # RFC 2965 - "commentURL", "discard", "port") + "commentURL", "discard", "port", + # Microsoft Extension + "httponly" ) # _valid_attr + property values # (note __slots__ is a new Python feature, it @@ -105,14 +108,18 @@ class Cookie(object): __metaclass__ = metaCookie - def parse(Class, str): + DOWNGRADE = 0 + IGNORE = 1 + EXCEPTION = 3 + + def parse(Class, str, **kw): """ Parse a Cookie or Set-Cookie header value, and return a dict of Cookies. Note: the string should NOT include the header name, only the value. """ - dict = _parse_cookie(str, Class) + dict = _parse_cookie(str, Class, **kw) return dict parse = classmethod(parse) @@ -149,7 +156,7 @@ class Cookie(object): result = ["%s=%s" % (self.name, self.value)] for name in self._valid_attr: if hasattr(self, name): - if name in ("secure", "discard"): + if name in ("secure", "discard", "httponly"): result.append(name) else: result.append("%s=%s" % (name, getattr(self, name))) @@ -171,18 +178,27 @@ class SignedCookie(Cookie): is still plainly visible as part of the cookie. """ - def parse(Class, s, secret): + def parse(Class, s, secret, mismatch=Cookie.DOWNGRADE, **kw): - dict = _parse_cookie(s, Class) + dict = _parse_cookie(s, Class, **kw) + del_list = [] for k in dict: c = dict[k] try: c.unsign(secret) except CookieError: - # downgrade to Cookie - dict[k] = Cookie.parse(Cookie.__str__(c))[k] - + if mismatch == Cookie.EXCEPTION: + raise + elif mismatch == Cookie.IGNORE: + del_list.append(k) + else: + # downgrade to Cookie + dict[k] = Cookie.parse(Cookie.__str__(c))[k] + + for k in del_list: + del dict[k] + return dict parse = classmethod(parse) @@ -205,7 +221,7 @@ class SignedCookie(Cookie): self.value)] for name in self._valid_attr: if hasattr(self, name): - if name in ("secure", "discard"): + if name in ("secure", "discard", "httponly"): result.append(name) else: result.append("%s=%s" % (name, getattr(self, name))) @@ -242,17 +258,26 @@ class MarshalCookie(SignedCookie): http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=7xn0hcugmy.fsf%40ruckus.brouhaha.com """ - def parse(Class, s, secret): + def parse(Class, s, secret, mismatch=Cookie.DOWNGRADE, **kw): - dict = _parse_cookie(s, Class) + dict = _parse_cookie(s, Class, **kw) + del_list = [] for k in dict: c = dict[k] try: c.unmarshal(secret) - except (CookieError, ValueError): - # downgrade to Cookie - dict[k] = Cookie.parse(Cookie.__str__(c))[k] + except CookieError: + if mismatch == Cookie.EXCEPTION: + raise + elif mismatch == Cookie.IGNORE: + del_list.append(k) + else: + # downgrade to Cookie + dict[k] = Cookie.parse(Cookie.__str__(c))[k] + + for k in del_list: + del dict[k] return dict @@ -268,7 +293,7 @@ class MarshalCookie(SignedCookie): result = ["%s=%s%s" % (self.name, self.hexdigest(m), m)] for name in self._valid_attr: if hasattr(self, name): - if name in ("secure", "discard"): + if name in ("secure", "discard", "httponly"): result.append(name) else: result.append("%s=%s" % (name, getattr(self, name))) @@ -277,8 +302,16 @@ class MarshalCookie(SignedCookie): def unmarshal(self, secret): self.unsign(secret) - self.value = marshal.loads(base64.decodestring(self.value)) + try: + data = base64.decodestring(self.value) + except: + raise CookieError, "Cannot base64 Decode Cookie: %s=%s" % (self.name, self.value) + + try: + self.value = marshal.loads(data) + except (EOFError, ValueError, TypeError): + raise CookieError, "Cannot Unmarshal Cookie: %s=%s" % (self.name, self.value) # This is a simplified and in some places corrected @@ -299,7 +332,7 @@ _cookiePattern = re.compile( r"\s*;?" # probably ending in a semi-colon ) -def _parse_cookie(str, Class): +def _parse_cookie(str, Class, names=None): # XXX problem is we should allow duplicate # strings result = {} @@ -311,7 +344,7 @@ def _parse_cookie(str, Class): # We just ditch the cookies names which start with a dollar sign since # those are in fact RFC2965 cookies attributes. See bug [#MODPYTHON-3]. - if key[0]!='$': + if key[0]!='$' and names is None or key in names: result[key] = Class(key, val) return result @@ -349,3 +382,7 @@ def get_cookies(req, Class=Cookie, **kw): return Class.parse(cookies, **kw) +def get_cookie(req, name, Class=Cookie, **kw): + cookies = get_cookies(req, Class, names=[name], **kw) + if cookies.has_key(name): + return cookies[name] diff --git a/lib/python/mod_python/Session.py b/lib/python/mod_python/Session.py index b96f8e4a9699807794cd0ad64b1506258e0ac5e4..3122e6692e43c56c614d0faa5966c841345c4514 100644 --- a/lib/python/mod_python/Session.py +++ b/lib/python/mod_python/Session.py @@ -1,3 +1,4 @@ + # vim: set sw=4 expandtab : # # Copyright 2004 Apache Software Foundation # @@ -15,7 +16,7 @@ # # Originally developed by Gregory Trubetskoy. # - # $Id: Session.py 416523 2006-06-23 00:25:29Z jgallacher $ + # $Id: Session.py 472053 2006-11-07 10:11:01Z grahamd $ import apache, Cookie import _apache @@ -137,26 +138,39 @@ class BaseSession(dict): dict.__init__(self) - session_cookie_name = req.get_options().get("session_cookie_name",COOKIE_NAME) + config = req.get_options() + if config.has_key("mod_python.session.cookie_name"): + session_cookie_name = config.get("mod_python.session.cookie_name", COOKIE_NAME) + else: + # For backwards compatability with versions + # of mod_python prior to 3.3. + session_cookie_name = config.get("session_cookie_name", COOKIE_NAME) if not self._sid: # check to see if cookie exists if secret: - cookies = Cookie.get_cookies(req, Class=Cookie.SignedCookie, - secret=self._secret) + cookie = Cookie.get_cookie(req, session_cookie_name, + Class=Cookie.SignedCookie, + secret=self._secret, + mismatch=Cookie.Cookie.IGNORE) else: - cookies = Cookie.get_cookies(req) + cookie = Cookie.get_cookie(req, session_cookie_name) + + if cookie: + self._sid = cookie.value - if cookies.has_key(session_cookie_name): - self._sid = cookies[session_cookie_name].value - if self._sid: - # Validate the sid *before* locking the session - # _check_sid will raise an apache.SERVER_RETURN exception if not _check_sid(self._sid): - self._req.log_error("mod_python.Session warning: The session id contains invalid characters, valid characters are only 0-9 and a-f", - apache.APLOG_WARNING) - raise apache.SERVER_RETURN, apache.HTTP_INTERNAL_SERVER_ERROR + if sid: + # Supplied explicitly by user of the class, + # raise an exception and make the user code + # deal with it. + raise ValueError("Invalid Session ID: sid=%s" % sid) + else: + # Derived from the cookie sent by browser, + # wipe it out so it gets replaced with a + # correct value. + self._sid = None self.init_lock() @@ -185,7 +199,13 @@ class BaseSession(dict): self.cleanup() def make_cookie(self): - session_cookie_name = self._req.get_options().get("session_cookie_name",COOKIE_NAME) + config = self._req.get_options() + if config.has_key("mod_python.session.cookie_name"): + session_cookie_name = config.get("mod_python.session.cookie_name", COOKIE_NAME) + else: + # For backwards compatability with versions + # of mod_python prior to 3.3. + session_cookie_name = config.get("session_cookie_name", COOKIE_NAME) if self._secret: c = Cookie.SignedCookie(session_cookie_name, self._sid, @@ -193,8 +213,13 @@ class BaseSession(dict): else: c = Cookie.Cookie(session_cookie_name, self._sid) - config = self._req.get_options() - if config.has_key("ApplicationPath"): + if config.has_key("mod_python.session.application_domain"): + c.domain = config["mod_python.session.application_domain"] + if config.has_key("mod_python.session.application_path"): + c.path = config["mod_python.session.application_path"] + elif config.has_key("ApplicationPath"): + # For backwards compatability with versions + # of mod_python prior to 3.3. c.path = config["ApplicationPath"] else: # the path where *Handler directive was specified @@ -325,9 +350,19 @@ class DbmSession(BaseSession): if not dbm: opts = req.get_options() - if opts.has_key("session_dbm"): + if opts.has_key("mod_python.dbm_session.database_filename"): + dbm = opts["mod_python.dbm_session.database_filename"] + elif opts.has_key("session_dbm"): + # For backwards compatability with versions + # of mod_python prior to 3.3. dbm = opts["session_dbm"] + elif opts.has_key("mod_python.dbm_session.database_directory"): + dbm = os.path.join(opts.get('mod_python.dbm_session.database_directory', tempdir), 'mp_sess.dbm') + elif opts.has_key("mod_python.session.database_directory"): + dbm = os.path.join(opts.get('mod_python.session.database_directory', tempdir), 'mp_sess.dbm') else: + # For backwards compatability with versions + # of mod_python prior to 3.3. dbm = os.path.join(opts.get('session_directory', tempdir), 'mp_sess.dbm') self._dbmfile = dbm @@ -402,18 +437,47 @@ class FileSession(BaseSession): opts = req.get_options() if fast_cleanup == -1: - self._fast_cleanup = true_or_false(opts.get('session_fast_cleanup', DFT_FAST_CLEANUP)) + if opts.has_key('mod_python.file_session.enable_fast_cleanup'): + self._fast_cleanup = true_or_false(opts.get('mod_python.file_session.enable_fast_cleanup', DFT_FAST_CLEANUP)) + else: + # For backwards compatability with versions + # of mod_python prior to 3.3. + self._fast_cleanup = true_or_false(opts.get('session_fast_cleanup', DFT_FAST_CLEANUP)) else: self._fast_cleanup = fast_cleanup if verify_cleanup == -1: - self._verify_cleanup = true_or_false(opts.get('session_verify_cleanup', DFT_VERIFY_CLEANUP)) + if opts.has_key('mod_python.file_session.verify_session_timeout'): + self._verify_cleanup = true_or_false(opts.get('mod_python.file_session.verify_session_timeout', DFT_VERIFY_CLEANUP)) + else: + # For backwards compatability with versions + # of mod_python prior to 3.3. + self._verify_cleanup = true_or_false(opts.get('session_verify_cleanup', DFT_VERIFY_CLEANUP)) else: self._verify_cleanup = verify_cleanup - - self._grace_period = int(opts.get('session_grace_period', DFT_GRACE_PERIOD)) - self._cleanup_time_limit = int(opts.get('session_cleanup_time_limit',DFT_CLEANUP_TIME_LIMIT)) - self._sessdir = os.path.join(opts.get('session_directory', tempdir), 'mp_sess') + + if opts.has_key('mod_python.file_session.cleanup_grace_period'): + self._grace_period = int(opts.get('mod_python.file_session.cleanup_grace_period', DFT_GRACE_PERIOD)) + else: + # For backwards compatability with versions + # of mod_python prior to 3.3. + self._grace_period = int(opts.get('session_grace_period', DFT_GRACE_PERIOD)) + + if opts.has_key('mod_python.file_session.cleanup_time_limit'): + self._cleanup_time_limit = int(opts.get('mod_python.file_session.cleanup_time_limit',DFT_CLEANUP_TIME_LIMIT)) + else: + # For backwards compatability with versions + # of mod_python prior to 3.3. + self._cleanup_time_limit = int(opts.get('session_cleanup_time_limit',DFT_CLEANUP_TIME_LIMIT)) + + if opts.has_key('mod_python.file_session.database_directory'): + self._sessdir = os.path.join(opts.get('mod_python.file_session.database_directory', tempdir), 'mp_sess') + elif opts.has_key('mod_python.session.database_directory'): + self._sessdir = os.path.join(opts.get('mod_python.session.database_directory', tempdir), 'mp_sess') + else: + # For backwards compatability with versions + # of mod_python prior to 3.3. + self._sessdir = os.path.join(opts.get('session_directory', tempdir), 'mp_sess') # FIXME if timeout: @@ -706,8 +770,12 @@ class MemorySession(BaseSession): def Session(req, sid=0, secret=None, timeout=0, lock=1): opts = req.get_options() - if opts.has_key('session'): - # Check the apache config for the type of session + # Check the apache config for the type of session + if opts.has_key('mod_python.session.session_type'): + sess_type = opts['mod_python.session.session_type'] + elif opts.has_key('session'): + # For backwards compatability with versions + # of mod_python prior to 3.3. sess_type = opts['session'] else: # no session class in config so get the default for the platform diff --git a/lib/python/mod_python/__init__.py b/lib/python/mod_python/__init__.py index 36157621fe59703fc94f35584dcfd049d0f03016..0c75f2218c0498f566c9286052e8e10e399b2014 100644 --- a/lib/python/mod_python/__init__.py +++ b/lib/python/mod_python/__init__.py @@ -15,10 +15,10 @@ # # Originally developed by Gregory Trubetskoy. # - # $Id: __init__.py 420308 2006-07-09 16:21:43Z jgallacher $ + # $Id: __init__.py 501044 2007-01-29 13:39:12Z jgallacher $ __all__ = ["apache", "cgihandler", "psp", "publisher", "util", "python22"] -version = "3.2.10" +version = "3.3.1" diff --git a/lib/python/mod_python/apache.py b/lib/python/mod_python/apache.py index d0cf57ff175b0e85f9f573ad6fe7a11bb7738a16..fdfb44eee4f9137158ef57ba44495ca60c6e54dd 100644 --- a/lib/python/mod_python/apache.py +++ b/lib/python/mod_python/apache.py @@ -1,3 +1,4 @@ + # vim: set sw=4 expandtab : # # Copyright 2004 Apache Software Foundation # @@ -15,7 +16,7 @@ # # Originally developed by Gregory Trubetskoy. # - # $Id: apache.py 374268 2006-02-02 05:31:45Z nlehuen $ + # $Id: apache.py 468216 2006-10-27 00:54:12Z grahamd $ import sys import traceback @@ -25,11 +26,21 @@ import pdb import stat import imp import types +import cgi import _apache -# a small hack to improve PythonPath performance. This -# variable stores the last PythonPath in raw (unevaled) form. -_path = None +try: + import threading +except: + import dummy_threading as threading + +# Cache for values of PythonPath that have been seen already. +_path_cache = {} +_path_cache_lock = threading.Lock() + +_result_warning = """Handler has returned result or raised SERVER_RETURN +exception with argument having non integer type. Type of value returned +was %s, whereas expected """ + str(types.IntType) + "." class CallBack: """ @@ -74,20 +85,19 @@ class CallBack: else: object_str = l[1] - # add the directory to pythonpath if - # not there yet, or pythonpath specified - - if config.has_key("PythonPath"): - # we want to do as little evaling as possible, - # so we remember the path in un-evaled form and - # compare it - global _path - pathstring = config["PythonPath"] - if pathstring != _path: - _path = pathstring - newpath = eval(pathstring) - if sys.path != newpath: - sys.path[:] = newpath + # evaluate pythonpath and set sys.path to + # resulting value if not already done + + if config.has_key("PythonPath"): + _path_cache_lock.acquire() + try: + pathstring = config["PythonPath"] + if not _path_cache.has_key(pathstring): + newpath = eval(pathstring) + _path_cache[pathstring] = None + sys.path[:] = newpath + finally: + _path_cache_lock.release() # import module module = import_module(module_name, @@ -97,16 +107,37 @@ class CallBack: object = resolve_object(module, object_str, arg=conn, silent=0) - if object: + # Only permit debugging using pdb if Apache has + # actually been started in single process mode. - # call the object - if config.has_key("PythonEnablePdb"): - result = pdb.runcall(object, conn) - else: + pdb_debug = int(config.get("PythonEnablePdb", "0")) + one_process = exists_config_define("ONE_PROCESS") + + if pdb_debug and one_process: + + # Don't use pdb.runcall() as it results in + # a bogus 'None' response when pdb session + # is quit. With this code the exception + # marking that the session has been quit is + # propogated back up and it is obvious in + # the error message what actually occurred. + + debugger = pdb.Pdb() + debugger.reset() + sys.settrace(debugger.trace_dispatch) + + try: result = object(conn) - assert (type(result) == type(int())), \ - "ConnectionHandler '%s' returned invalid return code." % handler + finally: + debugger.quitting = 1 + sys.settrace(None) + + else: + result = object(conn) + + assert (type(result) == type(int())), \ + "ConnectionHandler '%s' returned invalid return code." % handler except PROG_TRACEBACK, traceblock: # Program run-time error @@ -140,55 +171,82 @@ class CallBack: try: - # split module::handler - l = filter.handler.split('::', 1) - module_name = l[0] - if len(l) == 1: - # no oject, provide default - if filter.is_input: - object_str = "inputfilter" - else: - object_str = "outputfilter" - else: - object_str = l[1] - # add the directory to pythonpath if - # not there yet, or pythonpath specified - - if config.has_key("PythonPath"): - # we want to do as little evaling as possible, - # so we remember the path in un-evaled form and - # compare it - global _path - pathstring = config["PythonPath"] - if pathstring != _path: - _path = pathstring - newpath = eval(pathstring) - if sys.path != newpath: - sys.path[:] = newpath + # not there yet, or evaluate pythonpath + # and set sys.path to resulting value + # if not already done + + if config.has_key("PythonPath"): + _path_cache_lock.acquire() + try: + pathstring = config["PythonPath"] + if not _path_cache.has_key(pathstring): + newpath = eval(pathstring) + _path_cache[pathstring] = None + sys.path[:] = newpath + finally: + _path_cache_lock.release() else: if filter.dir and (filter.dir not in sys.path): sys.path[:0] = [filter.dir] - # import module - module = import_module(module_name, - autoreload=int(config.get("PythonAutoReload", 1)), - log=debug) + if not callable(filter.handler): - # find the object - object = resolve_object(module, object_str, arg=filter, silent=0) + # split module::handler + l = filter.handler.split('::', 1) + module_name = l[0] + if len(l) == 1: + # no oject, provide default + if filter.is_input: + object_str = "inputfilter" + else: + object_str = "outputfilter" + else: + object_str = l[1] - if object: + # import module + module = import_module(module_name, + autoreload=int(config.get("PythonAutoReload", 1)), + log=debug) - # call the object - if config.has_key("PythonEnablePdb"): - pdb.runcall(object, filter) - else: - object(filter) + # find the object + object = resolve_object(module, object_str, arg=filter, silent=0) + else: + object = filter.handler + + # Only permit debugging using pdb if Apache has + # actually been started in single process mode. + + pdb_debug = int(config.get("PythonEnablePdb", "0")) + one_process = exists_config_define("ONE_PROCESS") + + if pdb_debug and one_process: + + # Don't use pdb.runcall() as it results in + # a bogus 'None' response when pdb session + # is quit. With this code the exception + # marking that the session has been quit is + # propogated back up and it is obvious in + # the error message what actually occurred. + + debugger = pdb.Pdb() + debugger.reset() + sys.settrace(debugger.trace_dispatch) + + try: + result = object(filter) + + finally: + debugger.quitting = 1 + sys.settrace(None) + + else: + result = object(filter) - # always flush the filter. without a FLUSH or EOS bucket, - # the content is never written to the network. - # XXX an alternative is to tell the user to flush() always + # always flush the filter. without a FLUSH or EOS bucket, + # the content is never written to the network. + # XXX an alternative is to tell the user to flush() always + if not filter.closed: filter.flush() except SERVER_RETURN, value: @@ -248,91 +306,125 @@ class CallBack: config = req.get_config() debug = int(config.get("PythonDebug", 0)) + default_object_str = req.phase[len("python"):].lower() + + # Lookup expected status values that allow us to + # continue when multiple handlers exist. + + expected = _status_values[default_object_str] + try: hlist = req.hlist while hlist.handler is not None: - # split module::handler - l = hlist.handler.split('::', 1) - - module_name = l[0] - if len(l) == 1: - # no oject, provide default - object_str = req.phase[len("python"):].lower() - else: - object_str = l[1] - # add the directory to pythonpath if - # not there yet, or pythonpath specified - if config.has_key("PythonPath"): - # we want to do as little evaling as possible, - # so we remember the path in un-evaled form and - # compare it - global _path - pathstring = config["PythonPath"] - if pathstring != _path: - _path = pathstring - newpath = eval(pathstring) - if sys.path != newpath: - sys.path[:] = newpath + # not there yet, or evaluate pythonpath + # and set sys.path to resulting value + # if not already done + + if config.has_key("PythonPath"): + _path_cache_lock.acquire() + try: + pathstring = config["PythonPath"] + if not _path_cache.has_key(pathstring): + newpath = eval(pathstring) + _path_cache[pathstring] = None + sys.path[:] = newpath + finally: + _path_cache_lock.release() else: dir = hlist.directory if dir and (dir not in sys.path): sys.path[:0] = [dir] - # import module - module = import_module(module_name, - autoreload=int(config.get("PythonAutoReload", 1)), - log=debug) - - # find the object - object = resolve_object(module, object_str, - arg=req, silent=hlist.silent) + if not callable(hlist.handler): - if object: + # split module::handler + l = hlist.handler.split('::', 1) - # call the object - if config.has_key("PythonEnablePdb"): - result = pdb.runcall(object, req) + module_name = l[0] + if len(l) == 1: + # no object, provide default + object_str = default_object_str else: - result = object(req) + object_str = l[1] + + # import module + module = import_module(module_name, + autoreload=int(config.get("PythonAutoReload", 1)), + log=debug) + + # find the object + object = resolve_object(module, object_str, + arg=req, silent=hlist.silent) + + else: + object = hlist.handler + + if not hlist.silent or object is not None: + + try: + # Only permit debugging using pdb if Apache has + # actually been started in single process mode. + + pdb_debug = int(config.get("PythonEnablePdb", "0")) + one_process = exists_config_define("ONE_PROCESS") + + if pdb_debug and one_process: - assert (type(result) == type(int())), \ - "Handler '%s' returned invalid return code." % hlist.handler + # Don't use pdb.runcall() as it results in + # a bogus 'None' response when pdb session + # is quit. With this code the exception + # marking that the session has been quit is + # propogated back up and it is obvious in + # the error message what actually occurred. + + debugger = pdb.Pdb() + debugger.reset() + sys.settrace(debugger.trace_dispatch) + + try: + result = object(req) + + finally: + debugger.quitting = 1 + sys.settrace(None) + + else: + result = object(req) + + except SERVER_RETURN, value: + + # The SERVER_RETURN exception type when raised + # otherwise indicates an abort from below with + # value as (result, status) or (result, None) or + # result. + + if len(value.args) == 2: + (result, status) = value.args + if status: + req.status = status + else: + result = value.args[0] + + assert (type(result) == types.IntType), \ + _result_warning % type(result) # stop cycling through handlers - if result != OK: + if result not in expected: break elif hlist.silent: - # A faulty handler marked as silent will only - # propagate DECLINED if it is the first and only handler. - if result != OK: + # A missing handler when in silent mode will + # only propagate DECLINED if it is the first + # and only handler. + + if result == HTTP_INTERNAL_SERVER_ERROR: result = DECLINED hlist.next() - except SERVER_RETURN, value: - # SERVER_RETURN indicates an abort from below - # with value as (result, status) or (result, None) or result - try: - if len(value.args) == 2: - (result, status) = value.args - if status: - req.status = status - else: - result = value.args[0] - - if type(result) != type(7): - s = "Value raised with SERVER_RETURN is invalid. It is a " - s = s + "%s, but it must be a tuple or an int." % type(result) - _apache.log_error(s, APLOG_NOERRNO|APLOG_ERR, req.server) - return HTTP_INTERNAL_SERVER_ERROR - - except: - pass - except PROG_TRACEBACK, traceblock: # Program run-time error try: @@ -354,6 +446,77 @@ class CallBack: return result + def IncludeDispatch(self, filter, tag, code): + + try: + config = filter.req.get_config() + debug = int(config.get("PythonDebug", 0)) + + if not hasattr(filter.req,"ssi_globals"): + filter.req.ssi_globals = {} + + filter.req.ssi_globals["filter"] = filter + + filter.req.ssi_globals["__file__"] = filter.req.filename + + code = code.replace('\r\n', '\n').rstrip() + + if tag == 'eval': + result = eval(code, filter.req.ssi_globals) + if result is not None: + filter.write(str(result)) + elif tag == 'exec': + exec(code, filter.req.ssi_globals) + + filter.flush() + + except: + try: + exc_type, exc_value, exc_traceback = sys.exc_info() + result = self.ReportError(exc_type, exc_value, exc_traceback, + filter=filter, phase=filter.name, + hname=filter.req.filename, + debug=debug) + finally: + exc_traceback = None + + raise + + filter.req.ssi_globals["filter"] = None + + return OK + + def ImportDispatch(self, name): + + config = main_server.get_config() + + debug = int(config.get("PythonDebug", "0")) + + # evaluate pythonpath and set sys.path to + # resulting value if not already done + + if config.has_key("PythonPath"): + _path_cache_lock.acquire() + try: + pathstring = config["PythonPath"] + if not _path_cache.has_key(pathstring): + newpath = eval(pathstring) + _path_cache[pathstring] = None + sys.path[:] = newpath + finally: + _path_cache_lock.release() + + # split module::function + l = name.split('::', 1) + module_name = l[0] + func_name = None + if len(l) != 1: + func_name = l[1] + + module = import_module(module_name, log=debug) + + if func_name: + getattr(module, func_name)() def ReportError(self, etype, evalue, etb, req=None, filter=None, srv=None, phase="N/A", hname="N/A", debug=0): @@ -384,11 +547,12 @@ class CallBack: return HTTP_INTERNAL_SERVER_ERROR else: # write to client + req.status = HTTP_INTERNAL_SERVER_ERROR req.content_type = 'text/html' s = '\n<pre>\nMod_python error: "%s %s"\n\n' % (phase, hname) for e in traceback.format_exception(etype, evalue, etb): - s = s + e + '\n' + s = s + cgi.escape(e) + '\n' s = s + "</pre>\n" if filter: @@ -401,6 +565,7 @@ class CallBack: except: # last try traceback.print_exc() + sys.stderr.flush() finally: # erase the traceback @@ -484,20 +649,20 @@ def module_mtime(module): mtime = 0 if module.__dict__.has_key("__file__"): - filepath = module.__file__ + filepath = module.__file__ - try: - # this try/except block is a workaround for a Python bug in - # 2.0, 2.1 and 2.1.1. See - # http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=422004 + try: + # this try/except block is a workaround for a Python bug in + # 2.0, 2.1 and 2.1.1. See + # http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=422004 - if os.path.exists(filepath): - mtime = os.path.getmtime(filepath) + if os.path.exists(filepath): + mtime = os.path.getmtime(filepath) - if os.path.exists(filepath[:-1]) : - mtime = max(mtime, os.path.getmtime(filepath[:-1])) + if os.path.exists(filepath[:-1]) : + mtime = max(mtime, os.path.getmtime(filepath[:-1])) - except OSError: pass + except OSError: pass return mtime @@ -738,27 +903,39 @@ def restore_nocgi(sav_env, si, so): sys.stdout = si sys.stdin = so -_interpreter = None -_server = None +interpreter = None +main_server = None _callback = None -def register_cleanup(handler,data=None): - _apache.register_cleanup(_interpreter,_server,handler,data) +def register_cleanup(callback, data=None): + _apache.register_cleanup(interpreter, main_server, callback, data) -def init(name,server): +def init(name, server): """ This function is called by the server at startup time """ - global _interpreter - global _server - _interpreter = name - _server = server + global interpreter + global main_server + interpreter = name + main_server = server sys.argv = ["mod_python"] global _callback _callback = CallBack() + + options = main_server.get_options() + #interpreters = options.get('mod_python.future.importer', None) + interpreters = options.get('mod_python.legacy.importer', None) + if interpreters: + interpreters = map(lambda x: x.strip(), interpreters.split(',')) + #if '*' in interpreters or interpreter in interpreters: + if not ('*' in interpreters or interpreter in interpreters): + from mod_python import importer + else: + from mod_python import importer + return _callback ## Some functions made public @@ -769,6 +946,7 @@ config_tree = _apache.config_tree server_root = _apache.server_root mpm_query = _apache.mpm_query exists_config_define = _apache.exists_config_define +stat = _apache.stat ## Some constants @@ -811,6 +989,7 @@ HTTP_EXPECTATION_FAILED = 417 HTTP_UNPROCESSABLE_ENTITY = 422 HTTP_LOCKED = 423 HTTP_FAILED_DEPENDENCY = 424 +HTTP_UPGRADE_REQUIRED = 426 HTTP_INTERNAL_SERVER_ERROR = 500 HTTP_NOT_IMPLEMENTED = 501 HTTP_BAD_GATEWAY = 502 @@ -850,6 +1029,21 @@ OK = REQ_PROCEED = 0 DONE = -2 DECLINED = REQ_NOACTION = -1 +_status_values = { + "postreadrequesthandler": [ DECLINED, OK ], + "transhandler": [ DECLINED ], + "maptostoragehandler": [ DECLINED ], + "inithandler": [ DECLINED, OK ], + "headerparserhandler": [ DECLINED, OK ], + "accesshandler": [ DECLINED, OK ], + "authenhandler": [ DECLINED ], + "authzhandler": [ DECLINED ], + "typehandler": [ DECLINED ], + "fixuphandler": [ DECLINED, OK ], + "loghandler": [ DECLINED, OK ], + "handler": [ OK ], +} + # constants for get_remote_host REMOTE_HOST = 0 REMOTE_NAME = 1 @@ -875,7 +1069,7 @@ FINFO_MTIME = 8 FINFO_CTIME = 9 FINFO_FNAME = 10 FINFO_NAME = 11 -#FINFO_FILEHAND = 14 +FINFO_FILETYPE = 12 # the req.parsed_uri URI_SCHEME = 0 @@ -890,8 +1084,9 @@ URI_FRAGMENT = 8 # for req.proxyreq PROXYREQ_NONE = 0 # No proxy -PROXYREQ_PROXY = 1 # Standard proxy +PROXYREQ_PROXY = 1 # Standard proxy PROXYREQ_REVERSE = 2 # Reverse proxy +PROXYREQ_RESPONSE = 3 # Origin response # methods for req.allow_method() M_GET = 0 # RFC 2616: HTTP @@ -952,3 +1147,54 @@ AP_MPMQ_MAX_SPARE_THREADS = 10 # Max # of spare threads AP_MPMQ_MAX_REQUESTS_DAEMON= 11 # Max # of requests per daemon AP_MPMQ_MAX_DAEMONS = 12 # Max # of daemons by config +# magic mime types +CGI_MAGIC_TYPE = "application/x-httpd-cgi" +INCLUDES_MAGIC_TYPE = "text/x-server-parsed-html" +INCLUDES_MAGIC_TYPE3 = "text/x-server-parsed-html3" +DIR_MAGIC_TYPE = "httpd/unix-directory" + +# for req.read_body +REQUEST_NO_BODY = 0 +REQUEST_CHUNKED_ERROR = 1 +REQUEST_CHUNKED_DECHUNK = 2 + +# for req.connection.keepalive +AP_CONN_UNKNOWN = _apache.AP_CONN_UNKNOWN +AP_CONN_CLOSE = _apache.AP_CONN_CLOSE +AP_CONN_KEEPALIVE = _apache.AP_CONN_KEEPALIVE + +# for req.finfo[apache.FINFO_FILETYPE] +APR_NOFILE = _apache.APR_NOFILE +APR_REG = _apache.APR_REG +APR_DIR = _apache.APR_DIR +APR_CHR = _apache.APR_CHR +APR_BLK = _apache.APR_BLK +APR_PIPE = _apache.APR_PIPE +APR_LNK = _apache.APR_LNK +APR_SOCK = _apache.APR_SOCK +APR_UNKFILE = _apache.APR_UNKFILE + +# for apache.stat() +APR_FINFO_LINK = 0x00000001 # Stat the link not the file itself if it is a link +APR_FINFO_MTIME = 0x00000010 # Modification Time +APR_FINFO_CTIME = 0x00000020 # Creation or inode-changed time +APR_FINFO_ATIME = 0x00000040 # Access Time +APR_FINFO_SIZE = 0x00000100 # Size of the file +APR_FINFO_CSIZE = 0x00000200 # Storage size consumed by the file +APR_FINFO_DEV = 0x00001000 # Device +APR_FINFO_INODE = 0x00002000 # Inode +APR_FINFO_NLINK = 0x00004000 # Number of links +APR_FINFO_TYPE = 0x00008000 # Type +APR_FINFO_USER = 0x00010000 # User +APR_FINFO_GROUP = 0x00020000 # Group +APR_FINFO_UPROT = 0x00100000 # User protection bits +APR_FINFO_GPROT = 0x00200000 # Group protection bits +APR_FINFO_WPROT = 0x00400000 # World protection bits +APR_FINFO_ICASE = 0x01000000 # if dev is case insensitive +APR_FINFO_NAME = 0x02000000 # ->name in proper case +APR_FINFO_MIN = 0x00008170 # type, mtime, ctime, atime, size +APR_FINFO_IDENT = 0x00003000 # dev and inode +APR_FINFO_OWNER = 0x00030000 # user and group +APR_FINFO_PROT = 0x00700000 # all protections +APR_FINFO_NORM = 0x0073b170 # an atomic unix apr_stat() +APR_FINFO_DIRENT = 0x02000000 # an atomic unix apr_dir_read() diff --git a/lib/python/mod_python/cache.py b/lib/python/mod_python/cache.py index 11c0ef54b7bd5aadf878e95b1fd22ad28d4522eb..1cfd21a7797d3f82ef29a738c9c873c718a1e8ba 100644 --- a/lib/python/mod_python/cache.py +++ b/lib/python/mod_python/cache.py @@ -18,7 +18,7 @@ # This was donated by Nicolas Lehuen, and also posted to the Python Cookbook # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302997 # - # $Id: cache.py 374268 2006-02-02 05:31:45Z nlehuen $ + # $Id: cache.py 408048 2006-05-20 17:44:51Z jgallacher $ from os import stat from time import time, mktime @@ -314,8 +314,8 @@ class HTTPCache(Cache): try: match = re_max_age.match(headers['cache-control']) if match: - entry._expires=time()+int(match.group(1)) - expiration = True + entry._expires=time()+int(match.group(1)) + expiration = True except (KeyError, ValueError): pass if not expiration: diff --git a/lib/python/mod_python/importer.py b/lib/python/mod_python/importer.py new file mode 100644 index 0000000000000000000000000000000000000000..c987df2e8962bb85d180c5d3f0f2892905eff5b5 --- /dev/null +++ b/lib/python/mod_python/importer.py @@ -0,0 +1,1946 @@ + # vim: set sw=4 expandtab : + # + # Copyright 2004 Apache Software Foundation + # + # Licensed under the Apache License, Version 2.0 (the "License"); you + # may not use this file except in compliance with the License. You + # may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + # implied. See the License for the specific language governing + # permissions and limitations under the License. + # + # Originally developed by Gregory Trubetskoy. + # + # The code in this file originally donated by Graham Dumpleton. + # + # $Id: importer.py 481741 2006-12-03 09:14:06Z grahamd $ + +from mod_python import apache +from mod_python import publisher + +import os +import sys +import new +import types +import pdb +import imp +import md5 +import time +import string +import StringIO +import traceback +import cgi + +try: + import threading +except: + import dummy_threading as threading + + +# Define a transient per request modules cache. This is +# not the same as the true global modules cache used by +# the module importer. Instead, the per request modules +# cache is where references to modules loaded in order +# to satisfy the requirements of a specific request are +# stored for the life of that request. Such a cache is +# required to ensure that two distinct bits of code that +# load the same module do in fact use the same instance +# of the module and that an update of the code for a +# module on disk doesn't cause the latter handler code +# to load its own separate instance. This is in part +# necessary because the module loader does not reload a +# module on top of the old module, but loads the new +# instance into a clean module. + +class _module_cache(dict): pass + +_request_modules_cache = {} + +def _cleanup_request_modules_cache(thread=None): + thread = thread or threading.currentThread() + _request_modules_cache.pop(thread, None) + +def _setup_request_modules_cache(req=None): + thread = threading.currentThread() + if not _request_modules_cache.has_key(thread): + _request_modules_cache[thread] = _module_cache() + _request_modules_cache[thread].generation = 0 + _request_modules_cache[thread].ctime = 0 + if req: + req.register_cleanup(_cleanup_request_modules_cache, thread) + +def _get_request_modules_cache(): + thread = threading.currentThread() + return _request_modules_cache.get(thread, None) + +def request_modules_graph(verbose=0): + output = StringIO.StringIO() + modules = _get_request_modules_cache() + print >> output, 'digraph REQUEST {' + print >> output, 'node [shape=box];' + + for module in modules.values(): + + name = module.__name__ + filename = module.__file__ + + if verbose: + cache = module.__mp_info__.cache + + ctime = time.asctime(time.localtime(cache.ctime)) + mtime = time.asctime(time.localtime(cache.mtime)) + atime = time.asctime(time.localtime(cache.atime)) + generation = cache.generation + direct = cache.direct + indirect = cache.indirect + path = module.__mp_path__ + + message = '%s [label="%s\\nmtime = %s\\nctime = %s\\natime = %s\\n' + message += 'generation = %d, direct = %d, indirect = %d\\n' + message += 'path = %s"];' + + print >> output, message % (name, filename, mtime, ctime, atime, \ + generation, direct, indirect, path) + else: + message = '%s [label="%s"];' + + print >> output, message % (name, filename) + + children = module.__mp_info__.children + for child_name in children: + print >> output, '%s -> %s' % (name, child_name) + + print >> output, '}' + return output.getvalue() + +apache.request_modules_graph = request_modules_graph + + +# Define a transient per request cache into which +# the currently active configuration and handler root +# directory pertaining to a request is stored. This is +# done so that it can be accessed directly from the +# module importer function to obtain configuration +# settings indicating if logging and module reloading is +# enabled and to determine where to look for modules. + +_current_cache = {} + +def _setup_current_cache(config, options, directory): + thread = threading.currentThread() + if directory: + directory = os.path.normpath(directory) + cache = _current_cache.get(thread, (None, None, None)) + if config is None and options is None: + del _current_cache[thread] + else: + _current_cache[thread] = (config, options, directory) + return cache + +def get_current_config(): + thread = threading.currentThread() + config, options, directory = _current_cache.get(thread, + (apache.main_server.get_config(), None, None)) + return config + +def get_current_options(): + thread = threading.currentThread() + config, options, directory = _current_cache.get(thread, + (None, apache.main_server.get_options(), None)) + return options + +def get_handler_root(): + thread = threading.currentThread() + config, options, directory = _current_cache.get(thread, + (None, None, None)) + return directory + +apache.get_current_config = get_current_config +apache.get_current_options = get_current_options +apache.get_handler_root = get_handler_root + +# Define an alternate implementation of the module +# importer system and substitute it for the standard one +# in the 'mod_python.apache' module. + +apache.ximport_module = apache.import_module + +def _parent_context(): + # Determine the enclosing module which has called + # this function. From that module, return the info + # stashed in it by the module importer system. + + try: + raise Exception + except: + parent = sys.exc_info()[2].tb_frame.f_back + while (parent and parent.f_globals.has_key('__file__') and + parent.f_globals['__file__'] == __file__): + parent = parent.f_back + + if parent and parent.f_globals.has_key('__mp_info__'): + parent_info = parent.f_globals['__mp_info__'] + parent_path = parent.f_globals['__mp_path__'] + return (parent_info, parent_path) + + return (None, None) + +def _find_module(module_name, path): + + # Search the specified path for a Python code module + # of the specified name. Note that only Python code + # files with a '.py' extension will be used. Python + # packages will be ignored. + + for directory in path: + if directory is not None: + if directory == '~': + root = get_handler_root() + if root is not None: + directory = root + elif directory[:2] == '~/': + root = get_handler_root() + if root is not None: + directory = os.path.join(root, directory[2:]) + file = os.path.join(directory, module_name) + '.py' + if os.path.exists(file): + return file + +def import_module(module_name, autoreload=None, log=None, path=None): + + file = None + import_path = [] + + # Deal with explicit references to a code file. + # Allow some shortcuts for referring to code file + # relative to handler root or directory of parent + # module. Those relative to parent module are not + # allowed if parent module not imported using this + # module importing system. + + if os.path.isabs(module_name): + file = module_name + + elif module_name[:2] == '~/': + directory = get_handler_root() + if directory is not None: + file = os.path.join(directory, module_name[2:]) + + elif module_name[:2] == './': + (parent_info, parent_path) = _parent_context() + if parent_info is not None: + directory = os.path.dirname(parent_info.file) + file = os.path.join(directory, module_name[2:]) + + elif module_name[:3] == '../': + (parent_info, parent_path) = _parent_context() + if parent_info is not None: + directory = os.path.dirname(parent_info.file) + file = os.path.join(directory, module_name) + + if file is None: + # If not an explicit file reference, it is a + # module name. Determine the list of directories + # that need to be searched for a module code + # file. These directories will be, the directory + # of the parent if also imported using this + # importer and any specified search path. + + search_path = [] + + if path is not None: + search_path.extend(path) + + (parent_info, parent_path) = _parent_context() + if parent_info is not None: + directory = os.path.dirname(parent_info.file) + search_path.append(directory) + + if parent_path is not None: + search_path.extend(parent_path) + + options = get_current_options() + if options.has_key('mod_python.importer.path'): + directory = eval(options['mod_python.importer.path']) + search_path.extend(directory) + + # Attempt to find the code file for the module + # if we have directories to actually search. + + if search_path: + file = _find_module(module_name, search_path) + + else: + + # For module imported using explicit path, the + # path argument becomes the special embedded + # search path for 'import' statement executed + # within that module. + + if path is not None: + import_path = path + + # Was a Python code file able to be identified. + + if file is not None: + + # Use the module importing and caching system + # to load the code from the specified file. + + return _global_modules_cache.import_module(file, autoreload, \ + log, import_path) + + else: + # If a module code file could not be found, + # defer to the standard Python module importer. + # We should always end up here if the request + # was for a package. + + return __import__(module_name, {}, {}, ['*']) + + +apache.import_module = import_module + + +class _CacheInfo: + + def __init__(self, label, file, mtime): + self.label = label + self.file = file + self.mtime = mtime + self.module = None + self.instance = 0 + self.generation = 0 + self.children = {} + self.path = [] + self.atime = 0 + self.ctime = 0 + self.direct = 0 + self.indirect = 0 + self.reload = 0 + self.lock = threading.Lock() + +class _InstanceInfo: + + def __init__(self, label, file, cache): + self.label = label + self.file = file + self.cache = cache + self.children = {} + +class _ModuleCache: + + _prefix = "_mp_" + + def __init__(self): + self._cache = {} + self._lock1 = threading.Lock() + self._lock2 = threading.Lock() + self._generation = 0 + self._frozen = False + self._directories = {} + + def _log_notice(self, msg): + pid = os.getpid() + name = apache.interpreter + flags = apache.APLOG_NOERRNO|apache.APLOG_NOTICE + text = "mod_python (pid=%d, interpreter=%s): %s" % (pid, `name`, msg) + apache.main_server.log_error(text, flags) + + def _log_warning(self, msg): + pid = os.getpid() + name = apache.interpreter + flags = apache.APLOG_NOERRNO|apache.APLOG_WARNING + text = "mod_python (pid=%d, interpreter=%s): %s" % (pid, `name`, msg) + apache.main_server.log_error(text, flags) + + def _log_exception(self): + pid = os.getpid() + name = apache.interpreter + flags = apache.APLOG_NOERRNO|apache.APLOG_ERR + msg = 'Application error' + text = "mod_python (pid=%d, interpreter=%s): %s" % (pid, `name`, msg) + apache.main_server.log_error(text, flags) + etype, evalue, etb = sys.exc_info() + for text in traceback.format_exception(etype, evalue, etb): + apache.main_server.log_error(text[:-1], flags) + etb = None + + def cached_modules(self): + self._lock1.acquire() + try: + return self._cache.keys() + finally: + self._lock1.release() + + def module_info(self, label): + self._lock1.acquire() + try: + return self._cache[label] + finally: + self._lock1.release() + + def freeze_modules(self): + self._frozen = True + + def modules_graph(self, verbose=0): + self._lock1.acquire() + try: + output = StringIO.StringIO() + modules = self._cache + print >> output, 'digraph GLOBAL {' + print >> output, 'node [shape=box];' + + for cache in modules.values(): + + name = cache.label + filename = cache.file + + if verbose: + ctime = time.asctime(time.localtime(cache.ctime)) + mtime = time.asctime(time.localtime(cache.mtime)) + atime = time.asctime(time.localtime(cache.atime)) + generation = cache.generation + direct = cache.direct + indirect = cache.indirect + path = cache.path + + message = '%s [label="%s\\nmtime = %s\\nctime = %s\\n' + message += 'atime = %s\\ngeneration = %d, direct = %d,' + message += 'indirect = %d\\npath = %s"];' + + print >> output, message % (name, filename, mtime, ctime, + atime, generation, direct, indirect, path) + else: + message = '%s [label="%s"];' + + print >> output, message % (name, filename) + + children = cache.children + for child_name in children: + print >> output, '%s -> %s' % (name, child_name) + + print >> output, '}' + return output.getvalue() + + finally: + self._lock1.release() + + def _check_directory(self, file): + + directory = os.path.dirname(file) + + if not directory in self._directories: + self._directories[directory] = None + if directory in sys.path: + msg = 'Module directory listed in "sys.path". ' + msg = msg + 'This may cause problems. Please check code. ' + msg = msg + 'File being imported is "%s".' % file + self._log_warning(msg) + + def import_module(self, file, autoreload=None, log=None, path=None): + + # Ensure that file name is normalised so all + # lookups against the cache equate where they + # are the same file. This isn't necessarily + # going to work where symlinks are involved, but + # not much else that can be done in that case. + + file = os.path.normpath(file) + + # Determine the default values for the module + # autoreloading and logging arguments direct + # from the Apache configuration rather than + # having fixed defaults. + + if autoreload is None or log is None: + + config = get_current_config() + + if autoreload is None: + autoreload = int(config.get("PythonAutoReload", 1)) + + if log is None: + log = int(config.get("PythonDebug", 0)) + + # Warn of any instances where a code file is + # imported from a directory which also appears + # in 'sys.path'. + + if log: + self._check_directory(file) + + # Retrieve the parent context. That is, the + # details stashed into the parent module by the + # module importing system itself. + + (parent_info, parent_path) = _parent_context() + + # Check for an attempt by the module to import + # itself. + + if parent_info: + assert(file != parent_info.file), "Import cycle in %s." % file + + # Retrieve the per request modules cache entry. + + modules = _get_request_modules_cache() + + # Calculate a unique label corresponding to the + # name of the file which is the module. This + # will be used as the '__name__' attribute of a + # module and as key in various tables. + + label = self._module_label(file) + + # See if the requested module has already been + # imported previously within the context of this + # request or at least visited by way of prior + # dependency checks where it was deemed that it + # didn't need to be reloaded. If it has we can + # skip any additional dependency checks and use + # the module already identified. This ensures + # the same actual module instance is used. This + # check is also required so that we don't get + # into cyclical import loops. Still need to at + # least record the fact that the module is a + # child of the parent. + + if modules is not None: + if modules.has_key(label): + if parent_info: + parent_info.children[label] = time.time() + return modules[label] + + # Now move on to trying to find the actual + # module. + + try: + cache = None + + # First determine if the module has been loaded + # previously. If not already loaded or if a + # dependency of the module has been changed on disk + # or reloaded since parent was loaded, must load the + # module. + + (cache, load) = self._reload_required(modules, + label, file, autoreload) + + # Make sure that the cache entry is locked by the + # thread so that other threads in a multithreaded + # system don't try and load the same module at the + # same time. + + cache.lock.acquire() + + # If this per request modules cache has just + # been created for the first time, record some + # details in it about current cache state and + # run time of the request. + + if modules.ctime == 0: + modules.generation = self._generation + modules.ctime = time.time() + + # Import module or obtain it from cache as is + # appropriate. + + if load: + + # Setup a new empty module to load the code for + # the module into. Increment the instance count + # and set the reload flag to force a reload if + # the import fails. + + cache.instance = cache.instance + 1 + cache.reload = 1 + + module = imp.new_module(label) + + # If the module was previously loaded we need to + # manage the transition to the new instance of + # the module that is being loaded to replace it. + # This entails calling the special clone method, + # if provided within the existing module. Using + # this method the existing module can then + # selectively indicate what should be transfered + # over to the next instance of the module, + # including thread locks. If this process fails + # the special purge method is called, if + # provided, to indicate that the existing module + # is being forcibly purged out of the system. In + # that case any existing state will not be + # transferred. + + if cache.module != None: + if hasattr(cache.module, "__mp_clone__"): + try: + # Migrate any existing state data from + # existing module instance to new module + # instance. + + if log: + msg = "Cloning module '%s'" % file + self._log_notice(msg) + + cache.module.__mp_clone__(module) + + except: + # Forcibly purging module from system. + + self._log_exception() + + if log: + msg = "Purging module '%s'" % file + self._log_notice(msg) + + if hasattr(cache.module, "__mp_purge__"): + try: + cache.module.__mp_purge__() + except: + self._log_exception() + + cache.module = None + + # Setup a fresh new module yet again. + + module = imp.new_module(label) + + if log: + if cache.module == None: + msg = "Importing module '%s'" % file + self._log_notice(msg) + else: + msg = "Reimporting module '%s'" % file + self._log_notice(msg) + else: + if log: + msg = "Importing module '%s'" % file + self._log_notice(msg) + + # Must add to the module the path to the modules + # file. This ensures that module looks like a + # normal module and this path will also be used + # in certain contexts when the import statement + # is used within the module. + + module.__file__ = file + + # Setup a new instance object to store in the + # module. This will refer back to the actual + # cache entry and is used to record information + # which is specific to this incarnation of the + # module when reloading is occuring. + + instance = _InstanceInfo(label, file, cache) + + module.__mp_info__ = instance + + # Cache any additional module search path which + # should be used for this instance of the module + # or package. The path shouldn't be able to be + # changed during the lifetime of the module to + # ensure that module imports are always done + # against the same path. + + if path is None: + path = [] + + module.__mp_path__ = list(path) + + # Place a reference to the module within the + # request specific cache of imported modules. + # This makes module lookup more efficient when + # the same module is imported more than once + # within the context of a request. In the case + # of a cyclical import, avoids a never ending + # recursive loop. + + if modules is not None: + modules[label] = module + + # If this is a child import of some parent + # module, add this module as a child of the + # parent. + + atime = time.time() + + if parent_info: + parent_info.children[label] = atime + + # Perform actual import of the module. + + try: + execfile(file, module.__dict__) + + except: + + # Importation of the module has failed for + # some reason. If this is the very first + # import of the module, need to discard the + # cache entry entirely else a subsequent + # attempt to load the module will wrongly + # think it was successfully loaded already. + + if cache.module is None: + del self._cache[label] + + raise + + # Update the cache and clear the reload flag. + + cache.module = module + cache.reload = 0 + + # Need to also update the list of child modules + # stored in the cache entry with the actual + # children found during the import. A copy is + # made, meaning that any future imports + # performed within the context of the request + # handler don't result in the module later being + # reloaded if they change. + + cache.children = dict(module.__mp_info__.children) + + # Create link to embedded path at end of import. + + cache.path = module.__mp_path__ + + # Increment the generation count of the global + # state of all modules. This is used in the + # dependency management scheme for reloading to + # determine if a module dependency has been + # reloaded since it was loaded. + + self._lock2.acquire() + self._generation = self._generation + 1 + cache.generation = self._generation + self._lock2.release() + + # Update access time and reset access counts. + + cache.ctime = atime + cache.atime = atime + cache.direct = 1 + cache.indirect = 0 + + else: + + # Update the cache. + + module = cache.module + + # Place a reference to the module within the + # request specific cache of imported modules. + # This makes module lookup more efficient when + # the same module is imported more than once + # within the context of a request. In the case + # of a cyclical import, avoids a never ending + # recursive loop. + + if modules is not None: + modules[label] = module + + # If this is a child import of some parent + # module, add this module as a child of the + # parent. + + atime = time.time() + + if parent_info: + parent_info.children[label] = atime + + # Didn't need to reload the module so simply + # increment access counts and last access time. + + cache.atime = atime + cache.direct = cache.direct + 1 + + return module + + finally: + # Lock on cache object can now be released. + + if cache is not None: + cache.lock.release() + + def _reload_required(self, modules, label, file, autoreload): + + # Make sure cache lock is always released. + + try: + self._lock1.acquire() + + # Check if this is a new module. + + if not self._cache.has_key(label): + mtime = os.path.getmtime(file) + cache = _CacheInfo(label, file, mtime) + self._cache[label] = cache + return (cache, True) + + # Grab entry from cache. + + cache = self._cache[label] + + # Check if reloads have been disabled. + # Only avoid a reload though if module + # hadn't been explicitly marked to be + # reloaded. + + if not cache.reload: + if self._frozen or not autoreload: + return (cache, False) + + # Determine modification time of file. + + try: + mtime = os.path.getmtime(file) + except: + + # Must have been removed just then. We return + # currently cached module and avoid a reload. + # Defunct module would need to be purged later. + + msg = 'Module code file has been removed. ' + msg = msg + 'This may cause problems. Using cached module. ' + msg = msg + 'File being imported "%s".' % file + self._log_warning(msg) + + return (cache, False) + + # Check if modification time has changed or + # if module has been flagged to be reloaded. + + if cache.reload or mtime != cache.mtime: + cache.mtime = mtime + return (cache, True) + + # Check if children have changed in any way + # that would require a reload. + + if cache.children: + + visited = {} + ancestors = [label] + + for tag in cache.children: + + # If the child isn't in the cache any longer + # for some reason, force a reload. + + if not self._cache.has_key(tag): + return (cache, True) + + child = self._cache[tag] + + # Now check the actual child module. + + if self._check_module(modules, cache, child, + visited, ancestors): + return (cache, True) + + # No need to reload the module. Module + # should be cached in the request object by + # the caller if required. + + return (cache, False) + + finally: + self._lock1.release() + + def _check_module(self, modules, parent, current, visited, ancestors): + + # Update current modules access statistics. + + current.indirect = current.indirect + 1 + current.atime = time.time() + + # Check if current module has been marked + # for reloading. + + if current.reload: + return True + + # Check if current module has been reloaded + # since the parent was last loaded. + + if current.generation > parent.generation: + return True + + # If the current module has been visited + # already, no need to continue further as it + # should be up to date. + + if visited.has_key(current.label): + return False + + # Check if current module has been modified on + # disk since last loaded. + + try: + mtime = os.path.getmtime(current.file) + + if mtime != current.mtime: + return True + + except: + # Current module must have been removed. + # Don't cause this to force a reload though + # as can cause problems. Rely on the parent + # being modified to cause a reload. + + msg = 'Module code file has been removed. ' + msg = msg + 'This may cause problems. Using cached module. ' + msg = msg + 'File being imported "%s".' % current.file + self._log_warning(msg) + + if modules is not None: + modules[current.label] = current.module + + return False + + # Check to see if all the children of the + # current module need updating or are newer than + # the current module. + + if current.children: + + ancestors = ancestors + [current.label] + + for label in current.children.keys(): + + # Check for a child which refers to one of its + # ancestors. Hopefully this will never occur. If + # it does we will force a reload every time to + # highlight there is a problem. Note this does + # not get detected first time module is loaded, + # only here on subsequent checks. If reloading + # is not enabled, then problem will never be + # detected and flagged. + + if label in ancestors: + msg = 'Module imports an ancestor module. ' + msg = msg + 'This may cause problems. Please check code. ' + msg = msg + 'File doing import is "%s".' % current.file + self._log_warning(msg) + return True + + # If the child isn't in the cache any longer for + # some reason, force a reload. + + if not self._cache.has_key(label): + return True + + child = self._cache[label] + + # Recurse back into this function to check + # child. + + if self._check_module(modules, current, child, + visited, ancestors): + return True + + # No need to reload the current module. Now safe + # to mark the current module as having been + # visited and cache it into the request object + # for quick later lookup if a parent needs to be + # reloaded. + + visited[current.label] = current + + if modules is not None: + modules[current.label] = current.module + + return False + + def _module_label(self, file): + + # The label is used in the __name__ field of the + # module and then used in determining child + # module imports. Thus really needs to be + # unique. We don't really want to use a module + # name which is a filesystem path. Hope MD5 hex + # digest is okay. + + return self._prefix + md5.new(file).hexdigest() + + +_global_modules_cache = _ModuleCache() + +def _get_global_modules_cache(): + return _global_modules_cache + +apache.freeze_modules = _global_modules_cache.freeze_modules +apache.modules_graph = _global_modules_cache.modules_graph +apache.module_info = _global_modules_cache.module_info + + +class _ModuleLoader: + + def __init__(self, file): + self.__file = file + + def load_module(self, fullname): + return _global_modules_cache.import_module(self.__file) + +class _ModuleImporter: + + def find_module(self, fullname, path=None): + + # Return straight away if requested to import a + # sub module of a package. + + if '.' in fullname: + return None + + # Retrieve the parent context. That is, the + # details stashed into the parent module by the + # module importing system itself. Only consider + # using the module importing system for 'import' + # statement if parent module was imported using + # the same. + + (parent_info, parent_path) = _parent_context() + + if parent_info is None: + return None + + # Determine the list of directories that need to + # be searched for a module code file. These + # directories will be, the directory of the + # parent and any specified search path. When + # enabled, the handler root directory will also + # be searched. + + search_path = [] + + directory = os.path.dirname(parent_info.file) + search_path.append(directory) + + if parent_path is not None: + search_path.extend(parent_path) + + options = get_current_options() + if options.has_key('mod_python.importer.path'): + directory = eval(options['mod_python.importer.path']) + search_path.extend(directory) + + # Return if we have no search path to search. + + if not search_path: + return None + + # Attempt to find the code file for the module. + + file = _find_module(fullname, search_path) + + if file is not None: + return _ModuleLoader(file) + + return None + + +sys.meta_path.insert(0, _ModuleImporter()) + + + +# Replace mod_python.publisher page cache object with a +# dummy object which uses new module importer. + +class _PageCache: + def __getitem__(self,req): + return import_module(req.filename) + +publisher.xpage_cache = publisher.page_cache +publisher.page_cache = _PageCache() + + +# Define alternate implementations of the top level +# mod_python entry points and substitute them for the +# standard one in the 'mod_python.apache' callback +# object. + +_callback = apache._callback + +_callback.xConnectionDispatch = _callback.ConnectionDispatch +_callback.xFilterDispatch = _callback.FilterDispatch +_callback.xHandlerDispatch = _callback.HandlerDispatch +_callback.xIncludeDispatch = _callback.IncludeDispatch +_callback.xImportDispatch = _callback.ImportDispatch +_callback.xReportError = _callback.ReportError + +_result_warning = """Handler has returned result or raised SERVER_RETURN +exception with argument having non integer type. Type of value returned +was %s, whereas expected """ + str(types.IntType) + "." + +_status_values = { + "postreadrequesthandler": [ apache.DECLINED, apache.OK ], + "transhandler": [ apache.DECLINED ], + "maptostoragehandler": [ apache.DECLINED ], + "inithandler": [ apache.DECLINED, apache.OK ], + "headerparserhandler": [ apache.DECLINED, apache.OK ], + "accesshandler": [ apache.DECLINED, apache.OK ], + "authenhandler": [ apache.DECLINED ], + "authzhandler": [ apache.DECLINED ], + "typehandler": [ apache.DECLINED ], + "fixuphandler": [ apache.DECLINED, apache.OK ], + "loghandler": [ apache.DECLINED, apache.OK ], + "handler": [ apache.DECLINED, apache.OK ], +} + +def _execute_target(config, req, object, arg): + + try: + # Only permit debugging using pdb if Apache has + # actually been started in single process mode. + + pdb_debug = int(config.get("PythonEnablePdb", "0")) + one_process = apache.exists_config_define("ONE_PROCESS") + + if pdb_debug and one_process: + + # Don't use pdb.runcall() as it results in + # a bogus 'None' response when pdb session + # is quit. With this code the exception + # marking that the session has been quit is + # propogated back up and it is obvious in + # the error message what actually occurred. + + debugger = pdb.Pdb() + debugger.reset() + sys.settrace(debugger.trace_dispatch) + + try: + result = object(arg) + + finally: + debugger.quitting = 1 + sys.settrace(None) + + else: + result = object(arg) + + except apache.SERVER_RETURN, value: + # For a connection handler, there is no request + # object so this form of response is invalid. + # Thus exception is reraised to be handled later. + + if not req: + raise + + # The SERVER_RETURN exception type when raised + # otherwise indicates an abort from below with + # value as (result, status) or (result, None) or + # result. + + if len(value.args) == 2: + (result, status) = value.args + if status: + req.status = status + else: + result = value.args[0] + + # Only check type of return value for connection + # handlers and request phase handlers. The return + # value of filters are ultimately ignored. + + if not req or req == arg: + assert (type(result) == types.IntType), _result_warning % type(result) + + return result + +def _process_target(config, req, directory, handler, default, arg, silent): + + if not callable(handler): + + # Determine module name and target object. + + parts = handler.split('::', 1) + + module_name = parts[0] + + if len(parts) == 1: + object_str = default + else: + object_str = parts[1] + + # Update 'sys.path'. This will only be done if we + # have not encountered the current value of the + # 'PythonPath' config previously. + + if config.has_key("PythonPath"): + + apache._path_cache_lock.acquire() + + try: + + pathstring = config["PythonPath"] + if not apache._path_cache.has_key(pathstring): + newpath = eval(pathstring) + apache._path_cache[pathstring] = None + sys.path[:] = newpath + + finally: + apache._path_cache_lock.release() + + # Import module containing target object. Specify + # the handler root directory in the search path so + # that it is still checked even if 'PythonPath' set. + + path = [] + + if directory: + path = [directory] + + module = import_module(module_name, path=path) + + # Obtain reference to actual target object. + + object = apache.resolve_object(module, object_str, arg, silent=silent) + + else: + + # Handler is the target object. + + object = handler + + # Lookup expected status values that allow us to + # continue when multiple handlers exist. + + expected = _status_values.get(default, None) + + # Default to apache.DECLINED unless in content + # handler phase. + + if not expected or apache.DECLINED not in expected: + result = apache.OK + else: + result = apache.DECLINED + + if object is not None or not silent: + + result = _execute_target(config, req, object, arg) + + # Stop iteration when target object returns a + # value other than expected values for the phase. + + if expected and result not in expected: + return (True, result) + + return (False, result) + +def ConnectionDispatch(self, conn): + """ + This is the dispatcher for connection handlers. + """ + + # Determine the default handler name. + + default_handler = "connectionhandler" + + # Be cautious and return server error as default. + + result = apache.HTTP_INTERNAL_SERVER_ERROR + + # Setup transient per request modules cache. Note + # that this cache will always be thrown away when + # connection handler returns as there is no way to + # transfer ownership and responsibility for + # discarding the cache entry to latter handlers. + + _setup_request_modules_cache() + + try: + + try: + # Cache the server configuration for the + # current request so that it will be + # available from within 'import_module()'. + + config = conn.base_server.get_config() + options = conn.base_server.get_options() + cache = _setup_current_cache(config, options, None) + + (aborted, result) = _process_target(config=config, req=None, + directory=None, handler=conn.hlist.handler, + default=default_handler, arg=conn, silent=0) + + finally: + # Restore any previous cached configuration. + # There should not actually be any, but this + # will cause the configuration cache entry to + # be discarded. + + _setup_current_cache(*cache) + + # Also discard the modules cache entry. + + _cleanup_request_modules_cache() + + except apache.PROG_TRACEBACK, traceblock: + + # Program runtime error flagged by the application. + + debug = int(config.get("PythonDebug", 0)) + + try: + (exc_type, exc_value, exc_traceback) = traceblock + result = self.ReportError(exc_type, exc_value, exc_traceback, + conn=conn, phase="ConnectionHandler", + hname=conn.hlist.handler, debug=debug) + + finally: + exc_traceback = None + + except: + + # Module loading error or some other runtime error. + + debug = int(config.get("PythonDebug", 0)) + + try: + exc_type, exc_value, exc_traceback = sys.exc_info() + result = self.ReportError(exc_type, exc_value, exc_traceback, + conn=conn, phase="ConnectionHandler", + hname=conn.hlist.handler, debug=debug) + finally: + exc_traceback = None + + return result + +def FilterDispatch(self, filter): + """ + This is the dispatcher for input/output filters. + """ + + # Determine the default handler name. + + if filter.is_input: + default_handler = "inputfilter" + else: + default_handler = "outputfilter" + + # Setup transient per request modules cache. Note + # that this will only actually do anything in this + # case if no Python request phase handlers have been + # specified. A cleanup handler is registered to + # later discard the cache entry if it was created. + + _setup_request_modules_cache(filter.req) + + try: + + try: + directory = filter.dir + handler = filter.handler + + # If directory for filter is not set, + # then search back through parents and + # inherit value from parent if found. + + if directory is None: + parent = filter.parent + while parent is not None: + if parent.directory is not None: + directory = parent.directory + break + parent = parent.parent + + # If directory for filter still not + # able to be determined, use the server + # document root. + + if directory is None: + directory = filter.req.document_root() + + # Expand relative addressing shortcuts. + + if type(handler) == types.StringType: + + if handler[:2] == './': + if directory is not None: + handler = os.path.join(directory, handler[2:]) + + elif handler[:3] == '../': + if directory is not None: + handler = os.path.join(directory, handler) + + # Cache the server configuration for the + # current request so that it will be + # available from within 'import_module()'. + + config = filter.req.get_config() + options = filter.req.get_options() + cache = _setup_current_cache(config, options, directory) + + (aborted, result) = _process_target(config=config, + req=filter.req, directory=directory, + handler=handler, default=default_handler, + arg=filter, silent=0) + + if not filter.closed: + filter.flush() + + finally: + # Restore any previous cached configuration. + + _setup_current_cache(*cache) + + except apache.PROG_TRACEBACK, traceblock: + + # Program runtime error flagged by the application. + + debug = int(config.get("PythonDebug", 0)) + + filter.disable() + + try: + (exc_type, exc_value, exc_traceback) = traceblock + result = self.ReportError(exc_type, exc_value, + exc_traceback, req=filter.req, filter=filter, + phase="Filter (%s)"%filter.name, + hname=filter.handler, debug=debug) + + finally: + exc_traceback = None + + except: + + # Module loading error or some other runtime error. + + debug = int(config.get("PythonDebug", 0)) + + filter.disable() + + try: + exc_type, exc_value, exc_traceback = sys.exc_info() + result = self.ReportError(exc_type, exc_value, + exc_traceback, req=filter.req, filter=filter, + phase="Filter: " + filter.name, + hname=filter.handler, debug=debug) + finally: + exc_traceback = None + + return apache.OK + +def HandlerDispatch(self, req): + """ + This is the dispatcher for handler phases. + """ + + # Cache name of phase in case something changes it. + + phase = req.phase + + # Determine the default handler name. + + default_handler = phase[len("python"):].lower() + + # Be cautious and return server error as default. + + result = apache.HTTP_INTERNAL_SERVER_ERROR + + # Setup transient per request modules cache. Note + # that this will only do something if this is the + # first Python request handler phase to be executed. + # A cleanup handler is registered to later discard + # the cache entry if it needed to be created. + + _setup_request_modules_cache(req) + + # Cache configuration for later. + + config = req.get_config() + options = req.get_options() + + try: + (aborted, hlist) = False, req.hlist + + # The actual handler root is the directory + # associated with the handler first in the + # chain. This may be a handler which was called + # in an earlier phase if the req.add_handler() + # method was used. The directory for those that + # follow the first may have been overridden by + # directory supplied to the req.add_handler() + # method. + + root = hlist.directory + parent = hlist.parent + while parent is not None: + root = parent.directory + parent = parent.parent + + # If directory for handler still not able to be + # determined, use the server document root. + + if root is None: + root = req.document_root() + + # Iterate over the handlers defined for the + # current phase and execute each in turn + # until the last is reached or prematurely + # aborted. + + while not aborted and hlist.handler is not None: + + try: + cache = None + + directory = hlist.directory + handler = hlist.handler + + # If directory for handler is not set, + # then search back through parents and + # inherit value from parent if found. + # This directory is that where modules + # are searched for first and may not be + # the same as the handler root if it + # was supplied explicitly to the method + # req.add_handler(). + + if directory is None: + parent = hlist.parent + while parent is not None: + if parent.directory is not None: + directory = parent.directory + break + parent = parent.parent + + # Expand relative addressing shortcuts. + + if type(handler) == types.StringType: + + if handler[:2] == './': + if directory is not None: + handler = os.path.join(directory, handler[2:]) + + elif handler[:3] == '../': + if directory is not None: + handler = os.path.join(directory, handler) + + # Cache the server configuration for the + # current request so that it will be + # available from within 'import_module()'. + + cache = _setup_current_cache(config, options, root) + + (aborted, result) = _process_target(config=config, req=req, + directory=directory, handler=handler, + default=default_handler, arg=req, silent=hlist.silent) + + finally: + # Restore any previous cached configuration. + + _setup_current_cache(*cache) + + hlist.next() + + except apache.PROG_TRACEBACK, traceblock: + + # Program runtime error flagged by the application. + + debug = int(config.get("PythonDebug", 0)) + + try: + (exc_type, exc_value, exc_traceback) = traceblock + result = self.ReportError(exc_type, exc_value, + exc_traceback, req=req, phase=phase, + hname=hlist.handler, debug=debug) + finally: + exc_traceback = None + + except: + + # Module loading error or some other runtime error. + + debug = int(config.get("PythonDebug", 0)) + + try: + exc_type, exc_value, exc_traceback = sys.exc_info() + result = self.ReportError(exc_type, exc_value, + exc_traceback, req=req, phase=phase, + hname=hlist.handler, debug=debug) + finally: + exc_traceback = None + + return result + +_callback.ConnectionDispatch = new.instancemethod( + ConnectionDispatch, _callback, apache.CallBack) +_callback.FilterDispatch = new.instancemethod( + FilterDispatch, _callback, apache.CallBack) +_callback.HandlerDispatch = new.instancemethod( + HandlerDispatch, _callback, apache.CallBack) + +def IncludeDispatch(self, filter, tag, code): + + # Setup transient per request modules cache. Note + # that this will only actually do anything in this + # case if no Python request phase handlers have been + # specified. A cleanup handler is registered to + # later discard the cache entry if it was created. + + _setup_request_modules_cache(filter.req) + + try: + + try: + # Cache the server configuration for the + # current request so that it will be + # available from within 'import_module()'. + + config = filter.req.get_config() + options = filter.req.get_options() + cache = _setup_current_cache(config, options, None) + + debug = int(config.get("PythonDebug", 0)) + + if not hasattr(filter.req,"ssi_globals"): + filter.req.ssi_globals = {} + + filter.req.ssi_globals["filter"] = filter + + class _InstanceInfo: + + def __init__(self, label, file, cache): + self.label = label + self.file = file + self.cache = cache + self.children = {} + + filter.req.ssi_globals["__file__"] = filter.req.filename + filter.req.ssi_globals["__mp_info__"] = _InstanceInfo( + None, filter.req.filename, None) + filter.req.ssi_globals["__mp_path__"] = [] + + code = code.replace('\r\n', '\n').rstrip() + + if tag == 'eval': + result = eval(code, filter.req.ssi_globals) + if result is not None: + filter.write(str(result)) + elif tag == 'exec': + exec(code, filter.req.ssi_globals) + + filter.flush() + + finally: + + filter.req.ssi_globals["filter"] = None + + # Restore any previous cached configuration. + + _setup_current_cache(*cache) + + except: + try: + exc_type, exc_value, exc_traceback = sys.exc_info() + result = self.ReportError(exc_type, exc_value, exc_traceback, + filter=filter, phase=filter.name, + hname=filter.req.filename, debug=debug) + finally: + exc_traceback = None + + raise + + return apache.OK + +_callback.IncludeDispatch = new.instancemethod( + IncludeDispatch, _callback, apache.CallBack) + +def ImportDispatch(self, name): + + config = apache.main_server.get_config() + + debug = int(config.get("PythonDebug", "0")) + + # evaluate pythonpath and set sys.path to + # resulting value if not already done + + if config.has_key("PythonPath"): + apache._path_cache_lock.acquire() + try: + pathstring = config["PythonPath"] + if not apache._path_cache.has_key(pathstring): + newpath = eval(pathstring) + apache._path_cache[pathstring] = None + sys.path[:] = newpath + finally: + apache._path_cache_lock.release() + + # split module::function + l = name.split('::', 1) + module_name = l[0] + func_name = None + if len(l) != 1: + func_name = l[1] + + try: + # Setup transient per request modules cache. + # Note that this cache will always be thrown + # away when the module has been imported. + + _setup_request_modules_cache() + + # Import the module. + + module = import_module(module_name, log=debug) + + # Optionally call function within module. + + if func_name: + getattr(module, func_name)() + + finally: + + # Discard the modules cache entry. + + _cleanup_request_modules_cache() + +_callback.ImportDispatch = new.instancemethod( + ImportDispatch, _callback, apache.CallBack) + +def ReportError(self, etype, evalue, etb, conn=None, req=None, filter=None, + phase="N/A", hname="N/A", debug=0): + + try: + try: + + if str(etype) == "exceptions.IOError" \ + and str(evalue)[:5] == "Write": + + # If this is an I/O error while writing to + # client, it is probably better not to try to + # write to the cleint even if debug is on. + + # XXX Note that a failure to write back data in + # a response should be indicated by a special + # exception type which is caught here and not a + # generic I/O error as there could be false + # positives. See MODPYTHON-92. + + debug = 0 + + # Determine which log function we are going + # to use to output any messages. + + if filter and not req: + req = filter.req + + if req: + log_error = req.log_error + elif conn: + log_error = conn.log_error + else: + log_error = apache.main_server.log_error + + # Always log the details of any exception. + + pid = os.getpid() + iname = apache.interpreter + flags = apache.APLOG_NOERRNO|apache.APLOG_ERR + + text = "mod_python (pid=%d, interpreter=%s, " % (pid, `iname`) + text = text + "phase=%s, handler=%s)" % (`phase`, `hname`) + text = text + ": Application error" + + log_error(text, flags) + + if req: + location = None + directory = None + + context = req.hlist + + if context: + while context.parent != None: + context = context.parent + + location = context.location + directory = context.directory + + hostname = req.server.server_hostname + root = req.document_root() + + log_error('ServerName: %s' % `hostname`, flags) + log_error('DocumentRoot: %s' % `root`, flags) + log_error('URI: %s' % `req.uri`, flags) + log_error('Location: %s' % `location`, flags) + log_error('Directory: %s' % `directory`, flags) + log_error('Filename: %s' % `req.filename`, flags) + log_error('PathInfo: %s' % `req.path_info`, flags) + + tb = traceback.format_exception(etype, evalue, etb) + + for line in tb: + log_error(line[:-1], flags) + + if not debug or not req: + return apache.HTTP_INTERNAL_SERVER_ERROR + + output = StringIO.StringIO() + + req.status = apache.HTTP_INTERNAL_SERVER_ERROR + req.content_type = 'text/html' + + print >> output + print >> output, '<pre>' + print >> output, 'MOD_PYTHON ERROR' + print >> output + print >> output, 'ProcessId: %s' % pid + print >> output, 'Interpreter: %s' % `iname` + + if req: + print >> output + print >> output, 'ServerName: %s' % `hostname` + print >> output, 'DocumentRoot: %s' % `root` + print >> output + print >> output, 'URI: %s' % `req.uri` + print >> output, 'Location: %s' % `location` + print >> output, 'Directory: %s' % `directory` + print >> output, 'Filename: %s' % `req.filename` + print >> output, 'PathInfo: %s' % `req.path_info` + + print >> output + print >> output, 'Phase: %s' % `phase` + print >> output, 'Handler: %s' % cgi.escape(repr(hname)) + print >> output + + for line in tb: + print >> output, cgi.escape(line) + + modules = _get_request_modules_cache() + + if modules.ctime != 0: + accessed = time.asctime(time.localtime(modules.ctime)) + + print >> output + print >> output, 'MODULE CACHE DETAILS' + print >> output + print >> output, 'Accessed: %s' % accessed + print >> output, 'Generation: %s' % modules.generation + print >> output + + labels = {} + + keys = modules.keys() + for key in keys: + module = modules[key] + labels[module.__file__] = key + + keys = labels.keys() + keys.sort() + + for key in keys: + label = labels[key] + + module = modules[label] + + name = module.__name__ + filename = module.__file__ + + cache = module.__mp_info__.cache + + ctime = time.asctime(time.localtime(cache.ctime)) + mtime = time.asctime(time.localtime(cache.mtime)) + atime = time.asctime(time.localtime(cache.atime)) + + instance = cache.instance + generation = cache.generation + direct = cache.direct + indirect = cache.indirect + path = module.__mp_path__ + + print >> output, '%s {' % name + print >> output, ' FileName: %s' % `filename` + print >> output, ' Instance: %s' % instance, + if instance == 1 and (cache.reload or \ + generation > modules.generation): + print >> output, '[IMPORT]' + elif cache.reload or generation > modules.generation: + print >> output, '[RELOAD]' + else: + print >> output + print >> output, ' Generation: %s' % generation, + if cache.reload: + print >> output, '[ERROR]' + else: + print >> output + if cache.mtime: + print >> output, ' Modified: %s' % mtime + if cache.ctime: + print >> output, ' Imported: %s' % ctime + + if path: + text = ',\n '.join(map(repr, path)) + print >> output, ' ModulePath: %s' % text + + friends = [] + children = [] + + if cache.reload: + for child in module.__mp_info__.children: + entry = modules[child].__mp_info__.file + children.append(entry) + else: + for child in module.__mp_info__.cache.children: + entry = modules[child].__mp_info__.file + children.append(entry) + for child in module.__mp_info__.children: + if child not in module.__mp_info__.cache.children: + try: + entry = modules[child].__mp_info__.file + friends.append(entry) + except: + try: + entry = apache.module_info(child).file + friends.append(entry) + except: + pass + + children.sort() + friends.sort() + + if children: + text = ',\n '.join(map(repr, children)) + print >> output, ' Children: %s' % text + + if friends: + text = ',\n '.join(map(repr, friends)) + print >> output, ' Friends: %s' % text + + print >> output, '}' + print >> output + + print >> output, '</pre>' + + text = output.getvalue() + + if filter: + filter.write(text) + filter.flush() + else: + req.write(text) + + return apache.DONE + + except: + # When all else fails try and dump traceback + # directory standard error and flush it. + + traceback.print_exc() + sys.stderr.flush() + + finally: + etb = None + +_callback.ReportError = new.instancemethod( + ReportError, _callback, apache.CallBack) diff --git a/lib/python/mod_python/psp.py b/lib/python/mod_python/psp.py index 207f412541822cea8f555da132187129c4be5608..fa8a2d590cd36a7811e9abef86cd1b9671cbe1df 100644 --- a/lib/python/mod_python/psp.py +++ b/lib/python/mod_python/psp.py @@ -1,3 +1,4 @@ + # vim: set sw=4 expandtab : # # Copyright 2004 Apache Software Foundation # @@ -15,7 +16,7 @@ # # This file originally written by Sterling Hughes # - # $Id: psp.py 374268 2006-02-02 05:31:45Z nlehuen $ + # $Id: psp.py 472053 2006-11-07 10:11:01Z grahamd $ import apache, Session, util, _psp import _apache @@ -75,7 +76,14 @@ class PSPInterface: def apply_data(self, object): if not self.form: - self.form = util.FieldStorage(self.req, keep_blank_values=1) + if not hasattr(self.req, 'form'): + # no existing form, so need to create one, + # form has to be saved back to request object + # so that error page can access it if need be + self.form = util.FieldStorage(self.req, keep_blank_values=1) + self.req.form = self.form + else: + self.form = self.req.form return util.apply_fs_data(object, self.form, req=self.req) @@ -123,7 +131,11 @@ class PSP: def cache_get(self, filename, mtime): opts = self.req.get_options() - if opts.has_key("PSPDbmCache"): + if opts.has_key("mod_python.psp.cache_database_filename"): + self.dbmcache = opts["mod_python.psp.cache_database_filename"] + elif opts.has_key("PSPDbmCache"): + # For backwards compatability with versions + # of mod_python prior to 3.3. self.dbmcache = opts["PSPDbmCache"] if self.dbmcache: @@ -161,7 +173,7 @@ class PSP: filename = self.filename if not os.path.isfile(filename): - raise ValueError, "%s is not a file" % filename + raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND mtime = os.path.getmtime(filename) @@ -183,50 +195,73 @@ class PSP: self.code = code - def run(self, vars={}): + def run(self, vars={}, flush=0): code, req = self.code, self.req # does this code use session? session = None if "session" in code.co_names: - if hasattr(req, 'session'): - session = req.session - else: - session = Session.Session(req) + if not hasattr(req, 'session'): + # no existing session, so need to create one, + # session has to be saved back to request object + # to avoid deadlock if error page tries to use it + req.session = session = Session.Session(req) # does this code use form? form = None if "form" in code.co_names: - form = util.FieldStorage(req, keep_blank_values=1) + if not hasattr(req, 'form'): + # no existing form, so need to create one, + # form has to be saved back to request object + # so that error page can access it if need be + form = util.FieldStorage(req, keep_blank_values=1) + req.form = form + else: + form = req.form # create psp interface object psp = PSPInterface(req, self.filename, form) try: global_scope = globals().copy() - global_scope.update({"req":req, "session":session, - "form":form, "psp":psp}) + global_scope.update({"req":req, "form":form, "psp":psp}) + + # strictly speaking, session attribute only needs + # to be populated if referenced, but historically + # code has always populated it even if None, so + # preserve that just in case changing it breaks + # some users code + if hasattr(req, 'session'): + global_scope.update({"session":req.session}) + else: + global_scope.update({"session":None}) + global_scope.update(self.vars) # passed in __init__() global_scope.update(vars) # passed in run() try: exec code in global_scope - req.flush() + if flush: + req.flush() # the mere instantiation of a session changes it # (access time), so it *always* has to be saved - if session is not None: - session.save() + if hasattr(req, 'session'): + req.session.save() except: et, ev, etb = sys.exc_info() if psp.error_page: # run error page - psp.error_page.run({"exception": (et, ev, etb)}) + psp.error_page.run({"exception": (et, ev, etb)}, flush) else: raise et, ev, etb finally: + # if session was created here, unlock it and don't leave + # it behind in request object in unlocked state as it + # will just cause problems if then used by subsequent code if session is not None: - session.unlock() + session.unlock() + del req.session def __str__(self): self.req.content_type = 'text/html' diff --git a/lib/python/mod_python/publisher.py b/lib/python/mod_python/publisher.py index ed425e13059807bb0909793d0f28d97dc2336b06..d450e9a3482435ba8b5c5214e755346a9b2c6767 100644 --- a/lib/python/mod_python/publisher.py +++ b/lib/python/mod_python/publisher.py @@ -15,7 +15,7 @@ # # Originally developed by Gregory Trubetskoy. # - # $Id: publisher.py 374295 2006-02-02 07:59:26Z nlehuen $ + # $Id: publisher.py 468839 2006-10-29 07:07:21Z grahamd $ """ This handler is conceptually similar to Zope's ZPublisher, except @@ -213,7 +213,7 @@ def handler(req): published = publish_object(req, object) # we log a message if nothing was published, it helps with debugging - if (not published) and (req.bytes_sent==0) and (req.next is None): + if (not published) and (req._bytes_queued==0) and (req.next is None): log=int(req.get_config().get("PythonDebug", 0)) if log: req.log_error("mod_python.publisher: nothing to publish.") @@ -224,48 +224,45 @@ def process_auth(req, object, realm="unknown", user=None, passwd=None): found_auth, found_access = 0, 0 - # because ap_get_basic insists on making sure that AuthName and - # AuthType directives are specified and refuses to do anything - # otherwise (which is technically speaking a good thing), we - # have to do base64 decoding ourselves. - # - # to avoid needless header parsing, user and password are parsed - # once and the are received as arguments - if not user and req.headers_in.has_key("Authorization"): - try: - s = req.headers_in["Authorization"][6:] - s = base64.decodestring(s) - user, passwd = s.split(":", 1) - except: - raise apache.SERVER_RETURN, apache.HTTP_BAD_REQUEST - if hasattr(object, "__auth_realm__"): realm = object.__auth_realm__ - if type(object) is FunctionType: - # functions are a bit tricky - - if hasattr(object, "func_code"): - func_code = object.func_code + func_object = None - if "__auth__" in func_code.co_names: - i = list(func_code.co_names).index("__auth__") - __auth__ = func_code.co_consts[i+1] - if hasattr(__auth__, "co_name"): - __auth__ = new.function(__auth__, globals()) - found_auth = 1 + if type(object) is FunctionType: + func_object = object + elif type(object) == types.MethodType: + func_object = object.im_func - if "__access__" in func_code.co_names: - # first check the constant names - i = list(func_code.co_names).index("__access__") - __access__ = func_code.co_consts[i+1] - if hasattr(__access__, "co_name"): - __access__ = new.function(__access__, globals()) - found_access = 1 + if func_object: + # functions are a bit tricky - if "__auth_realm__" in func_code.co_names: - i = list(func_code.co_names).index("__auth_realm__") - realm = func_code.co_consts[i+1] + func_code = func_object.func_code + func_globals = func_object.func_globals + + def lookup(name): + i = None + if name in func_code.co_names: + i = list(func_code.co_names).index(name) + elif func_code.co_argcount < len(func_code.co_varnames): + names = func_code.co_varnames[func_code.co_argcount:] + if name in names: + i = list(names).index(name) + if i is not None: + return (1, func_code.co_consts[i+1]) + return (0, None) + + (found_auth, __auth__) = lookup('__auth__') + if found_auth and type(__auth__) == types.CodeType: + __auth__ = new.function(__auth__, func_globals) + + (found_access, __access__) = lookup('__access__') + if found_access and type(__access__) == types.CodeType: + __access__ = new.function(__access__, func_globals) + + (found_realm, __auth_realm__) = lookup('__auth_realm__') + if found_realm: + realm = __auth_realm__ else: if hasattr(object, "__auth__"): @@ -275,6 +272,22 @@ def process_auth(req, object, realm="unknown", user=None, passwd=None): __access__ = object.__access__ found_access = 1 + if found_auth or found_access: + # because ap_get_basic insists on making sure that AuthName and + # AuthType directives are specified and refuses to do anything + # otherwise (which is technically speaking a good thing), we + # have to do base64 decoding ourselves. + # + # to avoid needless header parsing, user and password are parsed + # once and the are received as arguments + if not user and req.headers_in.has_key("Authorization"): + try: + s = req.headers_in["Authorization"][6:] + s = base64.decodestring(s) + user, passwd = s.split(":", 1) + except: + raise apache.SERVER_RETURN, apache.HTTP_BAD_REQUEST + if found_auth: if not user: @@ -464,11 +477,14 @@ def publish_object(req, object): if charset is not None: req.content_type += '; charset=%s'%charset - # Write result even if req.method == 'HEAD' - # Apache will truncate the output if necessary. - # Truncating output here if req.method is HEAD is likely the - # wrong thing to do # as it may cause problems for any output filters. - # See MODPYTHON-105 for details. - req.write(result) + # Write result even if req.method is 'HEAD' as Apache + # will discard the final output anyway. Truncating + # output here if req.method is 'HEAD' is likely the + # wrong thing to do as it may cause problems for any + # output filters. See MODPYTHON-105 for details. We + # also do not flush output as that will prohibit use + # of 'CONTENT_LENGTH' filter to add 'Content-Length' + # header automatically. See MODPYTHON-107 for details. + req.write(result, 0) return True diff --git a/lib/python/mod_python/testhandler.py b/lib/python/mod_python/testhandler.py index 336bcdc3f841a3aaca398900b4867008e348b3be..d90e9a4b71d81798c4b5cc40cc504a0b602923f1 100644 --- a/lib/python/mod_python/testhandler.py +++ b/lib/python/mod_python/testhandler.py @@ -15,7 +15,7 @@ # # Originally developed by Gregory Trubetskoy. # - # $Id: testhandler.py 393438 2006-04-12 11:16:42Z grahamd $ + # $Id: testhandler.py 383262 2006-03-05 01:15:01Z grahamd $ """ diff --git a/lib/python/mod_python/util.py b/lib/python/mod_python/util.py index 6a2733679d50fb771c26f40964bd51c53a33c770..3586e7b9acf2db108bf002a30cb1051dcfacdbc9 100644 --- a/lib/python/mod_python/util.py +++ b/lib/python/mod_python/util.py @@ -1,22 +1,22 @@ - -# -# Copyright 2004 Apache Software Foundation -# -# Licensed under the Apache License, Version 2.0 (the "License"); you -# may not use this file except in compliance with the License. You -# may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. See the License for the specific language governing -# permissions and limitations under the License. -# -# Originally developed by Gregory Trubetskoy. -# -# $Id: util.py 417021 2006-06-25 14:40:44Z jgallacher $ + # vim: set sw=4 expandtab : + # + # Copyright 2004 Apache Software Foundation + # + # Licensed under the Apache License, Version 2.0 (the "License"); you + # may not use this file except in compliance with the License. You + # may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + # implied. See the License for the specific language governing + # permissions and limitations under the License. + # + # Originally developed by Gregory Trubetskoy. + # + # $Id: util.py 478129 2006-11-22 11:15:54Z grahamd $ import _apache import apache @@ -35,22 +35,41 @@ parse_qsl = _apache.parse_qsl readBlockSize = 65368 """ The classes below are a (almost) a drop-in replacement for the - standard cgi.py FieldStorage class. They should have pretty much the - same functionality. + standard cgi.py FieldStorage class. They should have pretty much the + same functionality. - These classes differ in that unlike cgi.FieldStorage, they are not - recursive. The class FieldStorage contains a list of instances of - Field class. Field class is incapable of storing anything in it. + These classes differ in that unlike cgi.FieldStorage, they are not + recursive. The class FieldStorage contains a list of instances of + Field class. Field class is incapable of storing anything in it. - These objects should be considerably faster than the ones in cgi.py - because they do not expect CGI environment, and are - optimized specifically for Apache and mod_python. + These objects should be considerably faster than the ones in cgi.py + because they do not expect CGI environment, and are + optimized specifically for Apache and mod_python. """ class Field: - def __init__(self, name, file, ctype, type_options, - disp, disp_options, headers = {}): - self.name = name + def __init__(self, name, *args, **kwargs): + self.name = name + + # Some third party packages such as Trac create + # instances of the Field object and insert it + # directly into the list of form fields. To + # maintain backward compatibility check for + # where more than just a field name is supplied + # and invoke an additional initialisation step + # to process the arguments. Ideally, third party + # code should use the add_field() method of the + # form, but if they need to maintain backward + # compatibility with older versions of mod_python + # they will not have a choice but to use old + # way of doing things and thus we need this code + # for the forseeable future to cope with that. + + if args or kwargs: + self.__bc_init__(*args, **kwargs) + + def __bc_init__(self, file, ctype, type_options, + disp, disp_options, headers = {}): self.file = file self.type = ctype self.type_options = type_options @@ -62,177 +81,283 @@ class Field: self.filename = None self.headers = headers - def __repr__(self): - """Return printable representation.""" - return "Field(%s, %s)" % (`self.name`, `self.value`) - - def __getattr__(self, name): - if name != 'value': - raise AttributeError, name - if self.file: - self.file.seek(0) - value = self.file.read() - self.file.seek(0) - else: - value = None - return value + def __repr__(self): + """Return printable representation.""" + return "Field(%s, %s)" % (`self.name`, `self.value`) - def __del__(self): - self.file.close() + def __getattr__(self, name): + if name != 'value': + raise AttributeError, name + if self.file: + self.file.seek(0) + value = self.file.read() + self.file.seek(0) + else: + value = None + return value + + def __del__(self): + self.file.close() class StringField(str): - """ This class is basically a string with - a value attribute for compatibility with std lib cgi.py - """ + """ This class is basically a string with + added attributes for compatibility with std lib cgi.py. Basically, this + works the opposite of Field, as it stores its data in a string, but creates + a file on demand. Field creates a value on demand and stores data in a file. + """ + filename = None + headers = {} + ctype = "text/plain" + type_options = {} + disposition = None + disp_options = None + + # I wanted __init__(name, value) but that does not work (apparently, you + # cannot subclass str with a constructor that takes >1 argument) + def __init__(self, value): + '''Create StringField instance. You'll have to set name yourself.''' + str.__init__(self, value) + self.value = value + + def __getattr__(self, name): + if name != 'file': + raise AttributeError, name + self.file = cStringIO.StringIO(self.value) + return self.file + + def __repr__(self): + """Return printable representation (to pass unit tests).""" + return "Field(%s, %s)" % (`self.name`, `self.value`) - def __init__(self, str=""): - str.__init__(self, str) - self.value = self.__str__() +class FieldList(list): -class FieldStorage: + def __init__(self): + self.__table = None + list.__init__(self) - def __init__(self, req, keep_blank_values=0, strict_parsing=0, file_callback=None, field_callback=None): - # - # Whenever readline is called ALWAYS use the max size EVEN when not expecting a long line. - # - this helps protect against malformed content from exhausting memory. - # + def table(self): + if self.__table is None: + self.__table = {} + for item in self: + if item.name in self.__table: + self.__table[item.name].append(item) + else: + self.__table[item.name] = [item] + return self.__table - self.list = [] + def __delitem__(self, *args): + self.__table = None + return list.__delitem__(self, *args) - # always process GET-style parameters - if req.args: - pairs = parse_qsl(req.args, keep_blank_values) - for pair in pairs: - file = cStringIO.StringIO(pair[1]) - self.list.append(Field(pair[0], file, "text/plain", {}, None, {})) + def __delslice__(self, *args): + self.__table = None + return list.__delslice__(self, *args) - if req.method != "POST": - return + def __iadd__(self, *args): + self.__table = None + return list.__iadd__(self, *args) - try: - clen = int(req.headers_in["content-length"]) - except (KeyError, ValueError): - # absent content-length is not acceptable - raise apache.SERVER_RETURN, apache.HTTP_LENGTH_REQUIRED + def __imul__(self, *args): + self.__table = None + return list.__imul__(self, *args) - if not req.headers_in.has_key("content-type"): - ctype = "application/x-www-form-urlencoded" - else: - ctype = req.headers_in["content-type"] - - if ctype.startswith("application/x-www-form-urlencoded"): - pairs = parse_qsl(req.read(clen), keep_blank_values) - for pair in pairs: - # TODO : isn't this a bit heavyweight just for form fields ? - file = cStringIO.StringIO(pair[1]) - self.list.append(Field(pair[0], file, "text/plain", {}, None, {})) - return - - if not ctype.startswith("multipart/"): - # we don't understand this content-type - raise apache.SERVER_RETURN, apache.HTTP_NOT_IMPLEMENTED - - # figure out boundary - try: - i = ctype.lower().rindex("boundary=") - boundary = ctype[i+9:] - if len(boundary) >= 2 and boundary[0] == boundary[-1] == '"': - boundary = boundary[1:-1] - boundary = re.compile("--" + re.escape(boundary) + "(--)?\r?\n") - - except ValueError: - raise apache.SERVER_RETURN, apache.HTTP_BAD_REQUEST - - # read until boundary - self.read_to_boundary(req, boundary, None) - - end_of_stream = False - while not end_of_stream: - ## parse headers - - ctype, type_options = "text/plain", {} - disp, disp_options = None, {} - headers = apache.make_table() - - line = req.readline(readBlockSize) - match = boundary.match(line) - if (not line) or match: - # we stop if we reached the end of the stream or a stop boundary - # (which means '--' after the boundary) - # we continue to the next part if we reached a simple boundary - # in either case this would mean the entity is malformed, but we're - # tolerating it anyway. - end_of_stream = (not line) or (match.group(1) is not None) - continue - - skip_this_part = False - while line not in ('\r','\r\n'): - # we read the headers until we reach an empty line - # NOTE : a single \n would mean the entity is malformed, but - # we're tolerating it anyway - h, v = line.split(":", 1) - headers.add(h, v) - h = h.lower() - if h == "content-disposition": - disp, disp_options = parse_header(v) - elif h == "content-type": - ctype, type_options = parse_header(v) - # - # NOTE: FIX up binary rubbish sent as content type - # from Microsoft IE 6.0 when sending a file which - # does not have a suffix. - # - if ctype.find('/') == -1: - ctype = 'application/octet-stream' + def __setitem__(self, *args): + self.__table = None + return list.__setitem__(self, *args) + + def __setslice__(self, *args): + self.__table = None + return list.__setslice__(self, *args) + + def append(self, *args): + self.__table = None + return list.append(self, *args) + + def extend(self, *args): + self.__table = None + return list.extend(self, *args) + + def insert(self, *args): + self.__table = None + return list.insert(self, *args) + + def pop(self, *args): + self.__table = None + return list.pop(self, *args) + + def remove(self, *args): + self.__table = None + return list.remove(self, *args) + + +class FieldStorage: + + def __init__(self, req, keep_blank_values=0, strict_parsing=0, file_callback=None, field_callback=None): + # + # Whenever readline is called ALWAYS use the max size EVEN when + # not expecting a long line. - this helps protect against + # malformed content from exhausting memory. + # + + self.list = FieldList() + + # always process GET-style parameters + if req.args: + pairs = parse_qsl(req.args, keep_blank_values) + for pair in pairs: + self.add_field(pair[0], pair[1]) + + if req.method != "POST": + return + + try: + clen = int(req.headers_in["content-length"]) + except (KeyError, ValueError): + # absent content-length is not acceptable + raise apache.SERVER_RETURN, apache.HTTP_LENGTH_REQUIRED + + if not req.headers_in.has_key("content-type"): + ctype = "application/x-www-form-urlencoded" + else: + ctype = req.headers_in["content-type"] + + if ctype.startswith("application/x-www-form-urlencoded"): + pairs = parse_qsl(req.read(clen), keep_blank_values) + for pair in pairs: + self.add_field(pair[0], pair[1]) + return + + if not ctype.startswith("multipart/"): + # we don't understand this content-type + raise apache.SERVER_RETURN, apache.HTTP_NOT_IMPLEMENTED + + # figure out boundary + try: + i = ctype.lower().rindex("boundary=") + boundary = ctype[i+9:] + if len(boundary) >= 2 and boundary[0] == boundary[-1] == '"': + boundary = boundary[1:-1] + boundary = re.compile("--" + re.escape(boundary) + "(--)?\r?\n") + + except ValueError: + raise apache.SERVER_RETURN, apache.HTTP_BAD_REQUEST + + # read until boundary + self.read_to_boundary(req, boundary, None) + + end_of_stream = False + while not end_of_stream: # jjj JIM BEGIN WHILE + ## parse headers + + ctype, type_options = "text/plain", {} + disp, disp_options = None, {} + headers = apache.make_table() + + line = req.readline(readBlockSize) + match = boundary.match(line) + if (not line) or match: + # we stop if we reached the end of the stream or a stop + # boundary (which means '--' after the boundary) we + # continue to the next part if we reached a simple + # boundary in either case this would mean the entity is + # malformed, but we're tolerating it anyway. + end_of_stream = (not line) or (match.group(1) is not None) + continue + + skip_this_part = False + while line not in ('\r','\r\n'): + nextline = req.readline(readBlockSize) + while nextline and nextline[0] in [ ' ', '\t']: + line = line + nextline + nextline = req.readline(readBlockSize) + # we read the headers until we reach an empty line + # NOTE : a single \n would mean the entity is malformed, but + # we're tolerating it anyway + h, v = line.split(":", 1) + headers.add(h, v) + h = h.lower() + if h == "content-disposition": + disp, disp_options = parse_header(v) + elif h == "content-type": + ctype, type_options = parse_header(v) + # + # NOTE: FIX up binary rubbish sent as content type + # from Microsoft IE 6.0 when sending a file which + # does not have a suffix. + # + if ctype.find('/') == -1: + ctype = 'application/octet-stream' - line = req.readline(readBlockSize) - match = boundary.match(line) - if (not line) or match: - # we stop if we reached the end of the stream or a stop boundary - # (which means '--' after the boundary) - # we continue to the next part if we reached a simple boundary - # in either case this would mean the entity is malformed, but we're - # tolerating it anyway. - skip_this_part = True - end_of_stream = (not line) or (match.group(1) is not None) - break + line = nextline + match = boundary.match(line) + if (not line) or match: + # we stop if we reached the end of the stream or a + # stop boundary (which means '--' after the + # boundary) we continue to the next part if we + # reached a simple boundary in either case this + # would mean the entity is malformed, but we're + # tolerating it anyway. + skip_this_part = True + end_of_stream = (not line) or (match.group(1) is not None) + break - if skip_this_part: - continue + if skip_this_part: + continue - if disp_options.has_key("name"): - name = disp_options["name"] - else: - name = None - - # is this a file? - if disp_options.has_key("filename"): - if file_callback and callable(file_callback): - file = file_callback(disp_options["filename"]) - else: - file = self.make_file() - else: - if field_callback and callable(field_callback): - file = field_callback() - else: - file = self.make_field() - - # read it in - end_of_stream = self.read_to_boundary(req, boundary, file) - file.seek(0) - - # make a Field - field = Field(name, file, ctype, type_options, disp, disp_options, headers) - - self.list.append(field) - - def make_file(self): - return tempfile.TemporaryFile("w+b") - - def make_field(self): - return cStringIO.StringIO() - - def read_to_boundary(self, req, boundary, file): + if disp_options.has_key("name"): + name = disp_options["name"] + else: + name = None + + # create a file object + # is this a file? + if disp_options.has_key("filename"): + if file_callback and callable(file_callback): + file = file_callback(disp_options["filename"]) + else: + file = tempfile.TemporaryFile("w+b") + else: + if field_callback and callable(field_callback): + file = field_callback() + else: + file = cStringIO.StringIO() + + # read it in + self.read_to_boundary(req, boundary, file) + file.seek(0) + + # make a Field + if disp_options.has_key("filename"): + field = Field(name) + field.filename = disp_options["filename"] + else: + field = StringField(file.read()) + field.name = name + field.file = file + field.type = ctype + field.type_options = type_options + field.disposition = disp + field.disposition_options = disp_options + field.headers = headers + self.list.append(field) + + def add_field(self, key, value): + """Insert a field as key/value pair""" + item = StringField(value) + item.name = key + self.list.append(item) + + def __setitem__(self, key, value): + table = self.list.table() + if table.has_key(key): + items = table[key] + for item in items: + self.list.remove(item) + item = StringField(value) + item.name = key + self.list.append(item) + + def read_to_boundary(self, req, boundary, file): previous_delimiter = None while True: line = req.readline(readBlockSize) @@ -262,8 +387,8 @@ class FieldStorage: elif line[-1:] == '\r': # the line ends with \r, which is only possible if # readBlockSize bytes have been read. In that case the - # \r COULD be part of the next boundary, so we save it for the next - # iteration + # \r COULD be part of the next boundary, so we save it + # for the next iteration assert len(line) == readBlockSize if file is not None: if previous_delimiter is not None: file.write(previous_delimiter) @@ -281,182 +406,172 @@ class FieldStorage: file.write(line) previous_delimiter = None - def __getitem__(self, key): - """Dictionary style indexing.""" - if self.list is None: - raise TypeError, "not indexable" - found = [] - for item in self.list: - if item.name == key: - if isinstance(item.file, FileType) or \ - isinstance(getattr(item.file, 'file', None), FileType): - found.append(item) - else: - found.append(StringField(item.value)) - if not found: - raise KeyError, key - if len(found) == 1: - return found[0] - else: - return found - - def get(self, key, default): - try: - return self.__getitem__(key) - except KeyError: - return default - - def keys(self): - """Dictionary style keys() method.""" - if self.list is None: - raise TypeError, "not indexable" - keys = [] - for item in self.list: - if item.name not in keys: keys.append(item.name) - return keys - - def has_key(self, key): - """Dictionary style has_key() method.""" - if self.list is None: - raise TypeError, "not indexable" - for item in self.list: - if item.name == key: return 1 - return 0 - - __contains__ = has_key - - def __len__(self): - """Dictionary style len(x) support.""" - return len(self.keys()) - - def getfirst(self, key, default=None): - """ return the first value received """ - for item in self.list: - if item.name == key: - if isinstance(item.file, FileType) or \ - isinstance(getattr(item.file, 'file', None), FileType): - return item - else: - return StringField(item.value) - return default - - def getlist(self, key): - """ return a list of received values """ - if self.list is None: - raise TypeError, "not indexable" - found = [] - for item in self.list: - if item.name == key: - if isinstance(item.file, FileType) or \ - isinstance(getattr(item.file, 'file', None), FileType): - found.append(item) - else: - found.append(StringField(item.value)) - return found + def __getitem__(self, key): + """Dictionary style indexing.""" + found = self.list.table()[key] + if len(found) == 1: + return found[0] + else: + return found + + def get(self, key, default): + try: + return self.__getitem__(key) + except (TypeError, KeyError): + return default + + def keys(self): + """Dictionary style keys() method.""" + return self.list.table().keys() + + def __iter__(self): + return iter(self.keys()) + + def __repr__(self): + return repr(self.list.table()) + + def has_key(self, key): + """Dictionary style has_key() method.""" + return (key in self.list.table()) + + __contains__ = has_key + + def __len__(self): + """Dictionary style len(x) support.""" + return len(self.list.table()) + + def getfirst(self, key, default=None): + """ return the first value received """ + try: + return self.list.table()[key][0] + except KeyError: + return default + + def getlist(self, key): + """ return a list of received values """ + try: + return self.list.table()[key] + except KeyError: + return [] + + def items(self): + """Dictionary-style items(), except that items are returned in the same + order as they were supplied in the form.""" + return [(item.name, item) for item in self.list] + + def __delitem__(self, key): + table = self.list.table() + values = table[key] + for value in values: + self.list.remove(value) + + def clear(self): + self.list = FieldList() + def parse_header(line): - """Parse a Content-type like header. - - Return the main content-type and a dictionary of options. - - """ - - plist = map(lambda a: a.strip(), line.split(';')) - key = plist[0].lower() - del plist[0] - pdict = {} - for p in plist: - i = p.find('=') - if i >= 0: - name = p[:i].strip().lower() - value = p[i+1:].strip() - if len(value) >= 2 and value[0] == value[-1] == '"': - value = value[1:-1] - pdict[name] = value - return key, pdict + """Parse a Content-type like header. + + Return the main content-type and a dictionary of options. + + """ + + plist = map(lambda a: a.strip(), line.split(';')) + key = plist[0].lower() + del plist[0] + pdict = {} + for p in plist: + i = p.find('=') + if i >= 0: + name = p[:i].strip().lower() + value = p[i+1:].strip() + if len(value) >= 2 and value[0] == value[-1] == '"': + value = value[1:-1] + pdict[name] = value + return key, pdict def apply_fs_data(object, fs, **args): - """ - Apply FieldStorage data to an object - the object must be - callable. Examine the args, and match then with fs data, - then call the object, return the result. - """ - - # we need to weed out unexpected keyword arguments - # and for that we need to get a list of them. There - # are a few options for callable objects here: - - fc = None - expected = [] - if hasattr(object, "func_code"): - # function - fc = object.func_code - expected = fc.co_varnames[0:fc.co_argcount] - elif hasattr(object, 'im_func'): - # method - fc = object.im_func.func_code - expected = fc.co_varnames[1:fc.co_argcount] - elif type(object) in (TypeType,ClassType): - # class - fc = object.__init__.im_func.func_code - expected = fc.co_varnames[1:fc.co_argcount] - elif type(object) is BuiltinFunctionType: - # builtin - fc = None - expected = [] - elif hasattr(object, '__call__'): - # callable object - if type(object.__call__) is MethodType: - fc = object.__call__.im_func.func_code - expected = fc.co_varnames[1:fc.co_argcount] - else: - # abuse of objects to create hierarchy - return apply_fs_data(object.__call__, fs, **args) - - # add form data to args - for field in fs.list: - if field.filename: - val = field - else: - val = field.value - args.setdefault(field.name, []).append(val) - - # replace lists with single values - for arg in args: - if ((type(args[arg]) is ListType) and - (len(args[arg]) == 1)): - args[arg] = args[arg][0] - - # remove unexpected args unless co_flags & 0x08, - # meaning function accepts **kw syntax - if fc is None: - args = {} - elif not (fc.co_flags & 0x08): - for name in args.keys(): - if name not in expected: - del args[name] - - return object(**args) + """ + Apply FieldStorage data to an object - the object must be + callable. Examine the args, and match then with fs data, + then call the object, return the result. + """ + + # we need to weed out unexpected keyword arguments + # and for that we need to get a list of them. There + # are a few options for callable objects here: + + fc = None + expected = [] + if hasattr(object, "func_code"): + # function + fc = object.func_code + expected = fc.co_varnames[0:fc.co_argcount] + elif hasattr(object, 'im_func'): + # method + fc = object.im_func.func_code + expected = fc.co_varnames[1:fc.co_argcount] + elif type(object) in (TypeType,ClassType): + # class + fc = object.__init__.im_func.func_code + expected = fc.co_varnames[1:fc.co_argcount] + elif type(object) is BuiltinFunctionType: + # builtin + fc = None + expected = [] + elif hasattr(object, '__call__'): + # callable object + if type(object.__call__) is MethodType: + fc = object.__call__.im_func.func_code + expected = fc.co_varnames[1:fc.co_argcount] + else: + # abuse of objects to create hierarchy + return apply_fs_data(object.__call__, fs, **args) + + # add form data to args + for field in fs.list: + if field.filename: + val = field + else: + val = field.value + args.setdefault(field.name, []).append(val) + + # replace lists with single values + for arg in args: + if ((type(args[arg]) is ListType) and + (len(args[arg]) == 1)): + args[arg] = args[arg][0] + + # remove unexpected args unless co_flags & 0x08, + # meaning function accepts **kw syntax + if fc is None: + args = {} + elif not (fc.co_flags & 0x08): + for name in args.keys(): + if name not in expected: + del args[name] + + return object(**args) def redirect(req, location, permanent=0, text=None): - """ - A convenience function to provide redirection - """ + """ + A convenience function to provide redirection + """ - if req.sent_bodyct: - raise IOError, "Cannot redirect after headers have already been sent." + if req.sent_bodyct: + raise IOError, "Cannot redirect after headers have already been sent." - req.err_headers_out["Location"] = location - if permanent: - req.status = apache.HTTP_MOVED_PERMANENTLY - else: - req.status = apache.HTTP_MOVED_TEMPORARILY + req.err_headers_out["Location"] = location + if permanent: + req.status = apache.HTTP_MOVED_PERMANENTLY + else: + req.status = apache.HTTP_MOVED_TEMPORARILY - if text is None: - req.write('<p>The document has moved' + if text is None: + req.write('<p>The document has moved' ' <a href="%s">here</a></p>\n' % location) - else: - req.write(text) + else: + req.write(text) - raise apache.SERVER_RETURN, apache.OK + raise apache.SERVER_RETURN, apache.DONE diff --git a/src/Makefile.in b/src/Makefile.in index b99caeb39bac7028be57f0fa33455fe0a5a8643c..004231662419fccc711caccfcf655aa8cd0f500a 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -30,7 +30,8 @@ CFLAGS=$(OPT) $(INCLUDES) srcdir=. SRCS= mod_python.c _apachemodule.c requestobject.c tableobject.c util.c \ - serverobject.c connobject.c filterobject.c hlist.c hlistobject.c + serverobject.c connobject.c filterobject.c hlist.c \ + hlistobject.c finfoobject.c all: @ALL@ diff --git a/src/_apachemodule.c b/src/_apachemodule.c index 952519ff167415b7f9b9945ee8fee4efd67a4a9e..d99e88c198722c2e2361ba76296d7c18df91bc39 100644 --- a/src/_apachemodule.c +++ b/src/_apachemodule.c @@ -18,7 +18,7 @@ * * _apachemodule.c * - * $Id: _apachemodule.c 420297 2006-07-09 13:53:06Z nlehuen $ + * $Id: _apachemodule.c 478403 2006-11-23 00:08:36Z grahamd $ * */ @@ -89,6 +89,7 @@ static PyObject *parse_qs(PyObject *self, PyObject *args) return NULL; /* error */ /* split query string by '&' and ';' into a list of pairs */ + /* PYTHON 2.5: 'PyList_New' uses Py_ssize_t for input parameters */ pairs = PyList_New(0); if (pairs == NULL) return NULL; @@ -102,6 +103,7 @@ static PyObject *parse_qs(PyObject *self, PyObject *args) char *cpair; int j = 0; + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ pair = PyString_FromStringAndSize(NULL, len); if (pair == NULL) return NULL; @@ -116,6 +118,7 @@ static PyObject *parse_qs(PyObject *self, PyObject *args) } if (j) { + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ _PyString_Resize(&pair, j); if (pair) PyList_Append(pairs, pair); @@ -134,6 +137,7 @@ static PyObject *parse_qs(PyObject *self, PyObject *args) if (dict == NULL) return NULL; + /* PYTHON 2.5: 'PyList_Size' uses Py_ssize_t for input parameters */ lsize = PyList_Size(pairs); n = 0; @@ -147,9 +151,11 @@ static PyObject *parse_qs(PyObject *self, PyObject *args) cpair = PyString_AS_STRING(pair); len = strlen(cpair); + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ key = PyString_FromStringAndSize(NULL, len); if (key == NULL) return NULL; + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ val = PyString_FromStringAndSize(NULL, len); if (val == NULL) return NULL; @@ -184,7 +190,9 @@ static PyObject *parse_qs(PyObject *self, PyObject *args) ap_unescape_url(ckey); ap_unescape_url(cval); + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ _PyString_Resize(&key, strlen(ckey)); + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ _PyString_Resize(&val, strlen(cval)); if (key && val) { @@ -237,6 +245,7 @@ static PyObject *parse_qsl(PyObject *self, PyObject *args) return NULL; /* error */ /* split query string by '&' and ';' into a list of pairs */ + /* PYTHON 2.5: 'PyList_New' uses Py_ssize_t for input parameters */ pairs = PyList_New(0); if (pairs == NULL) return NULL; @@ -250,6 +259,7 @@ static PyObject *parse_qsl(PyObject *self, PyObject *args) char *cpair, *ckey, *cval; int plen, j, p, k, v; + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ pair = PyString_FromStringAndSize(NULL, len); if (pair == NULL) return NULL; @@ -271,14 +281,17 @@ static PyObject *parse_qsl(PyObject *self, PyObject *args) } cpair[j] = '\0'; + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ _PyString_Resize(&pair, j); cpair = PyString_AS_STRING(pair); /* split the "abc=def" pair */ plen = strlen(cpair); + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ key = PyString_FromStringAndSize(NULL, plen); if (key == NULL) return NULL; + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ val = PyString_FromStringAndSize(NULL, plen); if (val == NULL) return NULL; @@ -312,7 +325,9 @@ static PyObject *parse_qsl(PyObject *self, PyObject *args) ap_unescape_url(ckey); ap_unescape_url(cval); + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ _PyString_Resize(&key, strlen(ckey)); + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ _PyString_Resize(&val, strlen(cval)); if (key && val) { @@ -486,21 +501,27 @@ static PyObject *_global_trylock(PyObject *self, PyObject *args) index = (hash % (glb->nlocks-1)+1); } -// ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, -// "_global_trylock at index %d from pid %d", index, getpid()); + /* + * ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, + * "_global_trylock at index %d from pid %d", index, getpid()); + */ Py_BEGIN_ALLOW_THREADS rv = apr_global_mutex_trylock(glb->g_locks[index]); Py_END_ALLOW_THREADS if (rv == APR_SUCCESS) { -// ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, -// "_global_trylock DONE at index %d from pid %d", index, getpid()); + /* + * ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, + * "_global_trylock DONE at index %d from pid %d", index, getpid()); + */ Py_INCREF(Py_True); return Py_True; } else if(APR_STATUS_IS_EBUSY(rv)) { -// ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, -// "_global_trylock BUSY at index %d from pid %d", index, getpid()); + /* + * ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, + * "_global_trylock BUSY at index %d from pid %d", index, getpid()); + */ Py_INCREF(Py_False); return Py_False; } @@ -682,6 +703,42 @@ static PyObject *exists_config_define(PyObject *self, PyObject *args) } } +/** + ** mp_stat(fname, wanted) + ** + * Wrapper for apr_stat(). + */ + +static PyObject *mp_stat(PyObject *self, PyObject *args) +{ + char *fname = NULL; + apr_int32_t wanted = 0; + finfoobject* finfo; + apr_status_t result; + + if (! PyArg_ParseTuple(args, "si", &fname, &wanted)) + return NULL; + + finfo = (finfoobject *)MpFinfo_New(); + + fname = apr_pstrdup(finfo->pool, fname); + + result = apr_stat(finfo->finfo, fname, wanted, finfo->pool); + + if (result == APR_INCOMPLETE || result == APR_SUCCESS) + return (PyObject *)finfo; + + if (result == APR_ENOENT) + return (PyObject *)finfo; + + Py_DECREF(finfo); + + PyErr_SetObject(PyExc_OSError, + Py_BuildValue("is", result, "apr_stat() failed")); + + return NULL; +} + /* methods of _apache */ struct PyMethodDef _apache_module_methods[] = { {"config_tree", (PyCFunction)config_tree, METH_NOARGS}, @@ -692,6 +749,7 @@ struct PyMethodDef _apache_module_methods[] = { {"server_root", (PyCFunction)server_root, METH_NOARGS}, {"register_cleanup", (PyCFunction)register_cleanup, METH_VARARGS}, {"exists_config_define", (PyCFunction)exists_config_define, METH_VARARGS}, + {"stat", (PyCFunction)mp_stat, METH_VARARGS}, {"_global_lock", (PyCFunction)_global_lock, METH_VARARGS}, {"_global_trylock", (PyCFunction)_global_trylock, METH_VARARGS}, {"_global_unlock", (PyCFunction)_global_unlock, METH_VARARGS}, @@ -702,7 +760,7 @@ struct PyMethodDef _apache_module_methods[] = { DL_EXPORT(void) init_apache() { - PyObject *m, *d; + PyObject *m, *d, *o; /* initialize types XXX break windows? */ MpTable_Type.ob_type = &PyType_Type; @@ -722,6 +780,43 @@ DL_EXPORT(void) init_apache() PyDict_SetItemString(d, "table", (PyObject *)&MpTable_Type); + o = PyInt_FromLong(AP_CONN_UNKNOWN); + PyDict_SetItemString(d, "AP_CONN_UNKNOWN", o); + Py_DECREF(o); + o = PyInt_FromLong(AP_CONN_CLOSE); + PyDict_SetItemString(d, "AP_CONN_CLOSE", o); + Py_DECREF(o); + o = PyInt_FromLong(AP_CONN_KEEPALIVE); + PyDict_SetItemString(d, "AP_CONN_KEEPALIVE", o); + Py_DECREF(o); + + o = PyInt_FromLong(APR_NOFILE); + PyDict_SetItemString(d, "APR_NOFILE", o); + Py_DECREF(o); + o = PyInt_FromLong(APR_REG); + PyDict_SetItemString(d, "APR_REG", o); + Py_DECREF(o); + o = PyInt_FromLong(APR_DIR); + PyDict_SetItemString(d, "APR_DIR", o); + Py_DECREF(o); + o = PyInt_FromLong(APR_CHR); + PyDict_SetItemString(d, "APR_CHR", o); + Py_DECREF(o); + o = PyInt_FromLong(APR_BLK); + PyDict_SetItemString(d, "APR_BLK", o); + Py_DECREF(o); + o = PyInt_FromLong(APR_PIPE); + PyDict_SetItemString(d, "APR_PIPE", o); + Py_DECREF(o); + o = PyInt_FromLong(APR_LNK); + PyDict_SetItemString(d, "APR_LNK", o); + Py_DECREF(o); + o = PyInt_FromLong(APR_SOCK); + PyDict_SetItemString(d, "APR_SOCK", o); + Py_DECREF(o); + o = PyInt_FromLong(APR_UNKFILE); + PyDict_SetItemString(d, "APR_UNKFILE", o); + Py_DECREF(o); } PyObject *get_ServerReturn() diff --git a/src/_pspmodule.c b/src/_pspmodule.c index 7021eafd53384b790b527f743c7d0a49197138b6..3e8cf95f819be4e68dc0238d3fc18f38813af280 100644 --- a/src/_pspmodule.c +++ b/src/_pspmodule.c @@ -15,7 +15,7 @@ * * This file originally written by Stering Hughes * - * $Id: _pspmodule.c 164956 2005-04-27 07:32:02Z nlehuen $ + * $Id: _pspmodule.c 431636 2006-08-15 16:22:19Z jgallacher $ * * See accompanying documentation and source code comments for * details. @@ -152,7 +152,12 @@ static PyObject * _psp_module_parsestring(PyObject *self, PyObject *argv) psp_string_0(&parser->pycode); Py_END_ALLOW_THREADS - code = PyString_FromString(parser->pycode.blob); + if (parser->pycode.blob) { + code = PyString_FromString(parser->pycode.blob); + } + else { + code = PyString_FromString(""); + } psp_parser_cleanup(parser); diff --git a/src/connobject.c b/src/connobject.c index ce25726302b42fb1702ee069802634b3abcb7450..28258f6a7412a36efb26f765784402e3db9434a3 100644 --- a/src/connobject.c +++ b/src/connobject.c @@ -18,7 +18,7 @@ * * connobject.c * - * $Id: connobject.c 383365 2006-03-05 18:40:22Z jgallacher $ + * $Id: connobject.c 481717 2006-12-03 04:36:37Z grahamd $ * */ @@ -46,7 +46,6 @@ PyObject * MpConn_FromConn(conn_rec *c) return PyErr_NoMemory(); result->conn = c; - result->server = NULL; result->base_server = NULL; result->notes = MpTable_FromTable(c->notes); result->hlo = NULL; @@ -54,6 +53,36 @@ PyObject * MpConn_FromConn(conn_rec *c) return (PyObject *)result; } +/** + ** conn.log_error(conn self, string message, int level) + ** + * calls ap_log_cerror + */ + +static PyObject * conn_log_error(connobject *self, PyObject *args) +{ + int level = 0; + char *message = NULL; + + if (! PyArg_ParseTuple(args, "z|i", &message, &level)) + return NULL; /* error */ + + if (message) { + + if (! level) + level = APLOG_NOERRNO|APLOG_ERR; + +#if AP_MODULE_MAGIC_AT_LEAST(20020903,10) + ap_log_cerror(APLOG_MARK, level, 0, self->conn, "%s", message); +#else + ap_log_error(APLOG_MARK, level, 0, self->conn->base_server, "%s", message); +#endif + } + + Py_INCREF(Py_None); + return Py_None; +} + /** ** conn.read(conn self, int bytes) ** @@ -98,6 +127,7 @@ static PyObject * _conn_read(conn_rec *c, ap_input_mode_t mode, long len) return Py_None; } + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ result = PyString_FromStringAndSize(NULL, bufsize); /* possibly no more memory */ @@ -135,6 +165,7 @@ static PyObject * _conn_read(conn_rec *c, ap_input_mode_t mode, long len) /* time to grow destination string? */ if (len == 0 && bytes_read == bufsize) { + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ _PyString_Resize(&result, bufsize + HUGE_STRING_LEN); buffer = PyString_AS_STRING((PyStringObject *) result); buffer += bufsize; @@ -154,6 +185,7 @@ static PyObject * _conn_read(conn_rec *c, ap_input_mode_t mode, long len) /* resize if necessary */ if (bytes_read < len || len == 0) + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ if(_PyString_Resize(&result, bytes_read)) return NULL; @@ -217,6 +249,7 @@ static PyObject * conn_write(connobject *self, PyObject *args) return NULL; } + /* PYTHON 2.5: 'PyString_Size' uses Py_ssize_t for return values (may need overflow check) */ len = PyString_Size(s); if (len) { @@ -239,6 +272,7 @@ static PyObject * conn_write(connobject *self, PyObject *args) } static PyMethodDef connobjectmethods[] = { + {"log_error", (PyCFunction) conn_log_error, METH_VARARGS}, {"read", (PyCFunction) conn_read, METH_VARARGS}, {"readline", (PyCFunction) conn_readline, METH_VARARGS}, {"write", (PyCFunction) conn_write, METH_VARARGS}, @@ -279,7 +313,6 @@ static struct memberlist conn_memberlist[] = { static void conn_dealloc(connobject *self) { - Py_XDECREF(self->server); Py_XDECREF(self->base_server); Py_XDECREF(self->notes); Py_XDECREF(self->hlo); @@ -392,6 +425,9 @@ static PyObject * conn_getattr(connobject *self, char *name) Py_INCREF(self->hlo); return (PyObject *)self->hlo; } + else if (strcmp(name, "_conn_rec") == 0) { + return PyCObject_FromVoidPtr(self->conn, 0); + } else return PyMember_Get((char *)self->conn, conn_memberlist, name); diff --git a/src/filterobject.c b/src/filterobject.c index cb8a20b438cae8766831dba0b1964226d823f601..dca6d76fee5f3f16b45755bf677760c39998590e 100644 --- a/src/filterobject.c +++ b/src/filterobject.c @@ -18,7 +18,7 @@ * * filterobject.c * - * $Id: filterobject.c 383365 2006-03-05 18:40:22Z jgallacher $ + * $Id: filterobject.c 466105 2006-10-20 13:28:02Z jgallacher $ * * See accompanying documentation and source code comments * for details. @@ -75,7 +75,8 @@ PyObject *MpFilter_FromFilter(ap_filter_t *f, apr_bucket_brigade *bb, int is_input, ap_input_mode_t mode, apr_size_t readbytes, - char * handler, char *dir) + char *handler, PyObject *callable, char *dir, + hl_entry *parent) { filterobject *result; @@ -105,7 +106,9 @@ PyObject *MpFilter_FromFilter(ap_filter_t *f, apr_bucket_brigade *bb, int is_inp result->softspace = 0; result->handler = handler; + result->callable = callable; result->dir = dir; + result->parent = parent; result->request_obj = NULL; @@ -202,6 +205,7 @@ static PyObject *_filter_read(filterobject *self, PyObject *args, int readline) } bufsize = len < 0 ? HUGE_STRING_LEN : len; + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ result = PyString_FromStringAndSize(NULL, bufsize); /* possibly no more memory */ @@ -257,6 +261,7 @@ static PyObject *_filter_read(filterobject *self, PyObject *args, int readline) /* time to grow destination string? */ if (newline == 0 && len < 0 && bytes_read == bufsize) { + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ _PyString_Resize(&result, bufsize + HUGE_STRING_LEN); buffer = PyString_AS_STRING((PyStringObject *) result); buffer += bytes_read; @@ -296,6 +301,7 @@ static PyObject *_filter_read(filterobject *self, PyObject *args, int readline) /* resize if necessary */ if (bytes_read < len || len < 0) + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ if(_PyString_Resize(&result, bytes_read)) return NULL; @@ -352,7 +358,8 @@ static PyObject *filter_write(filterobject *self, PyObject *args) PyErr_SetString(PyExc_ValueError, "I/O operation on closed filter"); return NULL; } - + + /* PYTHON 2.5: 'PyString_Size' uses Py_ssize_t for return values (may need overflow check) */ len = PyString_Size(s); if (len) { @@ -492,7 +499,6 @@ static struct memberlist filter_memberlist[] = { {"name", T_OBJECT, 0, RO}, {"req", T_OBJECT, OFF(request_obj), }, {"is_input", T_INT, OFF(is_input), RO}, - {"handler", T_STRING, OFF(handler), RO}, {"dir", T_STRING, OFF(dir), RO}, {NULL} /* Sentinel */ }; @@ -548,6 +554,27 @@ static PyObject * filter_getattr(filterobject *self, char *name) return (PyObject *)self->request_obj; } } + else if (strcmp(name, "handler") == 0) { + if (self->callable) { + Py_INCREF(self->callable); + return self->callable; + } else if (self->handler) { + return PyString_FromString(self->handler); + } + else { + Py_INCREF(Py_None); + return Py_None; + } + } + else if (strcmp(name, "parent") == 0) { + if (self->parent) { + return MpHList_FromHLEntry(self->parent); + } + else { + Py_INCREF(Py_None); + return Py_None; + } + } else return PyMember_Get((char *)self, filter_memberlist, name); } diff --git a/src/finfoobject.c b/src/finfoobject.c new file mode 100644 index 0000000000000000000000000000000000000000..2f2a3d3b729a3a39a62984320ef7eac3f7eb5f50 --- /dev/null +++ b/src/finfoobject.c @@ -0,0 +1,387 @@ +/* + * Copyright 2004 Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Originally developed by Gregory Trubetskoy. + * + * + * finfoobject.c + * + * $Id: finfoobject.c 466105 2006-10-20 13:28:02Z jgallacher $ + * + */ + +#include "mod_python.h" + +/** + ** MpFinfo_FromFinfo + ** + * This routine creates a Python finfoobject given an Apache + * finfo pointer. + * + */ + +PyObject * MpFinfo_FromFinfo(apr_finfo_t *f) +{ + finfoobject *result; + + result = PyObject_New(finfoobject, &MpFinfo_Type); + if (! result) + return PyErr_NoMemory(); + + result->finfo = f; + result->pool = NULL; + + return (PyObject *)result; +} + +/** + ** MpFinfo_New + ** + * This returns a new object of built-in type finfo. + * + * NOTE: The apr_finfo_t gets greated in its own pool, which lives + * throught the life of the finfoobject. + * + */ + +PyObject * MpFinfo_New() +{ + finfoobject *f; + apr_pool_t *p; + + /* XXX need second arg abort function to report mem error */ + apr_pool_create_ex(&p, NULL, NULL, NULL); + + f = (finfoobject *)MpFinfo_FromFinfo(apr_pcalloc(p, sizeof(apr_finfo_t))); + + /* remember the pointer to our own pool */ + f->pool = p; + + return (PyObject *)f; +} + +/** + ** finfo_dealloc + ** + * Frees finfo's memory + */ + +static void finfo_dealloc(register finfoobject *self) +{ + if (MpFinfo_Check(self)) { + if (self->pool) + apr_pool_destroy(self->pool); + PyObject_Del(self); + } + else + self->ob_type->tp_free((PyObject *)self); +} + +/** + ** finfo_getattr + ** + * Get finfo object attributes + * + */ + +static PyObject * finfo_getattr(finfoobject *self, char *name) +{ + if (strcmp(name, "fname") == 0) { + if (self->finfo->fname) + return PyString_FromString(self->finfo->fname); + } + else if (strcmp(name, "filetype") == 0) { + return PyInt_FromLong(self->finfo->filetype); + } + else if (strcmp(name, "valid") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + return PyInt_FromLong(self->finfo->valid); + } + else if (strcmp(name, "protection") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_PROT) + return PyInt_FromLong(self->finfo->protection); + } + else if (strcmp(name, "user") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_USER) + return PyInt_FromLong(self->finfo->user); + } + else if (strcmp(name, "group") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_GROUP) + return PyInt_FromLong(self->finfo->group); + } + else if (strcmp(name, "inode") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_INODE) + return PyInt_FromLong(self->finfo->inode); + } + else if (strcmp(name, "device") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_DEV) + return PyInt_FromLong(self->finfo->device); + } + else if (strcmp(name, "nlink") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_NLINK) + return PyInt_FromLong(self->finfo->nlink); + } + else if (strcmp(name, "size") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_SIZE) { + if (sizeof(apr_off_t) == sizeof(LONG_LONG)) { + return PyLong_FromLongLong(self->finfo->size); + } + else { + return PyLong_FromLong(self->finfo->size); + } + } + } + else if (strcmp(name, "atime") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_ATIME) + return PyInt_FromLong(self->finfo->atime*0.000001); + } + else if (strcmp(name, "mtime") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_MTIME) + return PyInt_FromLong(self->finfo->mtime*0.000001); + } + else if (strcmp(name, "ctime") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_CTIME) + return PyInt_FromLong(self->finfo->ctime*0.000001); + } + else if (strcmp(name, "name") == 0) { + if (self->finfo->filetype == APR_NOFILE) { + Py_INCREF(Py_None); + return Py_None; + } + if (self->finfo->valid & APR_FINFO_NAME) + return PyString_FromString(self->finfo->name); + } + else { + PyErr_Format(PyExc_AttributeError, + "class 'mp_finfo' has no attribute '%.400s'", name); + return NULL; + } + + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject* +finfoseq_item(finfoobject *self, int i) +{ + if (i < 0 || i >= 12) { + PyErr_SetString(PyExc_IndexError, "tuple index out of range"); + return NULL; + } + + switch (i) { + case 0: { + return finfo_getattr(self, "protection"); + } + case 1: { + return finfo_getattr(self, "inode"); + } + case 2: { + return finfo_getattr(self, "device"); + } + case 3: { + return finfo_getattr(self, "nlink"); + } + case 4: { + return finfo_getattr(self, "user"); + } + case 5: { + return finfo_getattr(self, "group"); + } + case 6: { + return finfo_getattr(self, "size"); + } + case 7: { + return finfo_getattr(self, "atime"); + } + case 8: { + return finfo_getattr(self, "mtime"); + } + case 9: { + return finfo_getattr(self, "ctime"); + } + case 10: { + return finfo_getattr(self, "fname"); + } + case 11: { + return finfo_getattr(self, "name"); + } + case 12: { + return finfo_getattr(self, "filetype"); + } + } + + Py_INCREF(Py_None); + return Py_None; +} + +static PySequenceMethods finfoseq_as_sequence = { + 0, + 0, /* sq_concat */ + 0, /* sq_repeat */ + /* PYTHON 2.5: WARNING: 'intargfunc' must be replaced with 'ssizeargfunc' */ + (intargfunc)finfoseq_item, /* sq_item */ + 0, /* sq_slice */ + 0, /* sq_ass_item */ + 0, /* sq_ass_slice */ + 0, /* sq_contains */ +}; + +/** + ** finfo_repr + ** + * + */ + +static PyObject *finfo_repr(finfoobject *self) +{ + PyObject *s = PyString_FromString("{"); + PyObject *t = NULL; + + PyString_ConcatAndDel(&s, PyString_FromString("'fname': ")); + t = finfo_getattr(self, "fname"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'filetype': ")); + t = finfo_getattr(self, "filetype"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'valid': ")); + t = finfo_getattr(self, "valid"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'protection': ")); + t = finfo_getattr(self, "protection"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'user': ")); + t = finfo_getattr(self, "user"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'group': ")); + t = finfo_getattr(self, "group"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'size': ")); + t = finfo_getattr(self, "size"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'inode': ")); + t = finfo_getattr(self, "inode"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'device': ")); + t = finfo_getattr(self, "device"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'nlink': ")); + t = finfo_getattr(self, "nlink"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'atime': ")); + t = finfo_getattr(self, "atime"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'mtime': ")); + t = finfo_getattr(self, "mtime"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'ctime': ")); + t = finfo_getattr(self, "ctime"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(", 'name': ")); + t = finfo_getattr(self, "name"); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString("}")); + + return s; +} + +PyTypeObject MpFinfo_Type = { + PyObject_HEAD_INIT(NULL) + 0, + "mp_finfo", + sizeof(finfoobject), + 0, + (destructor)finfo_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + (getattrfunc)finfo_getattr, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /* tp_compare */ + (reprfunc)finfo_repr, /*tp_repr*/ + 0, /* tp_as_number */ + &finfoseq_as_sequence, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ +}; diff --git a/src/hlist.c b/src/hlist.c index 6eb30ca4b3e6186a85d0cc1b8021db81b1b7b57d..3bb2c7514523853ac07147485a1d0963ea5094ad 100644 --- a/src/hlist.c +++ b/src/hlist.c @@ -18,7 +18,7 @@ * * hlist.c * - * $Id: hlist.c 106619 2004-11-25 22:10:52Z nd $ + * $Id: hlist.c 467228 2006-10-24 03:41:54Z grahamd $ * * See accompanying documentation and source code comments * for details. @@ -33,16 +33,25 @@ * Start a new list. */ -hl_entry *hlist_new(apr_pool_t *p, const char *h, const char *d, - const int s) +hl_entry *hlist_new(apr_pool_t *p, const char *h, PyObject *o, + const char *d, int d_is_fnmatch, ap_regex_t *d_regex, + const char *l, int l_is_fnmatch, ap_regex_t *l_regex, + const int s, hl_entry* parent) { hl_entry *hle; hle = (hl_entry *)apr_pcalloc(p, sizeof(hl_entry)); - hle->handler = apr_pstrdup(p, h); - hle->directory = apr_pstrdup(p, d); + hle->handler = h; + hle->callable = o; + hle->directory = d; + hle->d_is_fnmatch = d_is_fnmatch; + hle->d_regex = d_regex; + hle->location = l; + hle->l_is_fnmatch = l_is_fnmatch; + hle->l_regex = l_regex; hle->silent = s; + hle->parent = parent; return hle; } @@ -56,8 +65,10 @@ hl_entry *hlist_new(apr_pool_t *p, const char *h, const char *d, * If hle is NULL, a new list is created. */ -hl_entry *hlist_append(apr_pool_t *p, hl_entry *hle, const char * h, - const char *d, const int s) +hl_entry *hlist_append(apr_pool_t *p, hl_entry *hle, const char * h, PyObject *o, + const char *d, int d_is_fnmatch, ap_regex_t *d_regex, + const char *l, int l_is_fnmatch, ap_regex_t *l_regex, + const int s, hl_entry *parent) { hl_entry *nhle; @@ -67,9 +78,16 @@ hl_entry *hlist_append(apr_pool_t *p, hl_entry *hle, const char * h, nhle = (hl_entry *)apr_pcalloc(p, sizeof(hl_entry)); - nhle->handler = apr_pstrdup(p, h); - nhle->directory = apr_pstrdup(p, d); + nhle->handler = h; + nhle->callable = o; + nhle->directory = d; + nhle->d_is_fnmatch = d_is_fnmatch; + nhle->d_regex = d_regex; + nhle->location = l; + nhle->l_is_fnmatch = l_is_fnmatch; + nhle->l_regex = l_regex; nhle->silent = s; + nhle->parent = parent; if (hle) hle->next = nhle; @@ -88,21 +106,67 @@ hl_entry *hlist_copy(apr_pool_t *p, const hl_entry *hle) hl_entry *head; head = (hl_entry *)apr_pcalloc(p, sizeof(hl_entry)); - head->handler = apr_pstrdup(p, hle->handler); - head->directory = apr_pstrdup(p, hle->directory); + head->handler = hle->handler; + head->callable = hle->callable; + head->directory = hle->directory; + head->d_is_fnmatch = hle->d_is_fnmatch; + head->d_regex = hle->d_regex; + head->location = hle->location; + head->l_is_fnmatch = hle->l_is_fnmatch; + head->l_regex = hle->l_regex; head->silent = hle->silent; + head->parent = hle->parent; hle = hle->next; nhle = head; while (hle) { nhle->next = (hl_entry *)apr_pcalloc(p, sizeof(hl_entry)); nhle = nhle->next; - nhle->handler = apr_pstrdup(p, hle->handler); - nhle->directory = apr_pstrdup(p, hle->directory); + nhle->handler = hle->handler; + nhle->callable = hle->callable; + nhle->directory = hle->directory; + nhle->d_is_fnmatch = hle->d_is_fnmatch; + nhle->d_regex = hle->d_regex; + nhle->location = hle->location; + nhle->l_is_fnmatch = hle->l_is_fnmatch; + nhle->l_regex = hle->l_regex; nhle->silent = hle->silent; + nhle->parent = hle->parent; hle = hle->next; } return head; } +/** + ** hlist_extend + ** + */ + +void hlist_extend(apr_pool_t *p, hl_entry *hle1, + const hl_entry *hle2) +{ + if (!hle2) + return; + + /* find tail */ + while (hle1 && hle1->next) + hle1 = hle1->next; + + while (hle2) { + hle1->next = (hl_entry *)apr_pcalloc(p, sizeof(hl_entry)); + hle1 = hle1->next; + hle1->handler = hle2->handler; + hle1->callable = hle2->callable; + hle1->directory = hle2->directory; + hle1->d_is_fnmatch = hle2->d_is_fnmatch; + hle1->d_regex = hle2->d_regex; + hle1->location = hle2->location; + hle1->l_is_fnmatch = hle2->l_is_fnmatch; + hle1->l_regex = hle2->l_regex; + hle1->silent = hle2->silent; + hle1->parent = hle2->parent; + hle2 = hle2->next; + } +} + diff --git a/src/hlistobject.c b/src/hlistobject.c index 2497c9faca212cc15429aa514304145ee680b4ae..275b76528bade2d3cd122ee65e5d6ea9a231ebbc 100644 --- a/src/hlistobject.c +++ b/src/hlistobject.c @@ -18,7 +18,7 @@ * * hlist.c * - * $Id: hlistobject.c 106619 2004-11-25 22:10:52Z nd $ + * $Id: hlistobject.c 467228 2006-10-24 03:41:54Z grahamd $ * * See accompanying documentation and source code comments * for details. @@ -28,45 +28,24 @@ #include "mod_python.h" /** - ** MpHList_FromHSEntry() + ** MpHList_FromHLEntry() ** * new list from hl_entry */ -PyObject *MpHList_FromHLEntry(hl_entry *hle) +PyObject *MpHList_FromHLEntry(hl_entry *hle) { hlistobject *result; - apr_pool_t *p; result = PyObject_New(hlistobject, &MpHList_Type); if (! result) PyErr_NoMemory(); - /* XXX need second arg abort function to report mem error */ - apr_pool_create_ex(&p, NULL, NULL, NULL); - - result->pool = p; - result->head = hlist_copy(p, hle); + result->head = hle; return (PyObject *) result; } -/** - ** MpHlist_Append(hlistobject, hl_entry) - ** - * Append hl_entry to hlistobject, copying everything. - */ - -void MpHList_Append(hlistobject *self, hl_entry *hle) -{ - hl_entry *tail; - - /* find tail */ - for (tail = self->head; tail->next; tail=tail->next); - - tail->next = hlist_copy(self->pool, hle); -} - /** ** hlist_next ** @@ -74,6 +53,11 @@ void MpHList_Append(hlistobject *self, hl_entry *hle) static PyObject *hlist_next(hlistobject *self, PyObject *args) { + if (! self->head) { + Py_INCREF(Py_None); + return Py_None; + } + self->head = self->head->next; Py_INCREF(Py_None); @@ -88,8 +72,8 @@ static PyMethodDef hlistmethods[] = { #define OFF(x) offsetof(hl_entry, x) static struct memberlist hlist_memberlist[] = { - {"handler", T_STRING, OFF(handler), RO}, {"directory", T_STRING, OFF(directory), RO}, + {"location", T_STRING, OFF(location), RO}, {"silent", T_INT, OFF(silent), RO}, {NULL} /* Sentinel */ }; @@ -101,8 +85,6 @@ static struct memberlist hlist_memberlist[] = { static void hlist_dealloc(hlistobject *self) { - if (self->pool) - apr_pool_destroy(self->pool); PyObject_Del(self); } @@ -128,6 +110,26 @@ static PyObject *hlist_getattr(hlistobject *self, char *name) return Py_None; } + if (strcmp(name, "handler") == 0) { + if (self->head->callable) { + Py_INCREF(self->head->callable); + return self->head->callable; + } else if (self->head->handler) { + return PyString_FromString(self->head->handler); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + else if (strcmp(name, "parent") == 0) { + if (self->head->parent) { + return MpHList_FromHLEntry(self->head->parent); + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + return PyMember_Get((char *)self->head, hlist_memberlist, name); } @@ -140,16 +142,35 @@ static PyObject *hlist_getattr(hlistobject *self, char *name) static PyObject *hlist_repr(hlistobject *self) { - PyObject *s = PyString_FromString("{"); + PyObject *t; + PyObject *s; + + if (! self->head) { + s = PyString_FromString("None"); + return s; + } + + s = PyString_FromString("{"); if (self->head->handler) { - PyString_ConcatAndDel(&s, PyString_FromString("'handler:'")); - PyString_ConcatAndDel(&s, PyString_FromString(self->head->handler)); - PyString_ConcatAndDel(&s, PyString_FromString("'")); + PyString_ConcatAndDel(&s, PyString_FromString("'handler':")); + t = PyString_FromString(self->head->handler); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + } else if (self->head->callable) { + PyString_ConcatAndDel(&s, PyString_FromString("'handler':")); + PyString_ConcatAndDel(&s, PyObject_Repr(self->head->callable)); } if (self->head->directory) { - PyString_ConcatAndDel(&s, PyString_FromString(",'directory':'")); - PyString_ConcatAndDel(&s, PyString_FromString(self->head->directory)); - PyString_ConcatAndDel(&s, PyString_FromString("'")); + PyString_ConcatAndDel(&s, PyString_FromString(",'directory':")); + t = PyString_FromString(self->head->directory); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + } + if (self->head->location) { + PyString_ConcatAndDel(&s, PyString_FromString(",'location':")); + t = PyString_FromString(self->head->location); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); } PyString_ConcatAndDel(&s, PyString_FromString(",'silent':")); if (self->head->silent) diff --git a/src/include/connobject.h b/src/include/connobject.h index d3ee907d689ed0dbaf5a3467792a81d18be057d3..9ff7f89c03bc65150deefcc010063cc3e7bf84e3 100644 --- a/src/include/connobject.h +++ b/src/include/connobject.h @@ -24,7 +24,7 @@ extern "C" { * * connobject.h * - * $Id: connobject.h 106619 2004-11-25 22:10:52Z nd $ + * $Id: connobject.h 471474 2006-11-05 17:50:30Z jgallacher $ * */ @@ -41,7 +41,6 @@ extern "C" { typedef struct connobject { PyObject_HEAD conn_rec *conn; - PyObject *server; PyObject *base_server; PyObject *notes; hlistobject *hlo; diff --git a/src/include/filterobject.h b/src/include/filterobject.h index 1905e1a5a1a0423ca7b94e9299802959f626de1f..4ecdd7057c39a2f5aa24a4178e3afceb20dc5b06 100644 --- a/src/include/filterobject.h +++ b/src/include/filterobject.h @@ -18,7 +18,7 @@ * * filterobject.h * - * $Id: filterobject.h 106619 2004-11-25 22:10:52Z nd $ + * $Id: filterobject.h 426882 2006-07-30 10:27:00Z grahamd $ * */ @@ -48,7 +48,9 @@ extern "C" { int bytes_written; char *handler; + PyObject *callable; char *dir; + hl_entry *parent; requestobject *request_obj; @@ -61,7 +63,9 @@ extern "C" { extern DL_IMPORT(PyObject *) MpFilter_FromFilter Py_PROTO((ap_filter_t *f, apr_bucket_brigade *bb_in, int is_input, ap_input_mode_t mode, - apr_size_t readbytes, char *hadler, char *dir)); + apr_size_t readbytes, char *handler, + PyObject *callable, char *dir, + hl_entry *parent)); #ifdef __cplusplus } diff --git a/src/include/finfoobject.h b/src/include/finfoobject.h new file mode 100644 index 0000000000000000000000000000000000000000..5ab06a5ce8ec4ce403b2470fc7a439810abe5b7b --- /dev/null +++ b/src/include/finfoobject.h @@ -0,0 +1,47 @@ +/* + * Copyright 2004 Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Originally developed by Gregory Trubetskoy. + * + * + * finfoobject.h + * + * $Id: finfoobject.h 434388 2006-08-24 12:42:59Z grahamd $ + * + */ + +#ifndef Mp_FINFOOBJECT_H +#define Mp_FINFOOBJECT_H +#ifdef __cplusplus +extern "C" { +#endif + + typedef struct finfoobject { + PyObject_HEAD + apr_pool_t *pool; + apr_finfo_t *finfo; + } finfoobject; + + extern DL_IMPORT(PyTypeObject) MpFinfo_Type; + +#define MpFinfo_Check(op) ((op)->ob_type == &MpFinfo_Type) + + extern DL_IMPORT(PyObject *) MpFinfo_FromFinfo Py_PROTO((apr_finfo_t *f)); + extern DL_IMPORT(PyObject *) MpFinfo_New Py_PROTO((void)); + +#ifdef __cplusplus +} +#endif +#endif /* !Mp_FINFOOBJECT_H */ diff --git a/src/include/hlist.h b/src/include/hlist.h index b761f97305f4b84b91419f0d7ec79d78a93485b9..aca4d2ff3d4cb49ef75024caa15ecb5bbac7193d 100644 --- a/src/include/hlist.h +++ b/src/include/hlist.h @@ -18,7 +18,7 @@ * * hlist.h * - * $Id: hlist.h 106619 2004-11-25 22:10:52Z nd $ + * $Id: hlist.h 467228 2006-10-24 03:41:54Z grahamd $ * * See accompanying documentation and source code comments * for details. @@ -34,18 +34,31 @@ extern "C" { /* handler list entry */ typedef struct hl_entry { const char *handler; + PyObject *callable; const char *directory; + int d_is_fnmatch; + ap_regex_t *d_regex; + const char *location; + int l_is_fnmatch; + ap_regex_t *l_regex; int silent; /* 1 for PythonHandlerModule, where if a handler is not found in a module, no error should be reported */ struct hl_entry *next; + struct hl_entry *parent; } hl_entry; - hl_entry *hlist_new(apr_pool_t *p, const char *h, const char *d, - const int s); - hl_entry *hlist_append(apr_pool_t *p, hl_entry *hle, const char * h, - const char *d, const int s); + hl_entry *hlist_new(apr_pool_t *p, const char *h, PyObject* o, + const char *d, int d_is_fnmatch, ap_regex_t *d_regex, + const char *l, int l_is_fnmatch, ap_regex_t *l_regex, + const int s, hl_entry* parent); + hl_entry *hlist_append(apr_pool_t *p, hl_entry *hle, const char * h, PyObject* o, + const char *d, int d_is_fnmatch, ap_regex_t *d_regex, + const char *l, int l_is_fnmatch, ap_regex_t *l_regex, + const int s, hl_entry* parent); + hl_entry *hlist_copy(apr_pool_t *p, const hl_entry *hle); + void hlist_extend(apr_pool_t *p, hl_entry *hle1, const hl_entry *hle2); #ifdef __cplusplus } diff --git a/src/include/hlistobject.h b/src/include/hlistobject.h index 921e8652d3697a1d30cb7c406c189a0c6bf28a8c..038218475e14af8b98cdf0077f421be294e7d8f2 100644 --- a/src/include/hlistobject.h +++ b/src/include/hlistobject.h @@ -18,7 +18,7 @@ * * hlistobject.h * - * $Id: hlistobject.h 106619 2004-11-25 22:10:52Z nd $ + * $Id: hlistobject.h 431327 2006-08-14 12:07:46Z grahamd $ * * See accompanying documentation and source code comments * for details. @@ -34,16 +34,13 @@ extern "C" { typedef struct hlist { PyObject_HEAD struct hl_entry *head; - apr_pool_t *pool; } hlistobject; extern DL_IMPORT(PyTypeObject) MpHList_Type; #define MpHList_Check(op) ((op)->ob_type == &MpHList_Type) - extern DL_IMPORT(PyObject *)MpHList_FromHLEntry Py_PROTO((hl_entry *hse)); - extern DL_IMPORT(void)MpHList_Append Py_PROTO((hlistobject *self, hl_entry *hse)); - extern DL_IMPORT(void)MpHList_Append Py_PROTO((hlistobject *self, hl_entry *hle)); + extern DL_IMPORT(PyObject *)MpHList_FromHLEntry Py_PROTO((hl_entry *hle)); #ifdef __cplusplus } diff --git a/src/include/mod_python.h b/src/include/mod_python.h index c1b605a515403c0bd60cfbbac0e4cf0fd71e3fb6..0ecc211bfacf7fdedde3ef358115444c18bae3d0 100644 --- a/src/include/mod_python.h +++ b/src/include/mod_python.h @@ -21,7 +21,7 @@ * * mod_python.h * - * $Id: mod_python.h 393442 2006-04-12 12:03:09Z grahamd $ + * $Id: mod_python.h 467228 2006-10-24 03:41:54Z grahamd $ * * See accompanying documentation and source code comments * for details. @@ -53,12 +53,25 @@ #include "apr_strings.h" #include "apr_lib.h" #include "apr_hash.h" +#include "apr_fnmatch.h" #include "scoreboard.h" #include "ap_mpm.h" +#include "ap_mmn.h" +#include "mod_include.h" #if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE) #include "unixd.h" #endif +#if !AP_MODULE_MAGIC_AT_LEAST(20050127,0) +/* Debian backported ap_regex_t to Apache 2.0 and + * thus made official version checking break. */ +#ifndef AP_REG_EXTENDED +typedef regex_t ap_regex_t; +#define AP_REG_EXTENDED REG_EXTENDED +#define AP_REG_ICASE REG_ICASE +#endif +#endif + /* Python headers */ /* this gets rid of some compile warnings */ #if defined(_POSIX_THREADS) @@ -93,6 +106,7 @@ extern module AP_MODULE_DECLARE_DATA python_module; #include "requestobject.h" #include "filterobject.h" #include "_pspmodule.h" +#include "finfoobject.h" /** Things specific to mod_python, as an Apache module **/ @@ -101,6 +115,7 @@ extern module AP_MODULE_DECLARE_DATA python_module; #define MODULENAME "mod_python.apache" #define INITFUNC "init" #define MAIN_INTERPRETER "main_interpreter" +#define FILTER_NAME "MOD_PYTHON" /* used in python_directive_handler */ #define SILENT 1 @@ -144,7 +159,7 @@ typedef struct { apr_hash_t *hlists; /* hlists for every phase */ apr_hash_t *in_filters; apr_hash_t *out_filters; - hl_entry *imports; /* for PythonImport */ + apr_table_t *imports; /* for PythonImport */ } py_config; /* register_cleanup info */ @@ -163,11 +178,17 @@ typedef struct requestobject *request_obj; apr_hash_t *dynhls; /* dynamically registered handlers for this request */ + apr_hash_t *in_filters; /* dynamically registered input filters + for this request */ + apr_hash_t *out_filters; /* dynamically registered output filters + for this request */ + } py_req_config; /* filter context */ typedef struct { + char *name; int transparent; } python_filter_ctx; @@ -176,10 +197,25 @@ typedef struct typedef struct { char *handler; - char *dir; + PyObject *callable; + char *directory; + int d_is_fnmatch; + ap_regex_t *d_regex; + char *location; + int l_is_fnmatch; + ap_regex_t *l_regex; + hl_entry *parent; } py_handler; apr_status_t python_cleanup(void *data); +PyObject* python_interpreter_name(void); +requestobject *python_get_request_object(request_rec *req, const char *phase); + +APR_DECLARE_OPTIONAL_FN(PyInterpreterState *, mp_acquire_interpreter, (const char *)); +APR_DECLARE_OPTIONAL_FN(void *, mp_release_interpreter, ()); +APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_request_object, (request_rec *)); +APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_server_object, (server_rec *)); +APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_connection_object, (conn_rec *)); #endif /* !Mp_MOD_PYTHON_H */ diff --git a/src/include/mod_python.h.in b/src/include/mod_python.h.in index a7b8cb24ca32aca2da85717effa4f2fa0d2cd963..96f6edfbe29793811c592282c906c2ec69da02fb 100644 --- a/src/include/mod_python.h.in +++ b/src/include/mod_python.h.in @@ -53,12 +53,25 @@ #include "apr_strings.h" #include "apr_lib.h" #include "apr_hash.h" +#include "apr_fnmatch.h" #include "scoreboard.h" #include "ap_mpm.h" +#include "ap_mmn.h" +#include "mod_include.h" #if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE) #include "unixd.h" #endif +#if !AP_MODULE_MAGIC_AT_LEAST(20050127,0) +/* Debian backported ap_regex_t to Apache 2.0 and + * thus made official version checking break. */ +#ifndef AP_REG_EXTENDED +typedef regex_t ap_regex_t; +#define AP_REG_EXTENDED REG_EXTENDED +#define AP_REG_ICASE REG_ICASE +#endif +#endif + /* Python headers */ /* this gets rid of some compile warnings */ #if defined(_POSIX_THREADS) @@ -93,6 +106,7 @@ extern module AP_MODULE_DECLARE_DATA python_module; #include "requestobject.h" #include "filterobject.h" #include "_pspmodule.h" +#include "finfoobject.h" /** Things specific to mod_python, as an Apache module **/ @@ -101,6 +115,7 @@ extern module AP_MODULE_DECLARE_DATA python_module; #define MODULENAME "mod_python.apache" #define INITFUNC "init" #define MAIN_INTERPRETER "main_interpreter" +#define FILTER_NAME "MOD_PYTHON" /* used in python_directive_handler */ #define SILENT 1 @@ -144,7 +159,7 @@ typedef struct { apr_hash_t *hlists; /* hlists for every phase */ apr_hash_t *in_filters; apr_hash_t *out_filters; - hl_entry *imports; /* for PythonImport */ + apr_table_t *imports; /* for PythonImport */ } py_config; /* register_cleanup info */ @@ -163,11 +178,17 @@ typedef struct requestobject *request_obj; apr_hash_t *dynhls; /* dynamically registered handlers for this request */ + apr_hash_t *in_filters; /* dynamically registered input filters + for this request */ + apr_hash_t *out_filters; /* dynamically registered output filters + for this request */ + } py_req_config; /* filter context */ typedef struct { + char *name; int transparent; } python_filter_ctx; @@ -176,10 +197,25 @@ typedef struct typedef struct { char *handler; - char *dir; + PyObject *callable; + char *directory; + int d_is_fnmatch; + ap_regex_t *d_regex; + char *location; + int l_is_fnmatch; + ap_regex_t *l_regex; + hl_entry *parent; } py_handler; apr_status_t python_cleanup(void *data); +PyObject* python_interpreter_name(void); +requestobject *python_get_request_object(request_rec *req, const char *phase); + +APR_DECLARE_OPTIONAL_FN(PyInterpreterState *, mp_acquire_interpreter, (const char *)); +APR_DECLARE_OPTIONAL_FN(void *, mp_release_interpreter, ()); +APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_request_object, (request_rec *)); +APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_server_object, (server_rec *)); +APR_DECLARE_OPTIONAL_FN(PyObject *, mp_get_connection_object, (conn_rec *)); #endif /* !Mp_MOD_PYTHON_H */ diff --git a/src/include/mpversion.h b/src/include/mpversion.h index 4e0a25c02ac6666421b8dd0ddc801b00af4b8107..102e3f9ad388aede439fd4cbe5c91abe01317ce7 100644 --- a/src/include/mpversion.h +++ b/src/include/mpversion.h @@ -1,5 +1,5 @@ #define MPV_MAJOR 3 -#define MPV_MINOR 2 -#define MPV_PATCH 10 -#define MPV_BUILD 20060719 -#define MPV_STRING "3.2.10" +#define MPV_MINOR 3 +#define MPV_PATCH 1 +#define MPV_BUILD 20070129 +#define MPV_STRING "3.3.1" diff --git a/src/include/requestobject.h b/src/include/requestobject.h index 864ac8f095a3f40160b758de6d30208ca4e56fb2..f0c32c8f9bc19cd886182f114f8920e550e42a08 100644 --- a/src/include/requestobject.h +++ b/src/include/requestobject.h @@ -18,7 +18,7 @@ * * requestobject.h * - * $Id: requestobject.h 190550 2005-06-14 02:54:36Z jgallacher $ + * $Id: requestobject.h 454115 2006-10-08 09:58:35Z grahamd $ * */ @@ -34,9 +34,6 @@ extern "C" { request_rec * request_rec; PyObject * connection; PyObject * server; - PyObject * next; - PyObject * prev; - PyObject * main; PyObject * headers_in; PyObject * headers_out; PyObject * err_headers_out; @@ -44,9 +41,10 @@ extern "C" { PyObject * notes; PyObject * phase; char * extension; /* for | .ext syntax */ - char * interpreter; int content_type_set; + apr_off_t bytes_queued; hlistobject * hlo; + PyObject * callbacks; char * rbuff; /* read bufer */ int rbuff_len; /* read buffer size */ int rbuff_pos; /* position into the buffer */ diff --git a/src/mod_python.c b/src/mod_python.c index d9a5f1677fa852c400b8f89eef8e7beb2ed593b7..d8aa9f9c42c09108b196dc022f79fa4acb85ea72 100644 --- a/src/mod_python.c +++ b/src/mod_python.c @@ -1,6 +1,6 @@ /* - * Copyright 2004 Apache Software Foundation - * + * Copyright 2004 Apache Software Foundation + * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. You * may obtain a copy of the License at @@ -18,7 +18,7 @@ * * mod_python.c * - * $Id: mod_python.c 397813 2006-04-28 09:06:55Z grahamd $ + * $Id: mod_python.c 472785 2006-11-09 06:21:23Z grahamd $ * * See accompanying documentation and source code comments * for details. @@ -27,6 +27,9 @@ #include "mod_python.h" +/* Server object for main server as supplied to python_init(). */ +static server_rec *main_server = NULL; + /* List of available Python obCallBacks/Interpreters * (In a Python dictionary) */ static PyObject * interpreters = NULL; @@ -37,13 +40,18 @@ static apr_thread_mutex_t* interpreters_lock = 0; apr_pool_t *child_init_pool = NULL; +/* Optional functions imported from mod_include when loaded: */ +static APR_OPTIONAL_FN_TYPE(ap_register_include_handler) *optfn_register_include_handler; +static APR_OPTIONAL_FN_TYPE(ap_ssi_get_tag_and_value) *optfn_ssi_get_tag_and_value; +static APR_OPTIONAL_FN_TYPE(ap_ssi_parse_string) *optfn_ssi_parse_string; + /** ** make_interpreter ** * Creates a new Python interpreter. */ -static PyInterpreterState *make_interpreter(const char *name, server_rec *srv) +static PyInterpreterState *make_interpreter(const char *name) { PyThreadState *tstate; @@ -52,7 +60,7 @@ static PyInterpreterState *make_interpreter(const char *name, server_rec *srv) if (! tstate) { /* couldn't create an interpreter, this is bad */ - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, srv, + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, "make_interpreter: Py_NewInterpreter() returned NULL. No more memory?"); return NULL; } @@ -77,7 +85,7 @@ static PyInterpreterState *make_interpreter(const char *name, server_rec *srv) * the reference to obCallBack. */ -static PyObject * make_obcallback(char *name, server_rec *s) +static PyObject * make_obcallback(char *name) { PyObject *m = NULL; @@ -99,7 +107,7 @@ static PyObject * make_obcallback(char *name, server_rec *s) if (! ((m = PyImport_ImportModule(MODULENAME)))) { PyObject *path; - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s, + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, "make_obcallback: could not import %s.\n", (!MODULENAME) ? "<null>" : MODULENAME); @@ -108,7 +116,7 @@ static PyObject * make_obcallback(char *name, server_rec *s) path = PyObject_Repr(PySys_GetObject("path")); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s, + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, "make_obcallback: Python path being used \"%s\".", PyString_AsString(path)); @@ -118,7 +126,7 @@ static PyObject * make_obcallback(char *name, server_rec *s) } if (m && ! ((obCallBack = PyObject_CallMethod(m, - INITFUNC, "sO", name, MpServer_FromServer(s))))) { + INITFUNC, "sO", name, MpServer_FromServer(main_server))))) { const char *mp_compile_version = MPV_STRING; const char *mp_dynamic_version = "<unknown>"; @@ -126,7 +134,7 @@ static PyObject * make_obcallback(char *name, server_rec *s) PyObject *d = NULL; PyObject *f = NULL; - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s, + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, "make_obcallback: could not call %s.\n", (!INITFUNC) ? "<null>" : INITFUNC); @@ -145,16 +153,13 @@ static PyObject * make_obcallback(char *name, server_rec *s) } if (strcmp(mp_compile_version, mp_dynamic_version) != 0) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s, + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, "make_obcallback: mod_python version mismatch, expected '%s', found '%s'.", mp_compile_version, mp_dynamic_version); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s, + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, "make_obcallback: mod_python modules location '%s'.", PyString_AsString(f)); } - - Py_XDECREF(o); - Py_XDECREF(f); } Py_XDECREF(m); @@ -184,6 +189,34 @@ static interpreterdata *save_interpreter(const char *name, PyInterpreterState *i return idata; } +/* + * python_interpreter_name + * + * Get name of current interpreter. Must be called while lock is held. + * This is effectively a shortcut for accessing "apache.interpreter". + */ + +PyObject *python_interpreter_name() +{ + PyObject *m = NULL; + PyObject *d = NULL; + PyObject *o = NULL; + + m = PyImport_ImportModule("mod_python.apache"); + if (m) { + d = PyModule_GetDict(m); + o = PyDict_GetItemString(d, "interpreter"); + + if (o) { + Py_INCREF(o); + Py_DECREF(m); + return o; + } + } + + return 0; +} + /** ** get_interpreter ** @@ -191,7 +224,7 @@ static interpreterdata *save_interpreter(const char *name, PyInterpreterState *i * NOTE: This function will acquire lock */ -static interpreterdata *get_interpreter(const char *name, server_rec *srv) +static interpreterdata *get_interpreter(const char *name) { PyObject *p; PyThreadState *tstate; @@ -208,15 +241,21 @@ static interpreterdata *get_interpreter(const char *name, server_rec *srv) #endif if (!interpreters) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, srv, - "python_handler: interpreters dictionary not initialised."); + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, + "get_interpreter: interpreters dictionary not initialised."); +#ifdef WITH_THREAD + PyEval_ReleaseLock(); +#endif +#if APR_HAS_THREADS + apr_thread_mutex_unlock(interpreters_lock); +#endif return NULL; } p = PyDict_GetItemString(interpreters, (char *)name); if (!p) { - PyInterpreterState *istate = make_interpreter(name, srv); + PyInterpreterState *istate = make_interpreter(name); if (istate) idata = save_interpreter(name, istate); @@ -228,13 +267,13 @@ static interpreterdata *get_interpreter(const char *name, server_rec *srv) #ifdef WITH_THREAD PyEval_ReleaseLock(); #endif -#if APR_HAS_THREADS - apr_thread_mutex_unlock(interpreters_lock); -#endif if (! idata) { - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, srv, + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, "get_interpreter: cannot get interpreter data (no more memory?)"); +#if APR_HAS_THREADS + apr_thread_mutex_unlock(interpreters_lock); +#endif return NULL; } @@ -248,22 +287,30 @@ static interpreterdata *get_interpreter(const char *name, server_rec *srv) if (!idata->obcallback) { - idata->obcallback = make_obcallback((char*)name,srv); + idata->obcallback = make_obcallback((char*)name); if (!idata->obcallback) { + PyThreadState_Clear(tstate); #ifdef WITH_THREAD PyEval_ReleaseThread(tstate); #else PyThreadState_Swap(NULL); #endif PyThreadState_Delete(tstate); - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, srv, - "python_handler: no interpreter callback found."); + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, main_server, + "get_interpreter: no interpreter callback found."); +#if APR_HAS_THREADS + apr_thread_mutex_unlock(interpreters_lock); +#endif return NULL; } } +#if APR_HAS_THREADS + apr_thread_mutex_unlock(interpreters_lock); +#endif + return idata; } @@ -278,6 +325,7 @@ static interpreterdata *get_interpreter(const char *name, server_rec *srv) static void release_interpreter(void) { PyThreadState *tstate = PyThreadState_Get(); + PyThreadState_Clear(tstate); #ifdef WITH_THREAD PyEval_ReleaseThread(tstate); #else @@ -302,15 +350,12 @@ apr_status_t python_cleanup(void *data) cleanup_info *ci = (cleanup_info *)data; /* get/create interpreter */ - if (ci->request_rec) - idata = get_interpreter(ci->interpreter, ci->request_rec->server); - else - idata = get_interpreter(ci->interpreter, ci->server_rec); + idata = get_interpreter(ci->interpreter); if (!idata) { Py_DECREF(ci->handler); Py_XDECREF(ci->data); - free(ci->interpreter); + free((void *)ci->interpreter); free(ci); return APR_SUCCESS; /* this is ignored anyway */ } @@ -363,6 +408,7 @@ apr_status_t python_cleanup(void *data) Py_DECREF(ci->handler); Py_DECREF(ci->data); + free((void *)ci->interpreter); free(ci); release_interpreter(); @@ -379,8 +425,8 @@ static apr_status_t init_mutexes(server_rec *s, apr_pool_t *p, py_global_config int max_clients; int locks; int n; - char *val; - char *mutex_dir; + const char *val; + const char *mutex_dir; py_config *conf; conf = (py_config *) ap_get_module_config(s->module_config, @@ -532,7 +578,7 @@ static apr_status_t reinit_mutexes(server_rec *s, apr_pool_t *p, py_global_confi /* Determine the directory to use for mutex lock files. See init_mutexes function for more details. */ - char *mutex_dir; + const char *mutex_dir; py_config *conf; conf = (py_config *) ap_get_module_config(s->module_config, @@ -595,6 +641,73 @@ static py_global_config *python_create_global_config(server_rec *s) return glb; } +/* + * mp_acquire_interpreter() + * + * Exported function for acquiring named interpreter. + */ + +PyInterpreterState *mp_acquire_interpreter(const char *name) +{ + interpreterdata *idata; + + idata = get_interpreter(name); + + return idata->istate; +} + +/* + * mp_release_interpreter() + * + * Exported function for releasing acquired interpreter. + * + */ + +void mp_release_interpreter(void) +{ + release_interpreter(); +} + +/* + * mp_get_request_object(request_rec *req) + * + * Exported function for obtaining wrapper for request object. + * + */ + +PyObject *mp_get_request_object(request_rec *req) +{ + requestobject *request_obj; + + request_obj = python_get_request_object(req, 0); + + return (PyObject *)request_obj; +} + +/* + * mp_get_server_object(server_rec *srv) + * + * Exported function for obtaining wrapper for server object. + * + */ + +PyObject *mp_get_server_object(server_rec *srv) +{ + return (PyObject *)MpServer_FromServer(srv); +} + +/* + * mp_get_connection_object(conn_rec *conn) + * + * Exported function for obtaining wrapper for connection object. + * + */ + +PyObject *mp_get_connection_object(conn_rec *conn) +{ + return (PyObject *)MpConn_FromConn(conn); +} + /** ** python_init() ** @@ -628,6 +741,20 @@ static int python_init(apr_pool_t *p, apr_pool_t *ptemp, */ static int initialized = 0; +#ifdef WIN32 + /* No need to run python_init() in Win32 parent processes as + * the lack of fork on Win32 means we get no benefit as far as + * inheriting a preinitialized Python interpreter. Further, + * upon a restart on Win32 platform the python_init() function + * will be called again in the parent process but without some + * resources allocated by the previous call having being + * released properly, resulting in memory and Win32 resource + * leaks. + */ + if (!getenv("AP_PARENT_PID")) + return OK; +#endif /* WIN32 */ + apr_pool_userdata_get(&data, userdata_key, s->process->pool); if (!data) { apr_pool_userdata_set((const void *)1, userdata_key, @@ -656,6 +783,9 @@ static int python_init(apr_pool_t *p, apr_pool_t *ptemp, sprintf(buff, "Python/%.200s", py_dynamic_version); ap_add_version_component(p, buff); + /* cache main server */ + main_server = s; + /* global config */ glb = python_create_global_config(s); if ((rc = init_mutexes(s, p, glb)) != APR_SUCCESS) { @@ -691,6 +821,13 @@ static int python_init(apr_pool_t *p, apr_pool_t *ptemp, PyEval_ReleaseLock(); #endif } + + APR_REGISTER_OPTIONAL_FN(mp_acquire_interpreter); + APR_REGISTER_OPTIONAL_FN(mp_release_interpreter); + APR_REGISTER_OPTIONAL_FN(mp_get_request_object); + APR_REGISTER_OPTIONAL_FN(mp_get_server_object); + APR_REGISTER_OPTIONAL_FN(mp_get_connection_object); + return OK; } @@ -754,9 +891,6 @@ static void *python_create_srv_config(apr_pool_t *p, server_rec *srv) return conf; } -/* -code begin -*/ /** ** modpython_table_overlap ** @@ -791,6 +925,7 @@ static void *python_merge_config(apr_pool_t *p, void *current_conf, char *key; apr_ssize_t klen; hl_entry *hle; + py_handler *fh; /* we basically allow the local configuration to override global, * by first copying current values and then new values on top @@ -817,13 +952,13 @@ static void *python_merge_config(apr_pool_t *p, void *current_conf, } for (hi = apr_hash_first(p, cc->in_filters); hi; hi=apr_hash_next(hi)) { - apr_hash_this(hi, (const void **)&key, &klen, (void **)&hle); - apr_hash_set(merged_conf->in_filters, key, klen, (void *)hle); + apr_hash_this(hi, (const void **)&key, &klen, (void **)&fh); + apr_hash_set(merged_conf->in_filters, key, klen, (void *)fh); } for (hi = apr_hash_first(p, cc->out_filters); hi; hi=apr_hash_next(hi)) { - apr_hash_this(hi, (const void **)&key, &klen, (void **)&hle); - apr_hash_set(merged_conf->out_filters, key, klen, (void *)hle); + apr_hash_this(hi, (const void **)&key, &klen, (void **)&fh); + apr_hash_set(merged_conf->out_filters, key, klen, (void *)fh); } /** copy new **/ @@ -839,22 +974,18 @@ static void *python_merge_config(apr_pool_t *p, void *current_conf, } for (hi = apr_hash_first(p, nc->in_filters); hi; hi=apr_hash_next(hi)) { - apr_hash_this(hi, (const void**)&key, &klen, (void **)&hle); - apr_hash_set(merged_conf->in_filters, key, klen, (void *)hle); + apr_hash_this(hi, (const void**)&key, &klen, (void **)&fh); + apr_hash_set(merged_conf->in_filters, key, klen, (void *)fh); } for (hi = apr_hash_first(p, nc->out_filters); hi; hi=apr_hash_next(hi)) { - apr_hash_this(hi, (const void**)&key, &klen, (void **)&hle); - apr_hash_set(merged_conf->out_filters, key, klen, (void *)hle); + apr_hash_this(hi, (const void**)&key, &klen, (void **)&fh); + apr_hash_set(merged_conf->out_filters, key, klen, (void *)fh); } return (void *) merged_conf; } -/* -code end -*/ - /** ** python_directive @@ -874,14 +1005,154 @@ static const char *python_directive(cmd_parms *cmd, void * mconfig, return NULL; } -static void python_directive_hl_add(apr_pool_t *p, - apr_hash_t *hlists, +/* returns a parent if it matches the given directive */ +static const ap_directive_t * find_parent(const ap_directive_t *dirp, + const char *what) +{ + while (dirp->parent != NULL) { + dirp = dirp->parent; + + if (strcasecmp(dirp->directive, what) == 0) + return dirp; + } + + return NULL; +} + +#ifdef WIN32 +#define USE_ICASE AP_REG_ICASE +#else +#define USE_ICASE 0 +#endif + +static void determine_context(apr_pool_t *p, const cmd_parms* cmd, + char **d, int *d_gx, ap_regex_t **d_rx, + char **l, int *l_gx, ap_regex_t **l_rx) +{ + const ap_directive_t *context = 0; + const ap_directive_t *directive = 0; + const char *endp, *arg; + + char *directory = 0; + int d_is_fnmatch = 0; + ap_regex_t *d_regex = 0; + + char *location = 0; + int l_is_fnmatch = 0; + ap_regex_t *l_regex = 0; + + directive = cmd->directive; + + /* Skip any enclosing File directive if one exists */ + + if ((context = find_parent(directive, "<Files")) || + (context = find_parent(directive, "<FilesMatch"))) { + + directive = context; + } + + if ((context = find_parent(directive, "<Directory"))) { + arg = context->args; + endp = ap_strrchr_c(arg, '>'); + arg = apr_pstrndup(p, arg, endp - arg); + + directory = ap_getword_conf(p, &arg); + + if (!strcmp(directory, "~")) { + directory = ap_getword_conf(p, &arg); + d_regex = ap_pregcomp(p, cmd->path, AP_REG_EXTENDED|USE_ICASE); + } else if (ap_is_matchexp(directory)) { + d_is_fnmatch = 1; + } + } else if ((context = find_parent(directive, "<DirectoryMatch"))) { + arg = context->args; + endp = ap_strrchr_c(arg, '>'); + arg = apr_pstrndup(p, arg, endp - arg); + + directory = ap_getword_conf(p, &arg); + d_regex = ap_pregcomp(p, directory, AP_REG_EXTENDED|USE_ICASE); + } else if ((context = find_parent(directive, "<Location"))) { + arg = context->args; + endp = ap_strrchr_c(arg, '>'); + arg = apr_pstrndup(p, arg, endp - arg); + + location = ap_getword_conf(p, &arg); + + if (!strcmp(location, "~")) { + location = ap_getword_conf(p, &arg); + l_regex = ap_pregcomp(p, cmd->path, AP_REG_EXTENDED|USE_ICASE); + } else if (ap_is_matchexp(location)) { + l_is_fnmatch = 1; + } + } else if ((context = find_parent(directive, "<LocationMatch"))) { + arg = context->args; + endp = ap_strrchr_c(arg, '>'); + arg = apr_pstrndup(p, arg, endp - arg); + + location = ap_getword_conf(p, &arg); + l_regex = ap_pregcomp(p, location, AP_REG_EXTENDED|USE_ICASE); + } else if (cmd->config_file != NULL) { + /* cmd->config_file is NULL when in main Apache + * configuration file as the file is completely + * read in before the directive is processed as + * EXEC_ON_READ is not set in req_override field + * of command_struct table entry. Thus know then + * we are being used in a .htaccess file. */ + + directory = ap_make_dirstr_parent(p, directive->filename); + } + + /* Only canonicalize path and add trailing slash at + * this point if no pattern matching to be done at + * a later time. */ + + if (directory && !d_is_fnmatch && !d_regex) { + + char *newpath = 0; + apr_status_t rv; + + rv = apr_filepath_merge(&newpath, NULL, directory, + APR_FILEPATH_TRUENAME, p); + + /* Should be able to ignore a failure as any + * problem with path should have been flagged + * when configuration was read in. */ + + if (rv == APR_SUCCESS || rv == APR_EPATHWILD) { + directory = newpath; + if (directory[strlen(directory) - 1] != '/') { + directory = apr_pstrcat(p, directory, "/", NULL); + } + } + } + + *d = directory; + *d_gx = d_is_fnmatch; + *d_rx = d_regex; + + *l = location; + *l_gx = l_is_fnmatch; + *l_rx = l_regex; +} + +static void python_directive_hl_add(apr_pool_t *p, apr_hash_t *hlists, const char *phase, const char *handler, - const char *directory, const int silent) + const cmd_parms* cmd, const int silent) { hl_entry *head; char *h; + char *directory = 0; + int d_is_fnmatch = 0; + ap_regex_t *d_regex = 0; + + char *location = 0; + int l_is_fnmatch = 0; + ap_regex_t *l_regex = 0; + + determine_context(p, cmd, &directory, &d_is_fnmatch, &d_regex, + &location, &l_is_fnmatch, &l_regex); + head = (hl_entry *)apr_hash_get(hlists, phase, APR_HASH_KEY_STRING); /* it's possible that handler is multiple handlers separated @@ -889,11 +1160,13 @@ static void python_directive_hl_add(apr_pool_t *p, while (*(h = ap_getword_white(p, &handler)) != '\0') { if (!head) { - head = hlist_new(p, h, directory, silent); + head = hlist_new(p, h, 0, directory, d_is_fnmatch, d_regex, + location, l_is_fnmatch, l_regex, silent, 0); apr_hash_set(hlists, phase, APR_HASH_KEY_STRING, head); } else { - hlist_append(p, head, h, directory, silent); + hlist_append(p, head, h, 0, directory, d_is_fnmatch, d_regex, + location, l_is_fnmatch, l_regex, silent, 0); } } } @@ -922,11 +1195,12 @@ static const char *python_directive_handler(cmd_parms *cmd, py_config* conf, */ const char *exts = val; + val = ap_getword(cmd->pool, &exts, '|'); if (*exts == '\0') { python_directive_hl_add(cmd->pool, conf->hlists, key, val, - conf->config_dir, silent); + cmd, silent); } else { @@ -943,7 +1217,7 @@ static const char *python_directive_handler(cmd_parms *cmd, py_config* conf, s = apr_pstrcat(cmd->pool, key, ext, NULL); python_directive_hl_add(cmd->pool, conf->hlists, s, val, - conf->config_dir, silent); + cmd, silent); } } @@ -957,8 +1231,7 @@ static const char *python_directive_handler(cmd_parms *cmd, py_config* conf, * */ -static const char *python_directive_flag(void * mconfig, - char *key, int val, int set) +static const char *python_directive_flag(void * mconfig, char *key, int val) { py_config *conf; @@ -968,12 +1241,7 @@ static const char *python_directive_flag(void * mconfig, apr_table_set(conf->directives, key, "1"); } else { - if (set) { - apr_table_set(conf->directives, key, "0"); - } - else { - apr_table_unset(conf->directives, key); - } + apr_table_set(conf->directives, key, "0"); } return NULL; @@ -982,13 +1250,13 @@ static const char *python_directive_flag(void * mconfig, static apr_status_t python_cleanup_handler(void *data); /** - ** get_request_object + ** python_get_request_object ** * This creates or retrieves a previously created request object. * The pointer to request object is stored in req->request_config. */ -static requestobject *get_request_object(request_rec *req, const char *interp_name, char *phase) +requestobject *python_get_request_object(request_rec *req, const char *phase) { py_req_config *req_config; requestobject *request_obj = NULL; @@ -1037,6 +1305,8 @@ static requestobject *get_request_object(request_rec *req, const char *interp_na req_config = apr_pcalloc(req->pool, sizeof(py_req_config)); req_config->request_obj = request_obj; req_config->dynhls = apr_hash_make(req->pool); + req_config->in_filters = apr_hash_make(req->pool); + req_config->out_filters = apr_hash_make(req->pool); ap_set_module_config(req->request_config, &python_module, req_config); /* register the clean up directive handler */ @@ -1044,24 +1314,133 @@ static requestobject *get_request_object(request_rec *req, const char *interp_na python_cleanup_handler, apr_pool_cleanup_null); } - /* make a note of which subinterpreter we're running under */ - if (interp_name) - request_obj->interpreter = apr_pstrdup(req->pool, interp_name); - else - request_obj->interpreter = apr_pstrdup(req->pool, MAIN_INTERPRETER); /* make a note of which phase we are in right now */ - Py_XDECREF(request_obj->phase); if (phase) + { + Py_XDECREF(request_obj->phase); request_obj->phase = PyString_FromString(phase); - else - request_obj->phase = PyString_FromString(""); + } return request_obj; } /** - ** select_interpreter_name + ** resolve_directory + ** + * resolve any directory match returning the matched directory + */ + +static const char *resolve_directory(request_rec *req, const char *directory, + int d_is_fnmatch, ap_regex_t *d_regex) +{ + char *prefix; + int len, dirs, i; + + if (!req || !req->filename || (!d_is_fnmatch && !d_regex)) + return directory; + + dirs = ap_count_dirs(req->filename) + 1; + len = strlen(req->filename); + prefix = (char*)apr_palloc(req->pool, len+2); + + for (i=0; i<=dirs; i++) { + ap_make_dirstr_prefix(prefix, req->filename, i); + + /* Match with trailing slash first. */ +#ifdef WIN32 + if (d_is_fnmatch && apr_fnmatch(directory, prefix, + APR_FNM_PATHNAME|APR_FNM_CASE_BLIND) == 0) { +#else + if (d_is_fnmatch && apr_fnmatch(directory, prefix, + APR_FNM_PATHNAME) == 0) { +#endif + return prefix; + } + else if (d_regex && ap_regexec(d_regex, prefix, 0, NULL, 0) == 0) { + return prefix; + } + + if (strcmp(prefix, "/") != 0) { + prefix[strlen(prefix)-1] = '\0'; + + /* Match without trailing slash. */ +#ifdef WIN32 + if (d_is_fnmatch && apr_fnmatch(directory, prefix, + APR_FNM_PATHNAME|APR_FNM_CASE_BLIND) == 0) { +#else + if (d_is_fnmatch && apr_fnmatch(directory, prefix, + APR_FNM_PATHNAME) == 0) { +#endif + prefix[strlen(prefix)] = '/'; + return prefix; + } + else if (d_regex && ap_regexec(d_regex, prefix, 0, NULL, 0) == 0) { + prefix[strlen(prefix)] = '/'; + return prefix; + } + } + } + + return directory; +} + +/** + ** resolve_location + ** + * resolve any location match returning the matched location + */ + +static const char *resolve_location(request_rec *req, const char *location, + int l_is_fnmatch, ap_regex_t *l_regex) +{ + char *prefix; + int len, dirs, i; + + if (!req || !req->uri || (!l_is_fnmatch && !l_regex)) + return location; + + dirs = ap_count_dirs(req->uri) + 1; + len = strlen(req->uri); + prefix = (char*)apr_palloc(req->pool, len+2); + + for (i=0; i<=dirs; i++) { + int match = 0; + ap_make_dirstr_prefix(prefix, req->uri, i); + + /* Match with trailing slash first. */ + if (l_is_fnmatch && apr_fnmatch(location, prefix, + APR_FNM_PATHNAME) == 0) { + match = 1; + } + else if (l_regex && ap_regexec(l_regex, prefix, 0, NULL, 0) == 0) { + match = 1; + } + + if (strcmp(prefix, "/") != 0) { + prefix[strlen(prefix)-1] = '\0'; + + /* Match without trailing slash. */ + if (l_is_fnmatch && apr_fnmatch(location, prefix, + APR_FNM_PATHNAME) == 0) { + return prefix; + } + else if (l_regex && ap_regexec(l_regex, prefix, 0, NULL, 0) == 0) { + return prefix; + } + + if (match) { + prefix[strlen(prefix)] = '/'; + return prefix; + } + } + } + + return location; +} + +/** + ** select_interp_name ** * (internal) * figure out the name of the interpreter we should be using @@ -1070,33 +1449,35 @@ static requestobject *get_request_object(request_rec *req, const char *interp_na * is specified, then its a connection handler. */ -static const char *select_interp_name(request_rec *req, conn_rec *con, py_config *conf, - hl_entry *hle, const char *fname, int is_input) +static const char *select_interp_name(request_rec *req, conn_rec *con, + py_config *conf, hl_entry *hle, + py_handler *fh) { - const char *s; + const char *s = NULL; if ((s = apr_table_get(conf->directives, "PythonInterpreter"))) { /* forced by configuration */ return s; } else { - if ((s = apr_table_get(conf->directives, "PythonInterpPerDirectory"))) { + if ((s = apr_table_get(conf->directives, "PythonInterpPerDirectory")) && (strcmp(s, "1") == 0)) { /* base interpreter on directory where the file is found */ if (req && ap_is_directory(req->pool, req->filename)) { - /** XXX I suppose that if req->filename is a directory, there already - is a trailing slash in req->filename. This is due to the fact - that Apache redirect any request from /directory to /directory/. - That's why the tests below are commented out, they should be useless. - **/ - /* if (req->filename[strlen(req->filename)-1]=='/') { */ + /* Where req->filename is a directory, it is not guaranteed + * that it will have a trailing slash in req->filename as + * trailing slash redirection only happens in mod_dir at + * the very end of the fixup phase. Thus need to ensure + * that this is taken into consideration. + */ + if (req->filename[strlen(req->filename)-1]=='/') { return ap_make_dirstr_parent(req->pool, req->filename); - /* } + } else { return ap_make_dirstr_parent(req->pool, apr_pstrcat(req->pool, req->filename, "/", NULL )); - } */ + } } else { if (req && req->filename) @@ -1109,7 +1490,7 @@ static const char *select_interp_name(request_rec *req, conn_rec *con, py_config return NULL; } } - else if (apr_table_get(conf->directives, "PythonInterpPerDirective")) { + else if ((s = apr_table_get(conf->directives, "PythonInterpPerDirective")) && (strcmp(s, "1") == 0)) { /* * base interpreter name on directory where the handler directive @@ -1117,22 +1498,15 @@ static const char *select_interp_name(request_rec *req, conn_rec *con, py_config * global interpreter. */ - py_handler *fh; - - if (fname) { - if (is_input) { - fh = (py_handler *)apr_hash_get(conf->in_filters, fname, - APR_HASH_KEY_STRING); - } - else { - fh = (py_handler *)apr_hash_get(conf->out_filters, fname, - APR_HASH_KEY_STRING); - } - s = fh->dir; + if (fh) { + s = fh->directory; } - else { + else if (hle) { s = hle->directory; } + else { + return NULL; + } if (s && (s[0] == '\0')) return NULL; @@ -1149,7 +1523,6 @@ static const char *select_interp_name(request_rec *req, conn_rec *con, py_config } } - /** ** python_handler ** @@ -1168,6 +1541,7 @@ static int python_handler(request_rec *req, char *phase) char *ext = NULL; hl_entry *hle = NULL; hl_entry *dynhle = NULL; + hl_entry *hlohle = NULL; py_req_config *req_conf; @@ -1197,7 +1571,8 @@ static int python_handler(request_rec *req, char *phase) /* try without extension if we don't match */ if (!hle) { - hle = (hl_entry *)apr_hash_get(conf->hlists, phase, APR_HASH_KEY_STRING); + hle = (hl_entry *)apr_hash_get(conf->hlists, phase, + APR_HASH_KEY_STRING); /* also blank out ext since we didn't succeed with it. this is tested further below */ @@ -1215,12 +1590,42 @@ static int python_handler(request_rec *req, char *phase) /* nothing to do here */ return DECLINED; } - + + /* construct list for the handler list object */ + if (!hle) { + hlohle = hlist_copy(req->pool, dynhle); + } + else { + hlohle = hlist_copy(req->pool, hle); + + if (dynhle) + hlist_extend(req->pool, hlohle, dynhle); + } + + /* resolve wildcard or regex directory patterns */ + hle = hlohle; + while (hle) { + if (hle->d_is_fnmatch || hle->d_regex) { + hle->directory = resolve_directory(req, hle->directory, + hle->d_is_fnmatch, hle->d_regex); + hle->d_is_fnmatch = 0; + hle->d_regex = NULL; + } + if (hle->l_is_fnmatch || hle->l_regex) { + hle->location = resolve_location(req, hle->location, + hle->l_is_fnmatch, hle->l_regex); + hle->l_is_fnmatch = 0; + hle->l_regex = NULL; + } + + hle = hle->next; + } + /* determine interpreter to use */ - interp_name = select_interp_name(req, NULL, conf, hle, NULL, 0); + interp_name = select_interp_name(req, NULL, conf, hlohle, NULL); /* get/create interpreter */ - idata = get_interpreter(interp_name, req->server); + idata = get_interpreter(interp_name); if (!idata) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, req, @@ -1229,34 +1634,28 @@ static int python_handler(request_rec *req, char *phase) } /* create/acquire request object */ - request_obj = get_request_object(req, interp_name, phase); + request_obj = python_get_request_object(req, phase); /* remember the extension if any. used by publisher */ if (ext) request_obj->extension = apr_pstrdup(req->pool, ext); - if (!hle) { - /* create a handler list object from dynamically registered handlers */ - request_obj->hlo = (hlistobject *)MpHList_FromHLEntry(dynhle); - } - else { - /* create a handler list object */ - request_obj->hlo = (hlistobject *)MpHList_FromHLEntry(hle); - - /* add dynamically registered handlers, if any */ - if (dynhle) { - MpHList_Append(request_obj->hlo, dynhle); - } - } + /* construct a new handler list object */ + Py_XDECREF(request_obj->hlo); + request_obj->hlo = (hlistobject *)MpHList_FromHLEntry(hlohle); /* * Here is where we call into Python! * This is the C equivalent of * >>> resultobject = obCallBack.Dispatch(request_object, phase) */ - resultobject = PyObject_CallMethod(idata->obcallback, "HandlerDispatch", "O", - request_obj); - + resultobject = PyObject_CallMethod(idata->obcallback, "HandlerDispatch", + "O", request_obj); + + /* clear phase from request object */ + Py_XDECREF(request_obj->phase); + request_obj->phase = NULL; + /* release the lock and destroy tstate*/ release_interpreter(); @@ -1365,7 +1764,7 @@ static apr_status_t python_cleanup_handler(void *data) requestobject *request_obj = req_config->request_obj; /* get interpreter */ - idata = get_interpreter(NULL, req->server); + idata = get_interpreter(NULL); if (!idata) return APR_SUCCESS; /* this return code is ignored by httpd anyway */ @@ -1408,23 +1807,23 @@ static apr_status_t python_connection(conn_rec *con) /* nothing to do here */ return DECLINED; } - + /* determine interpreter to use */ - interp_name = select_interp_name(NULL, con, conf, hle, NULL, 0); + interp_name = select_interp_name(NULL, con, conf, hle, NULL); /* get/create interpreter */ - idata = get_interpreter(interp_name, con->base_server); + idata = get_interpreter(interp_name); if (!idata) { ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, con->base_server, - "python_handler: Can't get/create interpreter."); + "python_connection: Can't get/create interpreter."); return HTTP_INTERNAL_SERVER_ERROR; } /* create connection object */ conn_obj = (connobject*) MpConn_FromConn(con); - /* create a hahdler list object */ + /* create a handler list object */ conn_obj->hlo = (hlistobject *)MpHList_FromHLEntry(hle); /* @@ -1432,8 +1831,8 @@ static apr_status_t python_connection(conn_rec *con) * This is the C equivalent of * >>> resultobject = obCallBack.Dispatch(request_object, phase) */ - resultobject = PyObject_CallMethod(idata->obcallback, "ConnectionDispatch", "O", - conn_obj); + resultobject = PyObject_CallMethod(idata->obcallback, "ConnectionDispatch", + "O", conn_obj); /* release the lock and destroy tstate*/ release_interpreter(); @@ -1478,6 +1877,7 @@ static apr_status_t python_filter(int is_input, ap_filter_t *f, interpreterdata *idata; requestobject *request_obj; py_config * conf; + py_req_config * req_config; const char * interp_name = NULL; request_rec *req; filterobject *filter; @@ -1495,7 +1895,7 @@ static apr_status_t python_filter(int is_input, ap_filter_t *f, else { ctx = (python_filter_ctx *) f->ctx; } - + /* are we in transparent mode? transparent mode is on after an error, so a fitler can spit out an error without causing infinite loop */ if (ctx->transparent) { @@ -1509,31 +1909,46 @@ static apr_status_t python_filter(int is_input, ap_filter_t *f, conf = (py_config *) ap_get_module_config(req->per_dir_config, &python_module); + req_config = (py_req_config *) ap_get_module_config(req->request_config, + &python_module); + /* the name of python function to call */ + if (ctx->name) { + if (is_input) + fh = apr_hash_get(req_config->in_filters, ctx->name, APR_HASH_KEY_STRING); + else + fh = apr_hash_get(req_config->out_filters, ctx->name, APR_HASH_KEY_STRING); + } else { + if (is_input) + fh = apr_hash_get(conf->in_filters, f->frec->name, APR_HASH_KEY_STRING); + else + fh = apr_hash_get(conf->out_filters, f->frec->name, APR_HASH_KEY_STRING); + } + + if (!fh) { + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, req, + "python_filter: Could not find registered filter."); + return HTTP_INTERNAL_SERVER_ERROR; + } + /* determine interpreter to use */ - interp_name = select_interp_name(req, NULL, conf, NULL, f->frec->name, is_input); + interp_name = select_interp_name(req, NULL, conf, NULL, fh); /* get/create interpreter */ - idata = get_interpreter(interp_name, req->server); + idata = get_interpreter(interp_name); if (!idata) { ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, req, - "python_handler: Can't get/create interpreter."); + "python_filter: Can't get/create interpreter."); return HTTP_INTERNAL_SERVER_ERROR; } /* create/acquire request object */ - request_obj = get_request_object(req, interp_name, - is_input?"PythonInputFilter":"PythonOutputFilter"); - - /* the name of python function to call */ - if (is_input) - fh = apr_hash_get(conf->in_filters, f->frec->name, APR_HASH_KEY_STRING); - else - fh = apr_hash_get(conf->out_filters, f->frec->name, APR_HASH_KEY_STRING); + request_obj = python_get_request_object(req, 0); /* create filter */ filter = (filterobject *)MpFilter_FromFilter(f, bb, is_input, mode, readbytes, - fh->handler, fh->dir); + fh->handler, fh->callable, + fh->directory, fh->parent); Py_INCREF(request_obj); filter->request_obj = request_obj; @@ -1584,6 +1999,301 @@ static apr_status_t python_output_filter(ap_filter_t *f, } +/** + ** handle_python + ** + * handler function for mod_include tag + * + * The mod_include tag handler interface changed at: + * + * 20030821 (2.1.0-dev) bumped mod_include's entire API + * + * Provide a completely separate implementation for now until + * it is determined whether the new SSI_CREATE_ERROR_BUCKET + * macro can simply be copied to allow backward compatibility. + */ + +#if AP_MODULE_MAGIC_AT_LEAST(20030821,0) + +static apr_status_t handle_python(include_ctx_t *ctx, + ap_filter_t *f, + apr_bucket_brigade *bb) { + + py_config *conf; + const char *interp_name = NULL; + interpreterdata *idata; + requestobject *request_obj; + PyObject *resultobject = NULL; + filterobject *filter; + apr_bucket *tmp_buck; + + char *file = f->r->filename; + char *tag = NULL; + char *tag_val = NULL; + + PyObject *tagobject = NULL; + PyObject *codeobject = NULL; + + request_rec *req = f->r; + + if (!(ctx->flags & SSI_FLAG_PRINTING)) { + return APR_SUCCESS; + } + + if (ctx->flags & SSI_FLAG_NO_EXEC) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "#python used but not allowed in %s", file); + + SSI_CREATE_ERROR_BUCKET(ctx, f, bb); + return APR_SUCCESS; + } + + /* process tags */ + while (1) { + optfn_ssi_get_tag_and_value(ctx, &tag, &tag_val, 1); + + if (!tag || !tag_val) + break; + + if (!strlen(tag_val)) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "empty value for '%s' parameter to tag 'python' in %s", + tag, file); + + SSI_CREATE_ERROR_BUCKET(ctx, f, bb); + Py_XDECREF(tagobject); + Py_XDECREF(codeobject); + return APR_SUCCESS; + } + + if (!strcmp(tag, "eval") || !strcmp(tag, "exec")) { + if (tagobject) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "multiple 'eval/exec' parameters to tag 'python' in %s", + file); + + SSI_CREATE_ERROR_BUCKET(ctx, f, bb); + Py_XDECREF(tagobject); + Py_XDECREF(codeobject); + return APR_SUCCESS; + } + + tagobject = PyString_FromString(tag); + codeobject = PyString_FromString(tag_val); + } else { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "unexpected '%s' parameter to tag 'python' in %s", + tag, file); + + SSI_CREATE_ERROR_BUCKET(ctx, f, bb); + Py_XDECREF(tagobject); + Py_XDECREF(codeobject); + return APR_SUCCESS; + } + } + + if (!tagobject) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "missing 'eval/exec' parameter to tag 'python' in %s", + file); + + SSI_CREATE_ERROR_BUCKET(ctx, f, bb); + return APR_SUCCESS; + } + + /* get configuration */ + conf = (py_config *) ap_get_module_config(req->per_dir_config, + &python_module); + + /* determine interpreter to use */ + interp_name = select_interp_name(req, NULL, conf, NULL, NULL); + + /* get/create interpreter */ + idata = get_interpreter(interp_name); + + if (!idata) { + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, req, + "handle_python: Can't get/create interpreter."); + + Py_XDECREF(tagobject); + Py_XDECREF(codeobject); + return HTTP_INTERNAL_SERVER_ERROR; + } + + /* create/acquire request object */ + request_obj = python_get_request_object(req, 0); + + /* create filter */ + filter = (filterobject *)MpFilter_FromFilter(f, bb, 0, 0, 0, 0, 0, 0, 0); + + Py_INCREF(request_obj); + filter->request_obj = request_obj; + + /* + * Here is where we call into Python! + */ + resultobject = PyObject_CallMethod(idata->obcallback, + "IncludeDispatch", "OOO", filter, tagobject, codeobject); + + if (!resultobject) + { + SSI_CREATE_ERROR_BUCKET(ctx, f, bb); + release_interpreter(); + return APR_SUCCESS; + } + + /* clean up */ + Py_XDECREF(resultobject); + + /* release interpreter */ + release_interpreter(); + + return filter->rc; +} + +#else + +static apr_status_t handle_python(include_ctx_t *ctx, + apr_bucket_brigade **bb, + request_rec *r_bogus, + ap_filter_t *f, + apr_bucket *head_ptr, + apr_bucket **inserted_head) { + + py_config *conf; + const char *interp_name = NULL; + interpreterdata *idata; + requestobject *request_obj; + PyObject *resultobject = NULL; + filterobject *filter; + apr_bucket *tmp_buck; + + char *file = f->r->filename; + char *tag = NULL; + char *tag_val = NULL; + + PyObject *tagobject = NULL; + PyObject *codeobject = NULL; + + request_rec *req = f->r; + + if (!(ctx->flags & FLAG_PRINTING)) { + return APR_SUCCESS; + } + + if (ctx->flags & FLAG_NO_EXEC) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "#python used but not allowed in %s", file); + + CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); + return APR_SUCCESS; + } + + /* process tags */ + while (1) { + optfn_ssi_get_tag_and_value(ctx, &tag, &tag_val, 1); + + if (!tag || !tag_val) + break; + + if (!strlen(tag_val)) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "empty value for '%s' parameter to tag 'python' in %s", + tag, file); + + CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); + Py_XDECREF(tagobject); + Py_XDECREF(codeobject); + return APR_SUCCESS; + } + + if (!strcmp(tag, "eval") || !strcmp(tag, "exec")) { + if (tagobject) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "multiple 'eval/exec' parameters to tag 'python' in %s", + file); + + CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); + Py_XDECREF(tagobject); + Py_XDECREF(codeobject); + return APR_SUCCESS; + } + + tagobject = PyString_FromString(tag); + codeobject = PyString_FromString(tag_val); + } else { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "unexpected '%s' parameter to tag 'python' in %s", + tag, file); + + CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); + Py_XDECREF(tagobject); + Py_XDECREF(codeobject); + return APR_SUCCESS; + } + } + + if (!tagobject) { + ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, req, + "missing 'eval/exec' parameter to tag 'python' in %s", + file); + + CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); + return APR_SUCCESS; + } + + /* get configuration */ + conf = (py_config *) ap_get_module_config(req->per_dir_config, + &python_module); + + /* determine interpreter to use */ + interp_name = select_interp_name(req, NULL, conf, NULL, NULL); + + /* get/create interpreter */ + idata = get_interpreter(interp_name); + + if (!idata) { + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, req, + "handle_python: Can't get/create interpreter."); + + Py_XDECREF(tagobject); + Py_XDECREF(codeobject); + return HTTP_INTERNAL_SERVER_ERROR; + } + + /* create/acquire request object */ + request_obj = python_get_request_object(req, 0); + + /* create filter */ + filter = (filterobject *)MpFilter_FromFilter(f, *bb, 0, 0, 0, 0, 0, 0, 0); + + Py_INCREF(request_obj); + filter->request_obj = request_obj; + + /* + * Here is where we call into Python! + */ + resultobject = PyObject_CallMethod(idata->obcallback, + "IncludeDispatch", "OOO", filter, tagobject, codeobject); + + if (!resultobject) + { + CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head); + release_interpreter(); + return APR_SUCCESS; + } + + /* clean up */ + Py_XDECREF(resultobject); + + /* release interpreter */ + release_interpreter(); + + return filter->rc; +} + +#endif + /** ** directive_PythonImport ** @@ -1602,9 +2312,9 @@ static const char *directive_PythonImport(cmd_parms *cmd, void *mconfig, &python_module); if (!conf->imports) - conf->imports = hlist_new(cmd->pool, module, interp_name, 0); - else - hlist_append(cmd->pool, conf->imports, module, interp_name, 0); + conf->imports = apr_table_make(cmd->pool, 4); + + apr_table_add(conf->imports, interp_name, module); return NULL; @@ -1621,7 +2331,7 @@ static const char *directive_PythonPath(cmd_parms *cmd, void *mconfig, const char *rc = python_directive(cmd, mconfig, "PythonPath", val); - if (!rc) { + if (!cmd->path) { py_config *conf = ap_get_module_config(cmd->server->module_config, &python_module); return python_directive(cmd, conf, "PythonPath", val); @@ -1639,7 +2349,7 @@ static const char *directive_PythonInterpreter(cmd_parms *cmd, void *mconfig, const char *val) { const char *rc = python_directive(cmd, mconfig, "PythonInterpreter", val); - if (!rc) { + if (!cmd->path) { py_config *conf = ap_get_module_config(cmd->server->module_config, &python_module); return python_directive(cmd, conf, "PythonInterpreter", val); @@ -1655,13 +2365,13 @@ static const char *directive_PythonInterpreter(cmd_parms *cmd, void *mconfig, */ static const char *directive_PythonDebug(cmd_parms *cmd, void *mconfig, int val) { - const char *rc = python_directive_flag(mconfig, "PythonDebug", val, 0); + const char *rc = python_directive_flag(mconfig, "PythonDebug", val); - if (!rc) { + if (!cmd->path) { py_config *conf = ap_get_module_config(cmd->server->module_config, &python_module); - return python_directive_flag(conf, "PythonDebug", val, 0); + return python_directive_flag(conf, "PythonDebug", val); } return rc; } @@ -1674,12 +2384,12 @@ static const char *directive_PythonDebug(cmd_parms *cmd, void *mconfig, */ static const char *directive_PythonEnablePdb(cmd_parms *cmd, void *mconfig, int val) { - const char *rc = python_directive_flag(mconfig, "PythonEnablePdb", val, 0); + const char *rc = python_directive_flag(mconfig, "PythonEnablePdb", val); - if (!rc) { + if (!cmd->path) { py_config *conf = ap_get_module_config(cmd->server->module_config, &python_module); - return python_directive_flag(conf, "PythonEnablePdb", val, 0); + return python_directive_flag(conf, "PythonEnablePdb", val); } return rc; } @@ -1693,12 +2403,12 @@ static const char *directive_PythonEnablePdb(cmd_parms *cmd, void *mconfig, static const char *directive_PythonInterpPerDirective(cmd_parms *cmd, void *mconfig, int val) { - const char *rc = python_directive_flag(mconfig, "PythonInterpPerDirective", val, 0); + const char *rc = python_directive_flag(mconfig, "PythonInterpPerDirective", val); - if (!rc) { + if (!cmd->path) { py_config *conf = ap_get_module_config(cmd->server->module_config, &python_module); - return python_directive_flag(conf, "PythonInterpPerDirective", val, 0); + return python_directive_flag(conf, "PythonInterpPerDirective", val); } return rc; } @@ -1712,7 +2422,7 @@ static const char *directive_PythonInterpPerDirective(cmd_parms *cmd, static const char *directive_PythonInterpPerDirectory(cmd_parms *cmd, void *mconfig, int val) { - return python_directive_flag(mconfig, "PythonInterpPerDirectory", val, 0); + return python_directive_flag(mconfig, "PythonInterpPerDirectory", val); } /** @@ -1724,12 +2434,12 @@ static const char *directive_PythonInterpPerDirectory(cmd_parms *cmd, static const char *directive_PythonAutoReload(cmd_parms *cmd, void *mconfig, int val) { - const char *rc = python_directive_flag(mconfig, "PythonAutoReload", val, 1); + const char *rc = python_directive_flag(mconfig, "PythonAutoReload", val); - if (!rc) { + if (!cmd->path) { py_config *conf = ap_get_module_config(cmd->server->module_config, &python_module); - return python_directive_flag(conf, "PythonAutoReload", val, 1); + return python_directive_flag(conf, "PythonAutoReload", val); } return rc; } @@ -1759,10 +2469,10 @@ static const char *directive_PythonOption(cmd_parms *cmd, void * mconfig, } } else { - /** We don't remove the value, but set it - to an empty string. There is no possibility - of colliding with an actual value, since - an entry string precisely means 'remove the value' */ + /** We don't remove the value, but set it + to an empty string. There is no possibility + of colliding with an actual value, since + an entry string precisely means 'remove the value' */ apr_table_set(conf->options, key, ""); if (!cmd->path) { @@ -1839,15 +2549,23 @@ static const char *directive_PythonHandlerModule(cmd_parms *cmd, void *mconfig, * This handler explodes into all other handlers, but their absense will be * silently ignored. */ + + /* + * XXX Not used at present. See problems noted against connection + * handler below. + * py_config *srv_conf = ap_get_module_config(cmd->server->module_config, &python_module); + */ python_directive_handler(cmd, mconfig, "PythonPostReadRequestHandler", val, SILENT); python_directive_handler(cmd, mconfig, "PythonTransHandler", val, SILENT); python_directive_handler(cmd, mconfig, "PythonHeaderParserHandler", val, SILENT); python_directive_handler(cmd, mconfig, "PythonAccessHandler", val, SILENT); + python_directive_handler(cmd, mconfig, "PythonAuthenHandler", val, SILENT); python_directive_handler(cmd, mconfig, "PythonAuthzHandler", val, SILENT); python_directive_handler(cmd, mconfig, "PythonTypeHandler", val, SILENT); + python_directive_handler(cmd, mconfig, "PythonFixupHandler", val, SILENT); python_directive_handler(cmd, mconfig, "PythonHandler", val, SILENT); python_directive_handler(cmd, mconfig, "PythonInitHandler", val, SILENT); python_directive_handler(cmd, mconfig, "PythonLogHandler", val, SILENT); @@ -1898,6 +2616,14 @@ static const char *directive_PythonInputFilter(cmd_parms *cmd, void *mconfig, py_handler *fh; ap_filter_rec_t *frec; + char *directory = 0; + int d_is_fnmatch = 0; + ap_regex_t *d_regex = 0; + + char *location = 0; + int l_is_fnmatch = 0; + ap_regex_t *l_regex = 0; + if (!name) name = apr_pstrdup(cmd->pool, handler); @@ -1908,9 +2634,19 @@ static const char *directive_PythonInputFilter(cmd_parms *cmd, void *mconfig, conf = (py_config *) mconfig; + determine_context(cmd->pool, cmd, &directory, &d_is_fnmatch, &d_regex, + &location, &l_is_fnmatch, &l_regex); + fh = (py_handler *) apr_pcalloc(cmd->pool, sizeof(py_handler)); fh->handler = (char *)handler; - fh->dir = conf->config_dir; + + fh->directory = directory; + fh->d_is_fnmatch = d_is_fnmatch; + fh->d_regex = d_regex; + + fh->location = location; + fh->l_is_fnmatch = l_is_fnmatch; + fh->l_regex = l_regex; apr_hash_set(conf->in_filters, frec->name, APR_HASH_KEY_STRING, fh); @@ -1922,7 +2658,15 @@ static const char *directive_PythonOutputFilter(cmd_parms *cmd, void *mconfig, py_config *conf; py_handler *fh; ap_filter_rec_t *frec; - + + char *directory = 0; + int d_is_fnmatch = 0; + ap_regex_t *d_regex = 0; + + char *location = 0; + int l_is_fnmatch = 0; + ap_regex_t *l_regex = 0; + if (!name) name = apr_pstrdup(cmd->pool, handler); @@ -1930,12 +2674,22 @@ static const char *directive_PythonOutputFilter(cmd_parms *cmd, void *mconfig, directive is only allowed in the main config. For .htaccess we would have to make sure not to duplicate this */ frec = ap_register_output_filter(name, python_output_filter, NULL, AP_FTYPE_RESOURCE); - + + determine_context(cmd->pool, cmd, &directory, &d_is_fnmatch, &d_regex, + &location, &l_is_fnmatch, &l_regex); + conf = (py_config *) mconfig; fh = (py_handler *) apr_pcalloc(cmd->pool, sizeof(py_handler)); fh->handler = (char *)handler; - fh->dir = conf->config_dir; + + fh->directory = directory; + fh->d_is_fnmatch = d_is_fnmatch; + fh->d_regex = d_regex; + + fh->location = location; + fh->l_is_fnmatch = l_is_fnmatch; + fh->l_regex = l_regex; apr_hash_set(conf->out_filters, frec->name, APR_HASH_KEY_STRING, fh); @@ -1952,7 +2706,7 @@ static apr_status_t python_finalize(void *data) { interpreterdata *idata; - idata = get_interpreter(NULL, NULL); + idata = get_interpreter(NULL); if (idata) { @@ -1977,9 +2731,13 @@ static void PythonChildInitHandler(apr_pool_t *p, server_rec *s) { - hl_entry *hle; + const apr_array_header_t *ah; + apr_table_entry_t *elts; + int i; + py_config *conf = ap_get_module_config(s->module_config, &python_module); py_global_config *glb; + PyObject *resultobject = NULL; /* accordig Py C Docs we must do this after forking */ @@ -2001,7 +2759,20 @@ static void PythonChildInitHandler(apr_pool_t *p, server_rec *s) * end the Python interpreter *after* all other cleanups. */ + /* + * XXX Trying to cleanup Python on process shutdown causes + * problems. This seems to mainly be an issue where there + * are user created threads which are running in parallel as + * the environment they are running in will be destroyed + * from underneath them potentially resulting in crashes, + * process hangs or simply Python errors. There is also a + * small chance that finalization code can be called within + * a signal handler in some configurations which could cause + * problems as well. Thus disable cleanup of Python when + * child processes are being shutdown. (MODPYTHON-109) + * apr_pool_cleanup_register(p, NULL, python_finalize, apr_pool_cleanup_null); + */ /* * Reinit mutexes @@ -2018,73 +2789,63 @@ static void PythonChildInitHandler(apr_pool_t *p, server_rec *s) */ child_init_pool = p; + /* register python handler for mod_include. could probably + * also have done this in python_init() instead */ + optfn_register_include_handler = APR_RETRIEVE_OPTIONAL_FN(ap_register_include_handler); + optfn_ssi_get_tag_and_value = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_get_tag_and_value); + optfn_ssi_parse_string = APR_RETRIEVE_OPTIONAL_FN(ap_ssi_parse_string); + if (optfn_register_include_handler && optfn_ssi_get_tag_and_value && + optfn_ssi_parse_string) { + optfn_register_include_handler("python", handle_python); + } + /* * Now run PythonImports */ - hle = conf->imports; - while(hle) { + if (conf->imports) { + ah = apr_table_elts (conf->imports); + elts = (apr_table_entry_t *) ah->elts; - interpreterdata *idata; - const char *module_name = hle->handler; - const char *interp_name = hle->directory; - const char *ppath; + i = ah->nelts; - /* get interpreter */ - idata = get_interpreter(interp_name, s); - if (!idata) - return; + while (i--) { + if (elts[i].key) { - /* set up PythonPath */ - ppath = apr_table_get(conf->directives, "PythonPath"); - if (ppath) { + interpreterdata *idata; + const char *interp_name = elts[i].key; + const char *module_name = elts[i].val; - PyObject *globals, *locals, *newpath, *sys; - - globals = PyDict_New(); - locals = PyDict_New(); - - sys = PyImport_ImportModuleEx("sys", globals, locals, NULL); - if (!sys) - goto err; - - PyDict_SetItemString(globals, "sys", sys); - newpath = PyRun_String((char *)ppath, Py_eval_input, globals, locals); - if (!newpath) - goto err; - - if (PyObject_SetAttrString(sys, "path", newpath) == -1) - goto err; - - Py_XDECREF(sys); - Py_XDECREF(newpath); - Py_XDECREF(globals); - Py_XDECREF(locals); - goto success; - - err: - PyErr_Print(); - fflush(stderr); - release_interpreter(); - return; - } + /* get interpreter */ + idata = get_interpreter(interp_name); + if (!idata) + return; - success: - /* now import the specified module */ - if (! PyImport_ImportModule((char *)module_name)) { - if (PyErr_Occurred()) { - PyErr_Print(); - fflush(stderr); - } - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s, - "directive_PythonImport: error importing %s", (!module_name) ? "<null>" : module_name); - } + /* + * Call into Python to do import. + * This is the C equivalent of + * >>> resultobject = obCallBack.ImportDispatch(module_name) + */ + resultobject = PyObject_CallMethod(idata->obcallback, + "ImportDispatch", "s", module_name); - /* release interpreter */ - release_interpreter(); + if (!resultobject) { + if (PyErr_Occurred()) { + PyErr_Print(); + fflush(stderr); + } + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, s, + "directive_PythonImport: error importing %s", + (!module_name) ? "<null>" : module_name); + } - /* next module */ - hle = hle->next; + /* clean up */ + Py_XDECREF(resultobject); + + /* release interpreter */ + release_interpreter(); + } + } } } @@ -2202,6 +2963,12 @@ static void python_register_hooks(apr_pool_t *p) ap_hook_log_transaction(PythonLogHandler, NULL, NULL, APR_HOOK_MIDDLE); + /* dynamic input/output filter entry points */ + ap_register_input_filter(FILTER_NAME, python_input_filter, NULL, + AP_FTYPE_RESOURCE); + ap_register_output_filter(FILTER_NAME, python_output_filter, NULL, + AP_FTYPE_RESOURCE); + /* process initializer */ ap_hook_child_init(PythonChildInitHandler, NULL, NULL, APR_HOOK_MIDDLE); diff --git a/src/psp_parser.c b/src/psp_parser.c index 37785358b5746b0a4cb964e4e02880c8ee7944ce..b2f438094a820df50fcf06dc42b6f24812f00da0 100644 --- a/src/psp_parser.c +++ b/src/psp_parser.c @@ -9,7 +9,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 31 +#define YY_FLEX_SUBMINOR_VERSION 33 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -31,7 +31,15 @@ /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */ -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L +#if __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + #include <inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; @@ -154,6 +162,10 @@ int yylex_init (yyscan_t* scanner); #define YY_BUF_SIZE 16384 #endif +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; @@ -356,7 +368,7 @@ static yyconst flex_int16_t yy_accept[73] = { 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 24, 2, 1, 2, 11, 10, 11, 11, - 11, 15, 12, 15, 15, 14, 19, 18, 19, 19, + 11, 15, 12, 12, 15, 14, 19, 18, 19, 19, 16, 23, 23, 23, 23, 1, 10, 7, 3, 4, 5, 12, 13, 18, 17, 16, 21, 0, 0, 0, 6, 8, 0, 0, 9, 0, 22, 0, 0, 0, @@ -485,7 +497,7 @@ static yyconst flex_int16_t yy_chk[115] = * implied. See the License for the specific language governing * permissions and limitations under the License. * - * $Id: psp_parser.c 332365 2005-11-10 20:19:36Z jgallacher $ + * $Id: psp_parser.c 398222 2006-04-29 19:20:50Z jgallacher $ * * This file originally written by Sterling Hughes. * @@ -511,7 +523,7 @@ static yyconst flex_int16_t yy_chk[115] = -#line 515 "psp_parser.c" +#line 527 "psp_parser.c" #define INITIAL 0 #define TEXT 1 @@ -566,6 +578,8 @@ struct yyguts_t }; /* end struct yyguts_t */ +static int yy_init_globals (yyscan_t yyscanner ); + /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ @@ -737,11 +751,11 @@ YY_DECL #line 47 "psp_parser.l" -#line 741 "psp_parser.c" +#line 755 "psp_parser.c" - if ( yyg->yy_init ) + if ( !yyg->yy_init ) { - yyg->yy_init = 0; + yyg->yy_init = 1; #ifdef YY_USER_INIT YY_USER_INIT; @@ -1089,7 +1103,7 @@ YY_RULE_SETUP #line 240 "psp_parser.l" ECHO; YY_BREAK -#line 1093 "psp_parser.c" +#line 1107 "psp_parser.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(PYCODE): case YY_STATE_EOF(INDENT): @@ -1280,7 +1294,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - size_t num_to_read = + int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -1325,7 +1339,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, num_to_read ); + yyg->yy_n_chars, (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; } @@ -1397,7 +1411,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) { register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; + struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ register char *yy_cp = yyg->yy_c_buf_p; register YY_CHAR yy_c = 1; @@ -1842,17 +1856,16 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size , yyscan_t yyscann /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. - * @param str a NUL-terminated string to scan - * @param yy_str a NUL-terminated string to scan + * @param yystr a NUL-terminated string to scan * @param yyscanner The scanner object. * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ -YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner) { - return yy_scan_bytes(yy_str,strlen(yy_str) ,yyscanner); + return yy_scan_bytes(yystr,strlen(yystr) ,yyscanner); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -1862,7 +1875,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yy_str , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; @@ -1870,15 +1883,15 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * bytes, int len , yyscan_t yyscan int i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; + n = _yybytes_len + 2; buf = (char *) yyalloc(n ,yyscanner ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer(buf,n ,yyscanner); if ( ! b ) @@ -2065,21 +2078,51 @@ void yyset_debug (int bdebug , yyscan_t yyscanner) /* Accessor methods for yylval and yylloc */ +/* User-visible API */ + +/* yylex_init is special because it creates the scanner itself, so it is + * the ONLY reentrant function that doesn't take the scanner as the last argument. + * That's why we explicitly handle the declaration, instead of using our macros. + */ + +int yylex_init(yyscan_t* ptr_yy_globals) + +{ + if (ptr_yy_globals == NULL){ + errno = EINVAL; + return 1; + } + + *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); + + if (*ptr_yy_globals == NULL){ + errno = ENOMEM; + return 1; + } + + /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ + memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); + + return yy_init_globals ( *ptr_yy_globals ); +} + static int yy_init_globals (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* Initialization is the same as for the non-reentrant scanner. - This function is called once per scanner lifetime. */ + * This function is called from yylex_destroy(), so don't allocate here. + */ yyg->yy_buffer_stack = 0; yyg->yy_buffer_stack_top = 0; yyg->yy_buffer_stack_max = 0; yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 1; + yyg->yy_init = 0; yyg->yy_start = 0; + yyg->yy_start_stack_ptr = 0; yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = (int *) 0; + yyg->yy_start_stack = NULL; /* Defined in main.c */ #ifdef YY_STDINIT @@ -2096,33 +2139,6 @@ static int yy_init_globals (yyscan_t yyscanner) return 0; } -/* User-visible API */ - -/* yylex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int yylex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - memset(*ptr_yy_globals,0,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (yyscan_t yyscanner) { @@ -2143,8 +2159,13 @@ int yylex_destroy (yyscan_t yyscanner) yyfree(yyg->yy_start_stack ,yyscanner ); yyg->yy_start_stack = NULL; + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( yyscanner); + /* Destroy the main struct (reentrant only). */ yyfree ( yyscanner , yyscanner ); + yyscanner = NULL; return 0; } @@ -2156,7 +2177,6 @@ int yylex_destroy (yyscan_t yyscanner) static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) { register int i; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -2166,7 +2186,6 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) { register int n; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; for ( n = 0; s[n]; ++n ) ; @@ -2198,18 +2217,6 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#undef YY_NEW_FILE -#undef YY_FLUSH_BUFFER -#undef yy_set_bol -#undef yy_new_buffer -#undef yy_set_interactive -#undef yytext_ptr -#undef YY_DO_BEFORE_ACTION - -#ifdef YY_DECL_IS_OURS -#undef YY_DECL_IS_OURS -#undef YY_DECL -#endif #line 240 "psp_parser.l" diff --git a/src/psp_parser.l b/src/psp_parser.l index 4b6a4d0f0dc1054a79b0da14a164a609498d4a29..fd35e017c4f833e4830f06442ee2fdb4335783c4 100644 --- a/src/psp_parser.l +++ b/src/psp_parser.l @@ -14,7 +14,7 @@ * implied. See the License for the specific language governing * permissions and limitations under the License. * - * $Id: psp_parser.l 332365 2005-11-10 20:19:36Z jgallacher $ + * $Id: psp_parser.l 398222 2006-04-29 19:20:50Z jgallacher $ * * This file originally written by Sterling Hughes. * @@ -119,7 +119,7 @@ } } -<PYCODE>\r\n|\n { +<PYCODE>\r\n|\n|\r { psp_string_appendc(&PSP_PG(pycode), '\n'); PSP_PG(seen_newline) = 1; diff --git a/src/psp_string.c b/src/psp_string.c index afc62544f429db10afffd8b2d1fe2a0cc466d90c..fb6908ea5438585dd78fd8c89fe1359e5fd84138 100644 --- a/src/psp_string.c +++ b/src/psp_string.c @@ -1,58 +1,22 @@ -/* ==================================================================== - * The Apache Software License, Version 1.1 +/* + * Copyright 2004 Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); you + * may not use this file except in compliance with the License. You + * may obtain a copy of the License at * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights - * reserved. + * http://www.apache.org/licenses/LICENSE-2.0 * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * Originally developed by Gregory Trubetskoy. * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "mod_python", or "modpython", nor may these terms appear in their - * name, without prior written permission of the Apache Software - * Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * <http://www.apache.org/>. - * - * $Id: psp_string.c 106619 2004-11-25 22:10:52Z nd $ + * $Id: psp_string.c 379638 2006-02-22 00:41:51Z jgallacher $ * * See accompanying documentation and source code comments * for details. diff --git a/src/requestobject.c b/src/requestobject.c index 8ba30b3dfd86ae4627cda5dfeb67a3cf1c824ba1..6675f6e40f5d71afaaa27b509eb0d71e384a4012 100644 --- a/src/requestobject.c +++ b/src/requestobject.c @@ -18,7 +18,7 @@ * * requestobject.c * - * $Id: requestobject.c 420297 2006-07-09 13:53:06Z nlehuen $ + * $Id: requestobject.c 481717 2006-12-03 04:36:37Z grahamd $ * */ @@ -59,9 +59,6 @@ PyObject * MpRequest_FromRequest(request_rec *req) result->request_rec = req; result->connection = NULL; result->server = NULL; - result->next = NULL; - result->prev = NULL; - result->main = NULL; result->headers_in = MpTable_FromTable(req->headers_in); result->headers_out = MpTable_FromTable(req->headers_out); result->err_headers_out = MpTable_FromTable(req->err_headers_out); @@ -69,16 +66,20 @@ PyObject * MpRequest_FromRequest(request_rec *req) result->notes = MpTable_FromTable(req->notes); result->phase = NULL; result->extension = NULL; - result->interpreter = NULL; result->content_type_set = 0; + result->bytes_queued = 0; result->hlo = NULL; + /* PYTHON 2.5: 'PyList_New' uses Py_ssize_t for input parameters */ + result->callbacks = PyList_New(0); + if (!result->callbacks) + return PyErr_NoMemory(); result->rbuff = NULL; result->rbuff_pos = 0; result->rbuff_len = 0; - result->session = NULL; - // we make sure that the object dictionary is there - // before registering the object with the GC + /* we make sure that the object dictionary is there + * before registering the object with the GC + */ PyObject_GC_Track(result); return (PyObject *) result; @@ -137,13 +138,20 @@ static int valid_phase(const char *p) static PyObject *req_add_handler(requestobject *self, PyObject *args) { - char *phase; - char *handler; + char *phase = NULL; + char *handler = NULL; + PyObject *callable = NULL; const char *dir = NULL; const char *currphase; - if (! PyArg_ParseTuple(args, "ss|s", &phase, &handler, &dir)) - return NULL; + if (! PyArg_ParseTuple(args, "ss|z", &phase, &handler, &dir)) { + PyErr_Clear(); + if (! PyArg_ParseTuple(args, "sO|z", &phase, &callable, &dir)) { + PyErr_SetString(PyExc_ValueError, + "handler must be a string or callable object"); + return NULL; + } + } if (! valid_phase(phase)) { PyErr_SetString(PyExc_IndexError, @@ -151,7 +159,53 @@ static PyObject *req_add_handler(requestobject *self, PyObject *args) "Invalid phase: %s", phase)); return NULL; } - + + if (callable) { + if (!PyCallable_Check(callable)) { + PyErr_SetString(PyExc_ValueError, + "handler must be a string or callable object"); + return NULL; + } else { + /* Cache reference in list of callable handler objects + * so that they can be dereferenced when request object + * destroyed at end of phase. */ + if (PyList_Append(self->callbacks, callable) == -1) + return NULL; + } + } + + /* Canonicalize path and add trailing slash at + * this point if directory was provided. */ + + if (dir) { + + char *newpath = 0; + apr_status_t rv; + + rv = apr_filepath_merge(&newpath, NULL, dir, + APR_FILEPATH_TRUENAME, + self->request_rec->pool); + + /* If there is a failure, use the original path + * which was supplied. */ + + if (rv == APR_SUCCESS || rv == APR_EPATHWILD) { + dir = newpath; + if (dir[strlen(dir) - 1] != '/') { + dir = apr_pstrcat(self->request_rec->pool, dir, "/", NULL); + } + } + else { + /* dir is from Python, so duplicate it */ + + dir = apr_pstrdup(self->request_rec->pool, dir); + } + } + + /* handler is from Python, so duplicate it */ + + handler = apr_pstrdup(self->request_rec->pool, handler); + /* which phase are we processing? */ currphase = PyString_AsString(self->phase); @@ -160,7 +214,8 @@ static PyObject *req_add_handler(requestobject *self, PyObject *args) /* then just append to hlist */ hlist_append(self->request_rec->pool, self->hlo->head, - handler, dir, NOTSILENT); + handler, callable, dir, 0, NULL, NULL, 0, NULL, NOTSILENT, + self->hlo->head); } else { /* this is a phase that we're not in */ @@ -176,11 +231,13 @@ static PyObject *req_add_handler(requestobject *self, PyObject *args) hle = apr_hash_get(req_config->dynhls, phase, APR_HASH_KEY_STRING); if (! hle) { - hle = hlist_new(self->request_rec->pool, handler, dir, NOTSILENT); + hle = hlist_new(self->request_rec->pool, handler, callable, dir, + 0, NULL, NULL, 0, NULL, NOTSILENT, self->hlo->head); apr_hash_set(req_config->dynhls, phase, APR_HASH_KEY_STRING, hle); } else { - hlist_append(self->request_rec->pool, hle, handler, dir, NOTSILENT); + hlist_append(self->request_rec->pool, hle, handler, callable, dir, + 0, NULL, NULL, 0, NULL, NOTSILENT, self->hlo->head); } } @@ -188,6 +245,224 @@ static PyObject *req_add_handler(requestobject *self, PyObject *args) return Py_None; } +/** + ** request.add_input_filter(request self, string name) + ** + * Specifies that a pre registered filter be added to input filter chain. + */ + +static PyObject *req_add_input_filter(requestobject *self, PyObject *args) +{ + char *name; + py_req_config *req_config; + python_filter_ctx *ctx; + + if (! PyArg_ParseTuple(args, "s", &name)) + return NULL; + + req_config = (py_req_config *) ap_get_module_config( + self->request_rec->request_config, &python_module); + + if (apr_hash_get(req_config->in_filters, name, APR_HASH_KEY_STRING)) { + ctx = (python_filter_ctx *) apr_pcalloc(self->request_rec->pool, + sizeof(python_filter_ctx)); + ctx->name = apr_pstrdup(self->request_rec->pool, name); + + ap_add_input_filter(FILTER_NAME, ctx, self->request_rec, + self->request_rec->connection); + } else { + ap_add_input_filter(name, NULL, self->request_rec, + self->request_rec->connection); + } + + Py_INCREF(Py_None); + return Py_None; +} + +/** + ** request.add_output_filter(request self, string name) + ** + * Specifies that a pre registered filter be added to output filter chain. + */ + +static PyObject *req_add_output_filter(requestobject *self, PyObject *args) +{ + char *name; + py_req_config *req_config; + python_filter_ctx *ctx; + + if (! PyArg_ParseTuple(args, "s", &name)) + return NULL; + + req_config = (py_req_config *) ap_get_module_config( + self->request_rec->request_config, &python_module); + + if (apr_hash_get(req_config->out_filters, name, APR_HASH_KEY_STRING)) { + ctx = (python_filter_ctx *) apr_pcalloc(self->request_rec->pool, + sizeof(python_filter_ctx)); + ctx->name = apr_pstrdup(self->request_rec->pool, name); + + ap_add_output_filter(FILTER_NAME, ctx, self->request_rec, + self->request_rec->connection); + } else { + ap_add_output_filter(name, NULL, self->request_rec, + self->request_rec->connection); + } + + Py_INCREF(Py_None); + return Py_None; +} + +/** + ** request.register_input_filter(request self, string name, string handler, list dir) + ** + * Registers an input filter active for life of the request. + */ + +static PyObject *req_register_input_filter(requestobject *self, PyObject *args) +{ + char *name = NULL; + char *handler = NULL; + PyObject *callable = NULL; + char *dir = NULL; + py_req_config *req_config; + py_handler *fh; + + if (! PyArg_ParseTuple(args, "ss|s", &name, &handler, &dir)) { + PyErr_Clear(); + if (! PyArg_ParseTuple(args, "sO|s", &name, &callable, &dir)) { + PyErr_SetString(PyExc_ValueError, + "handler must be a string or callable object"); + return NULL; + } + } + + if (callable) { + /* Cache reference in list of callable filter objects + * so that they can be dereferenced when request object + * destroyed at end of phase. */ + if (PyList_Append(self->callbacks, callable) == -1) + return NULL; + } + + req_config = (py_req_config *) ap_get_module_config( + self->request_rec->request_config, &python_module); + + fh = (py_handler *) apr_pcalloc(self->request_rec->pool, + sizeof(py_handler)); + fh->handler = apr_pstrdup(self->request_rec->pool, handler); + fh->callable = callable; + fh->parent = self->hlo->head; + + /* Canonicalize path and add trailing slash at + * this point if directory was provided. */ + + if (dir) { + + char *newpath = 0; + apr_status_t rv; + + rv = apr_filepath_merge(&newpath, NULL, dir, + APR_FILEPATH_TRUENAME, + self->request_rec->pool); + + /* If there is a failure, use the original path + * which was supplied. */ + + if (rv == APR_SUCCESS || rv == APR_EPATHWILD) { + dir = newpath; + if (dir[strlen(dir) - 1] != '/') { + dir = apr_pstrcat(self->request_rec->pool, dir, "/", NULL); + } + fh->directory = dir; + } else { + fh->directory = apr_pstrdup(self->request_rec->pool, dir); + } + } + + apr_hash_set(req_config->in_filters, + apr_pstrdup(self->request_rec->pool, name), + APR_HASH_KEY_STRING, fh); + + Py_INCREF(Py_None); + return Py_None; +} + +/** + ** request.register_output_filter(request self, string name, string handler, list dir) + ** + * Registers an output filter active for life of the request. + */ + +static PyObject *req_register_output_filter(requestobject *self, PyObject *args) +{ + char *name = NULL; + char *handler = NULL; + PyObject *callable = NULL; + char *dir = NULL; + py_req_config *req_config; + py_handler *fh; + + if (! PyArg_ParseTuple(args, "ss|s", &name, &handler, &dir)) { + PyErr_Clear(); + if (! PyArg_ParseTuple(args, "sO|s", &name, &callable, &dir)) { + PyErr_SetString(PyExc_ValueError, + "handler must be a string or callable object"); + return NULL; + } + } + + if (callable) { + /* Cache reference in list of callable filter objects + * so that they can be dereferenced when request object + * destroyed at end of phase. */ + if (PyList_Append(self->callbacks, callable) == -1) + return NULL; + } + + req_config = (py_req_config *) ap_get_module_config( + self->request_rec->request_config, &python_module); + + fh = (py_handler *) apr_pcalloc(self->request_rec->pool, + sizeof(py_handler)); + fh->handler = apr_pstrdup(self->request_rec->pool, handler); + fh->callable = callable; + fh->parent = self->hlo->head; + + /* Canonicalize path and add trailing slash at + * this point if directory was provided. */ + + if (dir) { + + char *newpath = 0; + apr_status_t rv; + + rv = apr_filepath_merge(&newpath, NULL, dir, + APR_FILEPATH_TRUENAME, + self->request_rec->pool); + + /* If there is a failure, use the original path + * which was supplied. */ + + if (rv == APR_SUCCESS || rv == APR_EPATHWILD) { + dir = newpath; + if (dir[strlen(dir) - 1] != '/') { + dir = apr_pstrcat(self->request_rec->pool, dir, "/", NULL); + } + fh->directory = dir; + } else { + fh->directory = apr_pstrdup(self->request_rec->pool, dir); + } + } + + apr_hash_set(req_config->out_filters, + apr_pstrdup(self->request_rec->pool, name), + APR_HASH_KEY_STRING, fh); + + Py_INCREF(Py_None); + return Py_None; +} + /** ** request.allow_methods(request self, list methods, reset=0) ** @@ -211,12 +486,14 @@ static PyObject *req_allow_methods(requestobject *self, PyObject *args) return NULL; } + /* PYTHON 2.5: 'PySequence_Length' uses Py_ssize_t for input parameters */ len = PySequence_Length(methods); if (len) { PyObject *method; + /* PYTHON 2.5: 'PySequence_GetItem' uses Py_ssize_t for input parameters */ method = PySequence_GetItem(methods, 0); if (! PyString_Check(method)) { PyErr_SetString(PyExc_TypeError, @@ -228,6 +505,7 @@ static PyObject *req_allow_methods(requestobject *self, PyObject *args) PyString_AS_STRING(method), NULL); for (i = 1; i < len; i++) { + /* PYTHON 2.5: 'PySequence_GetItem' uses Py_ssize_t for input parameters */ method = PySequence_GetItem(methods, i); if (! PyString_Check(method)) { PyErr_SetString(PyExc_TypeError, @@ -254,7 +532,6 @@ static PyObject *req_allow_methods(requestobject *self, PyObject *args) static PyObject * req_is_https(requestobject *self) { int is_https; - PyObject *result; if (!optfn_is_https) optfn_is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https); @@ -273,7 +550,6 @@ static PyObject * req_is_https(requestobject *self) static PyObject * req_ssl_var_lookup(requestobject *self, PyObject *args) { - PyObject *result; char *var_name; if (! PyArg_ParseTuple(args, "s", &var_name)) @@ -334,6 +610,69 @@ static PyObject * req_get_basic_auth_pw(requestobject *self, PyObject *args) } } +/** + ** request.auth_name(self) + ** + * ap_auth_name wrapper + */ + +static PyObject *req_auth_name(requestobject *self) +{ + const char *auth_name = ap_auth_name(self->request_rec); + + if (!auth_name) { + Py_INCREF(Py_None); + return Py_None; + } + return PyString_FromString(auth_name); +} + +/** + ** request.auth_type(self) + ** + * ap_auth_type wrapper + */ + +static PyObject *req_auth_type(requestobject *self) +{ + const char *auth_type = ap_auth_type(self->request_rec); + + if (!auth_type) { + Py_INCREF(Py_None); + return Py_None; + } + + return PyString_FromString(auth_type); +} + +/** + ** request.construct_url(self) + ** + * ap_construct_url wrapper + */ + +static PyObject *req_construct_url(requestobject *self, PyObject *args) +{ + char *uri; + + if (! PyArg_ParseTuple(args, "s", &uri)) + return NULL; + + return PyString_FromString(ap_construct_url(self->request_rec->pool, + uri, self->request_rec)); +} + +/** + ** request.discard_request_body(request self) + ** + * discard content supplied with request + */ + +static PyObject * req_discard_request_body(requestobject *self) +{ + return PyInt_FromLong(ap_discard_request_body(self->request_rec)); +} + /** ** request.get_addhandler_exts(request self) ** @@ -423,8 +762,8 @@ static PyObject * req_get_options(requestobject *self, PyObject *args) apr_table_t* table = conf->options; int i; - apr_array_header_t* ah = apr_table_elts(table); - apr_table_entry_t* elts = ah->elts; + const apr_array_header_t* ah = apr_table_elts(table); + apr_table_entry_t* elts = (apr_table_entry_t *) ah->elts; /* * We remove the empty values, since they cannot have been defined @@ -441,65 +780,6 @@ static PyObject * req_get_options(requestobject *self, PyObject *args) return MpTable_FromTable(table); } -/** - ** request.get_session() - ** - * Get the session instance, or create a new one. - * This method just calls the python function - * create_session() in mod_python/Session.py to actually create - * the session instance. - */ - -static PyObject *req_get_session(requestobject *self, PyObject *args) -{ -#ifdef ENABLE_GET_SESSION - /* get_session is not ready for mod_python 3.2 release - * We'll leave the code intact but raise an error - */ - PyObject *m; - PyObject *sid; - PyObject *req; - PyObject *result; - - if (!self->session) { - /* Get the session id from the subprocess_env table if possible. - * If a session instance exists at the time of a req_internal_redirect() - * call, the session id will be added to the subprocess_env table with - * the key PYSID. req_internal_redirect() calls ap_internal_redirect(), - * which prepends all keys in subprocess_env with "REDIRECT_", so the key - * we want is REDIRECT_PYSID. - * req_internal_redirect() should have unlocked the session, so we do not - * need to worry about session deadlocking as a result of the redirect. - */ - req = (PyObject *)self; - m = PyImport_ImportModule("mod_python.Session"); - sid = PyObject_CallMethod(self->subprocess_env, "get", "(ss)","REDIRECT_PYSID", ""); - self->session = PyObject_CallMethod(m, "create_session", "(OO)", req, sid); - Py_DECREF(m); - Py_DECREF(sid); - - /* TODO - * Failure to DECREF req results in a serious memory leak. - * On the other hand, if the session created does not save - * a reference to the request, we'll get a segfault. - * This should be documented for developers subclassing BaseSession. - * Maybe we should check self->session for the _req attribute - * and only do the decref if it exists? Or is there a better - * way to handle this? - Jim - */ - Py_DECREF(req); - if (self->session == NULL) - return NULL; - } - result = self->session; - Py_INCREF(result); - return result; -#else - PyErr_SetString(PyExc_NotImplementedError, - "get_session is not implemented"); - return NULL; -#endif -} /** ** request.internal_redirect(request self, string newuri) @@ -509,59 +789,10 @@ static PyObject *req_get_session(requestobject *self, PyObject *args) static PyObject * req_internal_redirect(requestobject *self, PyObject *args) { char *new_uri; -#ifdef ENABLE_GET_SESSION - PyObject *sid; - PyObject *rc; -#endif if (! PyArg_ParseTuple(args, "z", &new_uri)) return NULL; /* error */ -#ifdef ENABLE_GET_SESSION - if (self->session){ - /* A session exists, so save and unlock it before the redirect. - * The session instance is not preserved across the ap_internal_direct() - * call, so all we can do is save a reference to session id as a string - * and recreate the session instance when the redirected request - * is processed. This is handled by req_get_session(). - * Note that ap_internal_redirect() makes a copy of the subprocess_env table, - * pre-pending all the keys in the table with "REDIRECT_". - * Each internal_redirect results in a save and a read, which may impact - * performance, depending on the type of persistent store used by the - * session class. - */ - - if (!(sid = PyObject_CallMethod(self->session, "id", NULL))) { - sid = PyString_FromString(""); - } - - /* Save the session id in the subprocess_env table. This id will be used - * to recreate the session instance when the redirected request is - * processed. - */ - if ((rc = PyObject_CallMethod(self->subprocess_env, "setdefault", "(sS)","PYSID", sid))) { - Py_DECREF(rc); - } - - Py_DECREF(sid); - - /* Save the session instance so any session data can be restored when - * the redirected request is processed. - */ - if (!(rc = PyObject_CallMethod(self->session, "save", NULL))) { - Py_DECREF(rc); - } - - /* Unlock the session. The session instance will be recreated when - * the redirected request is processed. Failure to unlock the session - * here will result in a deadlock. - */ - if (!(rc = PyObject_CallMethod(self->session, "unlock", NULL))) { - Py_DECREF(rc); - } - } -#endif - Py_BEGIN_ALLOW_THREADS ap_internal_redirect(new_uri, self->request_rec); Py_END_ALLOW_THREADS @@ -654,6 +885,7 @@ static PyObject * req_read(requestobject *self, PyObject *args) len = self->request_rec->remaining + (self->rbuff_len - self->rbuff_pos); + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ result = PyString_FromStringAndSize(NULL, len); /* possibly no more memory */ @@ -698,6 +930,7 @@ static PyObject * req_read(requestobject *self, PyObject *args) /* resize if necessary */ if (bytes_read < len) + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ if(_PyString_Resize(&result, bytes_read)) return NULL; @@ -733,7 +966,7 @@ static PyObject * req_readline(requestobject *self, PyObject *args) /* then do some initial setting up */ rc = ap_setup_client_block(self->request_rec, REQUEST_CHUNKED_ERROR); - if(rc != OK) { + if (rc != OK) { PyObject *val = PyInt_FromLong(rc); if (val == NULL) return NULL; @@ -753,6 +986,7 @@ static PyObject * req_readline(requestobject *self, PyObject *args) (self->rbuff_len - self->rbuff_pos); /* create the result buffer */ + /* PYTHON 2.5: 'PyString_FromStringAndSize' uses Py_ssize_t for input parameters */ result = PyString_FromStringAndSize(NULL, len); /* possibly no more memory */ @@ -775,9 +1009,16 @@ static PyObject * req_readline(requestobject *self, PyObject *args) /* resize if necessary */ if (copied < len) + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ if(_PyString_Resize(&result, copied)) return NULL; + /* fix for MODPYTHON-181 leak */ + if (self->rbuff_pos >= self->rbuff_len && self->rbuff != NULL) { + free(self->rbuff); + self->rbuff = NULL; + } + return result; } } @@ -794,9 +1035,13 @@ static PyObject * req_readline(requestobject *self, PyObject *args) /* if got this far, the buffer should be empty, we need to read more */ - /* create a read buffer */ + /* create a read buffer + + The buffer len will be at least HUGE_STRING_LEN in size, + to avoid memory fragmention + */ self->rbuff_len = len > HUGE_STRING_LEN ? len : HUGE_STRING_LEN; - self->rbuff_pos = self->rbuff_len; + self->rbuff_pos = 0; self->rbuff = malloc(self->rbuff_len); if (! self->rbuff) return PyErr_NoMemory(); @@ -806,6 +1051,19 @@ static PyObject * req_readline(requestobject *self, PyObject *args) chunk_len = ap_get_client_block(self->request_rec, self->rbuff, self->rbuff_len); Py_END_ALLOW_THREADS; + + /* ap_get_client_block could return -1 on error */ + if (chunk_len == -1) { + + /* Free rbuff since returning NULL here should end the request */ + free(self->rbuff); + self->rbuff = NULL; + + PyErr_SetObject(PyExc_IOError, + PyString_FromString("Client read error (Timeout?)")); + return NULL; + } + bytes_read = chunk_len; /* if this is a "short read", try reading more */ @@ -852,6 +1110,7 @@ static PyObject * req_readline(requestobject *self, PyObject *args) /* resize if necessary */ if (copied < len) + /* PYTHON 2.5: '_PyString_Resize' uses Py_ssize_t for input parameters */ if(_PyString_Resize(&result, copied)) return NULL; @@ -867,6 +1126,7 @@ static PyObject * req_readline(requestobject *self, PyObject *args) static PyObject *req_readlines(requestobject *self, PyObject *args) { + /* PYTHON 2.5: 'PyList_New' uses Py_ssize_t for input parameters */ PyObject *result = PyList_New(0); PyObject *line, *rlargs; long sizehint = -1; @@ -879,15 +1139,17 @@ static PyObject *req_readlines(requestobject *self, PyObject *args) if (result == NULL) return PyErr_NoMemory(); + /* PYTHON 2.5: 'PyTuple_New' uses Py_ssize_t for input parameters */ rlargs = PyTuple_New(0); if (result == NULL) return PyErr_NoMemory(); line = req_readline(self, rlargs); + /* PYTHON 2.5: 'PyString_Size' uses Py_ssize_t for input parameters */ while (line && ((linesize=PyString_Size(line))>0)) { PyList_Append(result, line); size += linesize; - if ((sizehint != -1) && (size >= size)) + if ((sizehint != -1) && (size >= sizehint)) break; Py_DECREF(line); line = req_readline(self, args); @@ -912,6 +1174,8 @@ static PyObject *req_register_cleanup(requestobject *self, PyObject *args) cleanup_info *ci; PyObject *handler = NULL; PyObject *data = NULL; + PyObject *name_obj = NULL; + char *name = NULL; if (! PyArg_ParseTuple(args, "O|O", &handler, &data)) return NULL; /* bad args */ @@ -922,7 +1186,10 @@ static PyObject *req_register_cleanup(requestobject *self, PyObject *args) if (PyCallable_Check(handler)) { Py_INCREF(handler); ci->handler = handler; - ci->interpreter = self->interpreter; + name_obj = python_interpreter_name(); + name = (char *)malloc(strlen(PyString_AsString(name_obj))+1); + strcpy(name, PyString_AsString(name_obj)); + ci->interpreter = name; if (data) { Py_INCREF(data); ci->data = data; @@ -973,17 +1240,20 @@ static PyObject * req_requires(requestobject *self) return Py_BuildValue("()"); } + /* PYTHON 2.5: 'PyTuple_New' uses Py_ssize_t for input parameters */ result = PyTuple_New(reqs_arr->nelts); reqs = (require_line *) reqs_arr->elts; for (i = 0; i < reqs_arr->nelts; ++i) { if (reqs[i].method_mask & (AP_METHOD_BIT << self->request_rec->method_number)) { + /* PYTHON 2.5: 'PyTuple_SetItem' uses Py_ssize_t for input parameters */ PyTuple_SetItem(result, ti++, PyString_FromString(reqs[i].requirement)); } } + /* PYTHON 2.5: '_PyTuple_Resize' uses Py_ssize_t for input parameters */ _PyTuple_Resize(&result, ti); return result; @@ -1020,6 +1290,53 @@ static PyObject * req_set_content_length(requestobject *self, PyObject *args) return Py_None; } +/** + ** request.set_etag(request self) + ** + * sets the outgoing ETag header + */ + +static PyObject * req_set_etag(requestobject *self, PyObject *args) +{ + ap_set_etag(self->request_rec); + + Py_INCREF(Py_None); + return Py_None; +} + +/** + ** request.set_last_modified(request self) + ** + * set the Last-modified header + */ + +static PyObject * req_set_last_modified(requestobject *self, PyObject *args) +{ + ap_set_last_modified(self->request_rec); + + Py_INCREF(Py_None); + return Py_None; +} + +/** + ** request.update_mtime(request self, long mtime) + ** + * updates mtime attribute if newer + */ + +static PyObject * req_update_mtime(requestobject *self, PyObject *args) +{ + double mtime; + + if (! PyArg_ParseTuple(args, "d", &mtime)) + return NULL; /* bad args */ + + ap_update_mtime(self->request_rec, apr_time_from_sec(mtime)); + + Py_INCREF(Py_None); + return Py_None; +} + /** ** request.write(request self, string what, flush=1) ** @@ -1049,6 +1366,8 @@ static PyObject * req_write(requestobject *self, PyObject *args) } } + self->bytes_queued += len; + Py_INCREF(Py_None); return Py_None; @@ -1125,6 +1444,8 @@ static PyObject * req_sendfile(requestobject *self, PyObject *args) return NULL; } + self->bytes_queued += len; + py_result = PyLong_FromLong (nbytes); Py_INCREF(py_result); return py_result; @@ -1133,16 +1454,20 @@ static PyObject * req_sendfile(requestobject *self, PyObject *args) static PyMethodDef request_methods[] = { {"add_common_vars", (PyCFunction) req_add_common_vars, METH_NOARGS}, {"add_handler", (PyCFunction) req_add_handler, METH_VARARGS}, + {"add_input_filter", (PyCFunction) req_add_input_filter, METH_VARARGS}, + {"add_output_filter", (PyCFunction) req_add_output_filter, METH_VARARGS}, {"allow_methods", (PyCFunction) req_allow_methods, METH_VARARGS}, + {"auth_name", (PyCFunction) req_auth_name, METH_NOARGS}, + {"auth_type", (PyCFunction) req_auth_type, METH_NOARGS}, + {"construct_url", (PyCFunction) req_construct_url, METH_VARARGS}, + {"discard_request_body", (PyCFunction) req_discard_request_body, METH_NOARGS}, + {"get_config", (PyCFunction) req_get_config, METH_NOARGS}, {"document_root", (PyCFunction) req_document_root, METH_NOARGS}, {"flush", (PyCFunction) req_flush, METH_NOARGS}, {"get_basic_auth_pw", (PyCFunction) req_get_basic_auth_pw, METH_NOARGS}, {"get_addhandler_exts", (PyCFunction) req_get_addhandler_exts, METH_NOARGS}, - {"get_config", (PyCFunction) req_get_config, METH_NOARGS}, {"get_remote_host", (PyCFunction) req_get_remote_host, METH_VARARGS}, {"get_options", (PyCFunction) req_get_options, METH_NOARGS}, - {"get_session", (PyCFunction) req_get_session, METH_VARARGS}, - {"write", (PyCFunction) req_write, METH_VARARGS}, {"internal_redirect", (PyCFunction) req_internal_redirect, METH_VARARGS}, {"is_https", (PyCFunction) req_is_https, METH_NOARGS}, {"log_error", (PyCFunction) req_log_error, METH_VARARGS}, @@ -1151,11 +1476,16 @@ static PyMethodDef request_methods[] = { {"readline", (PyCFunction) req_readline, METH_VARARGS}, {"readlines", (PyCFunction) req_readlines, METH_VARARGS}, {"register_cleanup", (PyCFunction) req_register_cleanup, METH_VARARGS}, + {"register_input_filter", (PyCFunction) req_register_input_filter, METH_VARARGS}, + {"register_output_filter", (PyCFunction) req_register_output_filter, METH_VARARGS}, {"requires", (PyCFunction) req_requires, METH_NOARGS}, {"send_http_header", (PyCFunction) req_send_http_header, METH_NOARGS}, {"sendfile", (PyCFunction) req_sendfile, METH_VARARGS}, {"set_content_length", (PyCFunction) req_set_content_length, METH_VARARGS}, + {"set_etag", (PyCFunction) req_set_etag, METH_NOARGS}, + {"set_last_modified", (PyCFunction) req_set_last_modified, METH_NOARGS}, {"ssl_var_lookup", (PyCFunction) req_ssl_var_lookup, METH_VARARGS}, + {"update_mtime", (PyCFunction) req_update_mtime, METH_VARARGS}, {"write", (PyCFunction) req_write, METH_VARARGS}, { NULL, NULL } /* sentinel */ }; @@ -1236,7 +1566,10 @@ static PyObject *getreq_recmbr(requestobject *self, void *name) * replaced in between handlers and we're left with a stale. */ - if (strcmp(name, "headers_in") == 0) { + if (strcmp(name, "interpreter") == 0) { + return python_interpreter_name(); + } + else if (strcmp(name, "headers_in") == 0) { if (((tableobject*)self->headers_in)->table != self->request_rec->headers_in) ((tableobject*)self->headers_in)->table = self->request_rec->headers_in; Py_INCREF(self->headers_in); @@ -1266,6 +1599,20 @@ static PyObject *getreq_recmbr(requestobject *self, void *name) Py_INCREF(self->notes); return self->notes; } + else if (strcmp(name, "_bytes_queued") == 0) { + if (sizeof(apr_off_t) == sizeof(LONG_LONG)) { + LONG_LONG l = self->bytes_queued; + return PyLong_FromLongLong(l); + } + else { + /* assume it's long */ + long l = self->bytes_queued; + return PyLong_FromLong(l); + } + } + else if (strcmp(name, "_request_rec") == 0) { + return PyCObject_FromVoidPtr(self->request_rec, 0); + } else return PyMember_GetOne((char*)self->request_rec, find_memberdef(request_rec_mbrs, name)); @@ -1300,6 +1647,15 @@ static int setreq_recmbr(requestobject *self, PyObject *val, void *name) apr_pstrdup(self->request_rec->pool, PyString_AsString(val)); return 0; } + else if (strcmp(name, "ap_auth_type") == 0) { + if (! PyString_Check(val)) { + PyErr_SetString(PyExc_TypeError, "ap_auth_type must be a string"); + return -1; + } + self->request_rec->ap_auth_type = + apr_pstrdup(self->request_rec->pool, PyString_AsString(val)); + return 0; + } else if (strcmp(name, "filename") == 0) { if (! PyString_Check(val)) { PyErr_SetString(PyExc_TypeError, "filename must be a string"); @@ -1309,6 +1665,15 @@ static int setreq_recmbr(requestobject *self, PyObject *val, void *name) apr_pstrdup(self->request_rec->pool, PyString_AsString(val)); return 0; } + else if (strcmp(name, "canonical_filename") == 0) { + if (! PyString_Check(val)) { + PyErr_SetString(PyExc_TypeError, "canonical_filename must be a string"); + return -1; + } + self->request_rec->canonical_filename = + apr_pstrdup(self->request_rec->pool, PyString_AsString(val)); + return 0; + } else if (strcmp(name, "path_info") == 0) { if (! PyString_Check(val)) { PyErr_SetString(PyExc_TypeError, "path_info must be a string"); @@ -1318,6 +1683,52 @@ static int setreq_recmbr(requestobject *self, PyObject *val, void *name) apr_pstrdup(self->request_rec->pool, PyString_AsString(val)); return 0; } + else if (strcmp(name, "args") == 0) { + if (! PyString_Check(val)) { + PyErr_SetString(PyExc_TypeError, "args must be a string"); + return -1; + } + self->request_rec->args = + apr_pstrdup(self->request_rec->pool, PyString_AsString(val)); + return 0; + } + else if (strcmp(name, "handler") == 0) { + if (val == Py_None) { + self->request_rec->handler = 0; + return 0; + } + if (! PyString_Check(val)) { + PyErr_SetString(PyExc_TypeError, "handler must be a string"); + return -1; + } + self->request_rec->handler = + apr_pstrdup(self->request_rec->pool, PyString_AsString(val)); + return 0; + } + else if (strcmp(name, "uri") == 0) { + if (! PyString_Check(val)) { + PyErr_SetString(PyExc_TypeError, "uri must be a string"); + return -1; + } + self->request_rec->uri = + apr_pstrdup(self->request_rec->pool, PyString_AsString(val)); + return 0; + } + else if (strcmp(name, "finfo") == 0) { + finfoobject *f; + if (! MpFinfo_Check(val)) { + PyErr_SetString(PyExc_TypeError, "finfo must be a finfoobject"); + return -1; + } + f = (finfoobject *)val; + self->request_rec->finfo = *f->finfo; + self->request_rec->finfo.fname = apr_pstrdup(self->request_rec->pool, + f->finfo->fname); + self->request_rec->finfo.name = apr_pstrdup(self->request_rec->pool, + f->finfo->name); + + return 0; + } return PyMember_SetOne((char*)self->request_rec, find_memberdef(request_rec_mbrs, (char*)name), @@ -1401,7 +1812,7 @@ static PyObject *getreq_rec_fi(requestobject *self, void *name) apr_finfo_t *fi = (apr_finfo_t *)((char *)self->request_rec + md->offset); - return tuple_from_finfo(fi); + return MpFinfo_FromFinfo(fi); } /** @@ -1442,24 +1853,22 @@ static PyObject *getmakeobj(requestobject* self, void *objname) result = self->server; } else if (strcmp(name, "next") == 0) { - if (!self->next && self->request_rec->next) { - self->next = MpRequest_FromRequest(self->request_rec->next); - ((requestobject*)self->next)->prev = self; + if (self->request_rec->next) { + result = (PyObject*)python_get_request_object( + self->request_rec->next, 0); } - result = self->next; } else if (strcmp(name, "prev") == 0) { - if (!self->prev && self->request_rec->prev) { - self->prev = MpRequest_FromRequest(self->request_rec->prev); - ((requestobject*)self->prev)->next = self; + if (self->request_rec->prev) { + result = (PyObject*)python_get_request_object( + self->request_rec->prev, 0); } - result = self->prev; } else if (strcmp(name, "main") == 0) { - if (!self->main && self->request_rec->main) { - self->main = MpRequest_FromRequest(self->request_rec->main); + if (self->request_rec->main) { + result = (PyObject*)python_get_request_object( + self->request_rec->main, 0); } - result = self->main; } if (!result) @@ -1471,6 +1880,7 @@ static PyObject *getmakeobj(requestobject* self, void *objname) } static PyGetSetDef request_getsets[] = { + {"interpreter", (getter)getreq_recmbr, NULL, "Python interpreter name", "interpreter"}, {"connection", (getter)getmakeobj, NULL, "Connection object", "connection"}, {"server", (getter)getmakeobj, NULL, "Server object", "server"}, {"next", (getter)getmakeobj, NULL, "If redirected, pointer to the to request", "next"}, @@ -1478,7 +1888,7 @@ static PyGetSetDef request_getsets[] = { {"main", (getter)getmakeobj, NULL, "If subrequest, pointer to the main request", "main"}, {"the_request", (getter)getreq_recmbr, NULL, "First line of request", "the_request"}, {"assbackwards", (getter)getreq_recmbr, (setter)setreq_recmbr, "HTTP/0.9 \"simple\" request", "assbackwards"}, - {"proxyreq", (getter)getreq_recmbr, NULL, "A proxy request: one of apache.PROXYREQ_* values", "proxyreq"}, + {"proxyreq", (getter)getreq_recmbr, (setter)setreq_recmbr, "A proxy request: one of apache.PROXYREQ_* values", "proxyreq"}, {"header_only", (getter)getreq_recmbr, NULL, "HEAD request, as oppsed to GET", "header_only"}, {"protocol", (getter)getreq_recmbr, NULL, "Protocol as given to us, or HTTP/0.9", "protocol"}, {"proto_num", (getter)getreq_recmbr, NULL, "Protocol version. 1.1 = 1001", "proto_num"}, @@ -1503,23 +1913,23 @@ static PyGetSetDef request_getsets[] = { {"read_chunked", (getter)getreq_recmbr, NULL, "Reading chunked transfer-coding", "read_chunked"}, {"expecting_100", (getter)getreq_recmbr, NULL, "Is client waitin for a 100 response?", "expecting_100"}, {"content_type", (getter)getreq_recmbr, (setter)setreq_recmbr, "Content type", "content_type"}, - {"handler", (getter)getreq_recmbr, NULL, "The handler string", "handler"}, + {"handler", (getter)getreq_recmbr, (setter)setreq_recmbr, "The handler string", "handler"}, {"content_encoding", (getter)getreq_recmbr, NULL, "How to encode the data", "content_encoding"}, {"content_languages", (getter)getreq_rec_ah, NULL, "Content languages", "content_languages"}, {"vlist_validator", (getter)getreq_recmbr, NULL, "Variant list validator (if negotiated)", "vlist_validator"}, {"user", (getter)getreq_recmbr, (setter)setreq_recmbr, "If authentication check was made, the user name", "user"}, - {"ap_auth_type", (getter)getreq_recmbr, NULL, "If authentication check was made, auth type", "ap_auth_type"}, - {"no_cache", (getter)getreq_recmbr, NULL, "This response in non-cacheable", "no_cache"}, - {"no_local_copy", (getter)getreq_recmbr, NULL, "There is no local copy of the response", "no_local_copy"}, + {"ap_auth_type", (getter)getreq_recmbr, (setter)setreq_recmbr, "If authentication check was made, auth type", "ap_auth_type"}, + {"no_cache", (getter)getreq_recmbr, (setter)setreq_recmbr, "This response in non-cacheable", "no_cache"}, + {"no_local_copy", (getter)getreq_recmbr, (setter)setreq_recmbr, "There is no local copy of the response", "no_local_copy"}, {"unparsed_uri", (getter)getreq_recmbr, NULL, "The URI without any parsing performed", "unparsed_uri"}, - {"uri", (getter)getreq_recmbr, NULL, "The path portion of URI", "uri"}, + {"uri", (getter)getreq_recmbr, (setter)setreq_recmbr, "The path portion of URI", "uri"}, {"filename", (getter)getreq_recmbr, (setter)setreq_recmbr, "The file name on disk that this request corresponds to", "filename"}, - {"canonical_filename", (getter)getreq_recmbr, NULL, "The true filename (req.filename is canonicalized if they dont match)", "canonical_filename"}, + {"canonical_filename", (getter)getreq_recmbr, (setter)setreq_recmbr, "The true filename (req.filename is canonicalized if they dont match)", "canonical_filename"}, {"path_info", (getter)getreq_recmbr, (setter)setreq_recmbr, "Path_info, if any", "path_info"}, - {"args", (getter)getreq_recmbr, NULL, "QUERY_ARGS, if any", "args"}, - {"finfo", (getter)getreq_rec_fi, NULL, "File information", "finfo"}, + {"args", (getter)getreq_recmbr, (setter)setreq_recmbr, "QUERY_ARGS, if any", "args"}, + {"finfo", (getter)getreq_rec_fi, (setter)setreq_recmbr, "File information", "finfo"}, {"parsed_uri", (getter)getreq_rec_uri, NULL, "Components of URI", "parsed_uri"}, - {"used_path_info", (getter)getreq_recmbr, NULL, "Flag to accept or reject path_info on current request", "used_path_info"}, + {"used_path_info", (getter)getreq_recmbr, (setter)setreq_recmbr, "Flag to accept or reject path_info on current request", "used_path_info"}, {"headers_in", (getter)getreq_recmbr, NULL, "Incoming headers", "headers_in"}, {"headers_out", (getter)getreq_recmbr, NULL, "Outgoing headers", "headers_out"}, {"err_headers_out", (getter)getreq_recmbr, NULL, "Outgoing headers for errors", "err_headers_out"}, @@ -1530,6 +1940,8 @@ static PyGetSetDef request_getsets[] = { /* XXX htaccess */ /* XXX filters and eos */ {"eos_sent", (getter)getreq_recmbr, NULL, "EOS bucket sent", "eos_sent"}, + {"_bytes_queued", (getter)getreq_recmbr, NULL, "Bytes queued by handler", "_bytes_queued"}, + {"_request_rec", (getter)getreq_recmbr, NULL, "Actual request_rec struct", "_request_rec"}, {NULL} /* Sentinel */ }; @@ -1540,7 +1952,6 @@ static struct PyMemberDef request_members[] = { {"_content_type_set", T_INT, OFF(content_type_set), RO}, {"phase", T_OBJECT, OFF(phase), RO}, {"extension", T_STRING, OFF(extension), RO}, - {"interpreter", T_STRING, OFF(interpreter), RO}, {"hlist", T_OBJECT, OFF(hlo), RO}, {NULL} /* Sentinel */ }; @@ -1550,24 +1961,29 @@ static struct PyMemberDef request_members[] = { ** * */ + +#ifndef CLEAR_REQUEST_MEMBER +#define CLEAR_REQUEST_MEMBER(member)\ + tmp = (PyObject *) member;\ + member = NULL;\ + Py_XDECREF(tmp) +#endif + static int request_tp_clear(requestobject *self) { PyObject* tmp; - /* TODO: create a macro for the following repetitive code */ - tmp=self->dict; self->dict=NULL; Py_XDECREF(tmp); - tmp=self->connection; self->connection=NULL; Py_XDECREF(tmp); - tmp=self->server; self->server=NULL; Py_XDECREF(tmp); - tmp=self->next; self->next=NULL; Py_XDECREF(tmp); - tmp=self->prev; self->prev=NULL; Py_XDECREF(tmp); - tmp=self->main; self->main=NULL; Py_XDECREF(tmp); - tmp=self->headers_in; self->headers_in=NULL; Py_XDECREF(tmp); - tmp=self->headers_out; self->headers_out=NULL; Py_XDECREF(tmp); - tmp=self->err_headers_out; self->err_headers_out=NULL; Py_XDECREF(tmp); - tmp=self->subprocess_env; self->subprocess_env=NULL; Py_XDECREF(tmp); - tmp=self->notes; self->notes=NULL; Py_XDECREF(tmp); - tmp=self->phase; self->phase=NULL; Py_XDECREF(tmp); - tmp=self->hlo; self->hlo=NULL; Py_XDECREF(tmp); - tmp=self->session; self->session=NULL; Py_XDECREF(tmp); + + CLEAR_REQUEST_MEMBER(self->dict); + CLEAR_REQUEST_MEMBER(self->connection); + CLEAR_REQUEST_MEMBER(self->server); + CLEAR_REQUEST_MEMBER(self->headers_in); + CLEAR_REQUEST_MEMBER(self->headers_out); + CLEAR_REQUEST_MEMBER(self->err_headers_out); + CLEAR_REQUEST_MEMBER(self->subprocess_env); + CLEAR_REQUEST_MEMBER(self->notes); + CLEAR_REQUEST_MEMBER(self->phase); + CLEAR_REQUEST_MEMBER(self->hlo); + CLEAR_REQUEST_MEMBER(self->callbacks); return 0; } @@ -1581,13 +1997,21 @@ static int request_tp_clear(requestobject *self) static void request_tp_dealloc(requestobject *self) { - // de-register the object from the GC - // before its deallocation, to prevent the - // GC to run on a partially de-allocated object + /* de-register the object from the GC + * before its deallocation, to prevent the + * GC to run on a partially de-allocated object + */ PyObject_GC_UnTrack(self); - request_tp_clear(self); + /* self->rebuff is used by req_readline. + * It may not have been freed if req_readline was not + * enough times to consume rbuff's contents. + */ + if (self->rbuff != NULL) + free(self->rbuff); + request_tp_clear(self); + PyObject_GC_Del(self); } @@ -1596,24 +2020,28 @@ static void request_tp_dealloc(requestobject *self) ** * Traversal of the request object */ +#ifndef VISIT_REQUEST_MEMBER +#define VISIT_REQUEST_MEMBER(member, visit, arg)\ + if (member) {\ + result = visit(member, arg);\ + if (result)\ + return result;\ + } +#endif + static int request_tp_traverse(requestobject* self, visitproc visit, void *arg) { int result; - - if(self->dict) {result = visit(self->dict,arg); if(result) return result;} - if(self->connection) {result = visit(self->connection,arg); if(result) return result;} - if(self->server) {result = visit(self->server,arg); if(result) return result;} - if(self->next) {result = visit(self->next,arg); if(result) return result;} - if(self->prev) {result = visit(self->prev,arg); if(result) return result;} - if(self->main) {result = visit(self->main,arg); if(result) return result;} - if(self->headers_in) {result = visit(self->headers_in,arg); if(result) return result;} - if(self->headers_out) {result = visit(self->headers_out,arg); if(result) return result;} - if(self->err_headers_out) {result = visit(self->err_headers_out,arg); if(result) return result;} - if(self->subprocess_env) {result = visit(self->subprocess_env,arg); if(result) return result;} - if(self->notes) {result = visit(self->notes,arg); if(result) return result;} - if(self->phase) {result = visit(self->phase,arg); if(result) return result;} - if(self->session) {result = visit(self->session,arg); if(result) return result;} + VISIT_REQUEST_MEMBER(self->dict, visit, arg); + VISIT_REQUEST_MEMBER(self->connection, visit, arg); + VISIT_REQUEST_MEMBER(self->server, visit, arg); + VISIT_REQUEST_MEMBER(self->headers_in, visit, arg); + VISIT_REQUEST_MEMBER(self->headers_out, visit, arg); + VISIT_REQUEST_MEMBER(self->err_headers_out, visit, arg); + VISIT_REQUEST_MEMBER(self->subprocess_env, visit, arg); + VISIT_REQUEST_MEMBER(self->notes, visit, arg); + VISIT_REQUEST_MEMBER(self->phase, visit, arg); - // no need to Py_DECREF(dict) since the reference is borrowed + /* no need to Py_DECREF(dict) since the reference is borrowed */ return 0; } static char request_doc[] = @@ -1645,6 +2073,7 @@ PyTypeObject MpRequest_Type = { Py_TPFLAGS_HAVE_GC , /* tp_flags */ request_doc, /* tp_doc */ (traverseproc)request_tp_traverse, /* tp_traverse */ + /* PYTHON 2.5: 'inquiry' should be perhaps replaced with 'lenfunc' */ (inquiry)request_tp_clear, /* tp_clear */ 0, /* tp_richcompare */ 0, /* tp_weaklistoffset */ diff --git a/src/serverobject.c b/src/serverobject.c index bf6a50595033fe5f18b6dd76c14e9531483a3758..d69cd26242dcbf61321bfb4af43769716855f00f 100644 --- a/src/serverobject.c +++ b/src/serverobject.c @@ -18,7 +18,7 @@ * * serverobject.c * - * $Id: serverobject.c 393438 2006-04-12 11:16:42Z grahamd $ + * $Id: serverobject.c 481717 2006-12-03 04:36:37Z grahamd $ * */ @@ -81,6 +81,32 @@ static PyObject * server_get_options(serverobject *self) return MpTable_FromTable(conf->options); } +/** + ** server.log_error(server self, string message, int level) + ** + * calls ap_log_error + */ + +static PyObject * server_log_error(serverobject *self, PyObject *args) +{ + int level = 0; + char *message = NULL; + + if (! PyArg_ParseTuple(args, "z|i", &message, &level)) + return NULL; /* error */ + + if (message) { + + if (! level) + level = APLOG_NOERRNO|APLOG_ERR; + + ap_log_error(APLOG_MARK, level, 0, self->server, "%s", message); + } + + Py_INCREF(Py_None); + return Py_None; +} + /** ** server.register_cleanup(req, handler, data) ** @@ -96,6 +122,8 @@ static PyObject *server_register_cleanup(serverobject *self, PyObject *args) PyObject *handler = NULL; PyObject *data = NULL; requestobject *req = NULL; + PyObject *name_obj = NULL; + char *name = NULL; if (! PyArg_ParseTuple(args, "OO|O", &req, &handler, &data)) return NULL; @@ -116,7 +144,10 @@ static PyObject *server_register_cleanup(serverobject *self, PyObject *args) ci->server_rec = self->server; Py_INCREF(handler); ci->handler = handler; - ci->interpreter = strdup(req->interpreter); + name_obj = python_interpreter_name(); + name = (char *)malloc(strlen(PyString_AsString(name_obj))+1); + strcpy(name, PyString_AsString(name_obj)); + ci->interpreter = name; if (data) { Py_INCREF(data); ci->data = data; @@ -136,6 +167,7 @@ static PyObject *server_register_cleanup(serverobject *self, PyObject *args) static PyMethodDef server_methods[] = { {"get_config", (PyCFunction) server_get_config, METH_NOARGS}, {"get_options", (PyCFunction) server_get_options, METH_NOARGS}, + {"log_error", (PyCFunction) server_log_error, METH_VARARGS}, {"register_cleanup", (PyCFunction) server_register_cleanup, METH_VARARGS}, { NULL, NULL } /* sentinel */ }; @@ -192,6 +224,9 @@ static struct PyMemberDef server_rec_mbrs[] = { static PyObject *getsrv_recmbr(serverobject *self, void *name) { + if (strcmp(name, "_server_rec") == 0) { + return PyCObject_FromVoidPtr(self->server, 0); + } return PyMember_GetOne((char*)self->server, find_memberdef(server_rec_mbrs, name)); } @@ -287,6 +322,7 @@ static PyGetSetDef server_getsets[] = { {"limit_req_fields", (getter)getsrv_recmbr, NULL, "limit on number of request header fields", "limit_req_fields"}, {"my_generation", (getter)my_generation, NULL, "Generation of this child", "my_generation"}, {"restart_time", (getter)restart_time, NULL, "Server restart time", "restart_time"}, + {"_server_rec", (getter)getsrv_recmbr, NULL, "Actual server_rec struct", "_server_rec"}, {NULL} /* Sentinel */ }; diff --git a/src/tableobject.c b/src/tableobject.c index cab272edb3ad205a16335cad5052835cfc93fcf6..ef760002b113460a9cf6cc0e9f7549c7f5b1db71 100644 --- a/src/tableobject.c +++ b/src/tableobject.c @@ -18,7 +18,7 @@ * * tableobject.c * - * $Id: tableobject.c 106619 2004-11-25 22:10:52Z nd $ + * $Id: tableobject.c 466105 2006-10-20 13:28:02Z jgallacher $ * */ @@ -156,6 +156,7 @@ static int table_print(register tableobject *self, register FILE *fp, register i static PyObject * table_repr(tableobject *self) { PyObject *s; + PyObject *t = NULL; const apr_array_header_t *ah; apr_table_entry_t *elts; int i; @@ -172,11 +173,22 @@ static PyObject * table_repr(tableobject *self) while (i--) if (elts[i].key) { - PyString_ConcatAndDel(&s, PyString_FromString("'")); - PyString_ConcatAndDel(&s, PyString_FromString(elts[i].key)); - PyString_ConcatAndDel(&s, PyString_FromString("': '")); - PyString_ConcatAndDel(&s, PyString_FromString(elts[i].val)); - PyString_ConcatAndDel(&s, PyString_FromString("'")); + t = PyString_FromString(elts[i].key); + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + + PyString_ConcatAndDel(&s, PyString_FromString(": ")); + + if (elts[i].val) { + t = PyString_FromString(elts[i].val); + } else { + t = Py_None; + Py_INCREF(t); + } + + PyString_ConcatAndDel(&s, PyObject_Repr(t)); + Py_XDECREF(t); + if (i > 0) PyString_ConcatAndDel(&s, PyString_FromString(", ")); else @@ -224,6 +236,7 @@ static PyObject * table_subscript(tableobject *self, register PyObject *key) returns the first match. */ + /* PYTHON 2.5: 'PyList_New' uses Py_ssize_t for input parameters */ list = PyList_New(0); if (!list) return NULL; @@ -236,13 +249,21 @@ static PyObject * table_subscript(tableobject *self, register PyObject *key) while (i--) if (elts[i].key) { if (apr_strnatcasecmp(elts[i].key, k) == 0) { - PyObject *v = PyString_FromString(elts[i].val); + PyObject *v = NULL; + if (elts[i].val != NULL) { + v = PyString_FromString(elts[i].val); + } else { + v = Py_None; + Py_INCREF(v); + } + /* PYTHON 2.5: 'PyList_Insert' uses Py_ssize_t for input parameters */ PyList_Insert(list, 0, v); Py_DECREF(v); } } /* if no match */ + /* PYTHON 2.5: 'PyList_Size' uses Py_ssize_t for return values (may need overflow check) */ if (PyList_Size(list) == 0) { Py_DECREF(list); PyErr_SetObject(PyExc_KeyError, key); @@ -250,7 +271,9 @@ static PyObject * table_subscript(tableobject *self, register PyObject *key) } /* if we got one match */ + /* PYTHON 2.5: 'PyList_Size' uses Py_ssize_t for return values (may need overflow check) */ if (PyList_Size(list) == 1) { + /* PYTHON 2.5: 'PyList_GetItem' uses Py_ssize_t for input parameters */ PyObject *v = PyList_GetItem(list, 0); Py_INCREF(v); Py_DECREF(list); @@ -302,6 +325,7 @@ static int table_ass_subscript(tableobject *self, PyObject *key, /* table as mapping */ static PyMappingMethods table_as_mapping = { + /* PYTHON 2.5: 'inquiry' should be perhaps replaced with 'lenfunc' */ (inquiry) tablelength, /*mp_length*/ (binaryfunc) table_subscript, /*mp_subscript*/ (objobjargproc) table_ass_subscript, /*mp_ass_subscript*/ @@ -325,6 +349,7 @@ static PyObject * table_keys(register tableobject *self) ah = apr_table_elts(self->table); elts = (apr_table_entry_t *) ah->elts; + /* PYTHON 2.5: 'PyList_New' uses Py_ssize_t for input parameters */ v = PyList_New(ah->nelts); for (i = 0, j = 0; i < ah->nelts; i++) @@ -332,6 +357,7 @@ static PyObject * table_keys(register tableobject *self) if (elts[i].key) { PyObject *key = PyString_FromString(elts[i].key); + /* PYTHON 2.5: 'PyList_SetItem' uses Py_ssize_t for input parameters */ PyList_SetItem(v, j, key); j++; } @@ -357,13 +383,21 @@ static PyObject * table_values(register tableobject *self) ah = apr_table_elts(self->table); elts = (apr_table_entry_t *) ah->elts; + /* PYTHON 2.5: 'PyList_New' uses Py_ssize_t for input parameters */ v = PyList_New(ah->nelts); for (i = 0, j = 0; i < ah->nelts; i++) { if (elts[i].key) { - PyObject *val = PyString_FromString(elts[i].val); + PyObject *val = NULL; + if (elts[i].val != NULL) { + val = PyString_FromString(elts[i].val); + } else { + val = Py_None; + Py_INCREF(val); + } + /* PYTHON 2.5: 'PyList_SetItem' uses Py_ssize_t for input parameters */ PyList_SetItem(v, j, val); j++; } @@ -389,6 +423,7 @@ static PyObject * table_items(register tableobject *self) ah = apr_table_elts(self->table); elts = (apr_table_entry_t *) ah->elts; + /* PYTHON 2.5: 'PyList_New' uses Py_ssize_t for input parameters */ v = PyList_New(ah->nelts); for (i = 0, j = 0; i < ah->nelts; i++) @@ -396,6 +431,7 @@ static PyObject * table_items(register tableobject *self) if (elts[i].key) { PyObject *keyval = Py_BuildValue("(s,s)", elts[i].key, elts[i].val); + /* PYTHON 2.5: 'PyList_SetItem' uses Py_ssize_t for input parameters */ PyList_SetItem(v, j, keyval); j++; } @@ -789,7 +825,15 @@ static int table_traverse(tableobject *self, visitproc visit, void *arg) while (i--) if (elts[i].key) { int err; - PyObject *v = PyString_FromString(elts[i].val); + + PyObject *v = NULL; + if (elts[i].val != NULL) { + v = PyString_FromString(elts[i].val); + } else { + v = Py_None; + Py_INCREF(v); + } + err = visit(v, arg); Py_XDECREF(v); if (err) @@ -842,7 +886,15 @@ static PyObject *select_key(apr_table_entry_t *elts) static PyObject *select_value(apr_table_entry_t *elts) { - return PyString_FromString(elts->val); + PyObject *val = NULL; + if (elts->val != NULL) { + val = PyString_FromString(elts->val); + } else { + val = Py_None; + Py_INCREF(val); + } + + return val; } static PyObject *select_item(apr_table_entry_t *elts) @@ -946,11 +998,6 @@ static PySequenceMethods table_as_sequence = { 0, /* sq_inplace_repeat */ }; -static PyObject *table_alloc(PyTypeObject *type, int nitems) -{ - return MpTable_New(); -} - /** ** table_new ** @@ -958,20 +1005,7 @@ static PyObject *table_alloc(PyTypeObject *type, int nitems) static PyObject *table_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - PyObject *self; - - assert(type != NULL && type->tp_alloc != NULL); - self = type->tp_alloc(type, 0); - if (self != NULL) { - apr_pool_t *p; - tableobject *t = (tableobject *)self; - apr_pool_create_ex(&p, NULL, NULL, NULL); - t->pool = p; - t->table = apr_table_make(p, 2); - } - - return self; - + return MpTable_New(); } static int table_init(tableobject *self, PyObject *args, PyObject *kwds) @@ -1038,6 +1072,7 @@ PyTypeObject MpTable_Type = { Py_TPFLAGS_BASETYPE, /* tp_flags */ mp_table_doc, /* tp_doc */ (traverseproc)table_traverse, /* tp_traverse */ + /* PYTHON 2.5: 'inquiry' should be perhaps replaced with 'lenfunc' */ (inquiry)table_tp_clear, /* tp_clear */ table_richcompare, /* tp_richcompare */ 0, /* tp_weaklistoffset */ @@ -1052,7 +1087,7 @@ PyTypeObject MpTable_Type = { 0, /* tp_descr_set */ 0, /* tp_dictoffset */ (initproc)table_init, /* tp_init */ - (allocfunc)table_alloc, /* tp_alloc */ + 0, /* tp_alloc */ table_new, /* tp_new */ (destructor)table_dealloc, /* tp_free */ }; diff --git a/src/util.c b/src/util.c index 405e0e507917dddf8c307f64ba18a1a879082a01..f3f504670b4763552300a98f1ea199a040eebd7d 100644 --- a/src/util.c +++ b/src/util.c @@ -18,7 +18,7 @@ * * util.c * - * $Id: util.c 420297 2006-07-09 13:53:06Z nlehuen $ + * $Id: util.c 466105 2006-10-20 13:28:02Z jgallacher $ * * See accompanying documentation and source code comments * for details. @@ -43,14 +43,17 @@ PyObject * tuple_from_array_header(const apr_array_header_t *ah) if (ah == NULL) { + /* PYTHON 2.5: PyTuple_New uses Py_ssize_t for input parameters */ t = PyTuple_New(0); } else { + /* PYTHON 2.5: PyTuple_New uses Py_ssize_t for input parameters */ t = PyTuple_New(ah->nelts); s = (char **) ah->elts; for (i = 0; i < ah->nelts; i++) { + /* PYTHON 2.5: PyTuple_SetItem uses Py_ssize_t for input parameters */ PyTuple_SetItem(t, i, PyString_FromString(s[i])); } } @@ -71,13 +74,16 @@ PyObject * tuple_from_method_list(const ap_method_list_t *l) char **methods; if ((l->method_list == NULL) || (l->method_list->nelts == 0)) { + /* PYTHON 2.5: PyTuple_New uses Py_ssize_t for input parameters */ t = PyTuple_New(0); } else { + /* PYTHON 2.5: PyTuple_New uses Py_ssize_t for input parameters */ t = PyTuple_New(l->method_list->nelts); methods = (char **)l->method_list->elts; for (i = 0; i < l->method_list->nelts; ++i) { + /* PYTHON 2.5: PyTuple_SetItem uses Py_ssize_t for input parameters */ PyTuple_SetItem(t, i, PyString_FromString(methods[i])); } } @@ -100,7 +106,11 @@ PyObject *tuple_from_finfo(apr_finfo_t *f) return Py_None; } - t = PyTuple_New(12); + /* PYTHON 2.5: PyTuple_New uses Py_ssize_t for input parameters */ + t = PyTuple_New(13); + + /* this should have been first, but was added later */ + PyTuple_SET_ITEM(t, 12, PyInt_FromLong(f->filetype)); if (f->valid & APR_FINFO_PROT) { PyTuple_SET_ITEM(t, 0, PyInt_FromLong(f->protection)); @@ -193,6 +203,7 @@ PyObject *tuple_from_apr_uri(apr_uri_t *u) { PyObject *t; + /* PYTHON 2.5: PyTuple_New uses Py_ssize_t for input parameters */ t = PyTuple_New(9); if (u->scheme) { @@ -384,6 +395,7 @@ PyMemberDef *find_memberdef(const PyMemberDef *mlist, const char *name) PyObject *cfgtree_walk(ap_directive_t *dir) { + /* PYTHON 2.5: PyList_New uses Py_ssize_t for input parameters */ PyObject *list = PyList_New(0); if (!list) return PyErr_NoMemory(); diff --git a/test/Makefile.in b/test/Makefile.in new file mode 100644 index 0000000000000000000000000000000000000000..b21548152b3eda594b6becae2efe77768e5ed110 --- /dev/null +++ b/test/Makefile.in @@ -0,0 +1,30 @@ + # Copyright 2004 Apache Software Foundation + # + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # http://www.apache.org/licenses/LICENSE-2.0 + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + # See the License for the specific language governing permissions and + # limitations under the License. + # + # $Id: Makefile.in 384881 2006-03-10 18:21:16Z jgallacher $ + # +PYTHON_BIN=@PYTHON_BIN@ + +check: + $(PYTHON_BIN) test.py + +clean: + rm -f *.pyc *.pyo + cd conf && rm -f test.conf + cd htdocs && rm -f *pyc *pyo + rm -rf logs + rm -rf tmp + +distclean: clean + rm -f Makefile testconf.py diff --git a/test/htdocs/dummymodule.py b/test/htdocs/dummymodule.py new file mode 100644 index 0000000000000000000000000000000000000000..94cea114fca4c8a371639a99cbc8c5a37f532b8b --- /dev/null +++ b/test/htdocs/dummymodule.py @@ -0,0 +1,7 @@ +from mod_python import apache + +apache.log_error("dummymodule / %s" % apache.interpreter) + +def function(): + apache.log_error("dummymodule::function / %s" % apache.interpreter) + apache.main_server.get_options()["dummymodule::function"] = "1" diff --git a/test/htdocs/index.py b/test/htdocs/index.py index 8fb1d639ff130c28674a6e13e5dae05ba281baec..95ff82f3ba8424db4352e0a16beaae67ff635b7c 100644 --- a/test/htdocs/index.py +++ b/test/htdocs/index.py @@ -1,58 +1,19 @@ - # ==================================================================== - # The Apache Software License, Version 1.1 # - # Copyright (c) 2000-2002 The Apache Software Foundation. All rights - # reserved. + # + # Licensed under the Apache License, Version 2.0 (the "License"); you + # may not use this file except in compliance with the License. You + # may obtain a copy of the License at # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions - # are met: + # http://www.apache.org/licenses/LICENSE-2.0 # - # 1. Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + # implied. See the License for the specific language governing + # permissions and limitations under the License. # - # 2. Redistributions in binary form must reproduce the above copyright - # notice, this list of conditions and the following disclaimer in - # the documentation and/or other materials provided with the - # distribution. # - # 3. The end-user documentation included with the redistribution, - # if any, must include the following acknowledgment: - # "This product includes software developed by the - # Apache Software Foundation (http://www.apache.org/)." - # Alternately, this acknowledgment may appear in the software itself, - # if and wherever such third-party acknowledgments normally appear. - # - # 4. The names "Apache" and "Apache Software Foundation" must - # not be used to endorse or promote products derived from this - # software without prior written permission. For written - # permission, please contact apache@apache.org. - # - # 5. Products derived from this software may not be called "Apache", - # "mod_python", or "modpython", nor may these terms appear in their - # name, without prior written permission of the Apache Software - # Foundation. - # - # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - # ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - # SUCH DAMAGE. - # ==================================================================== - # - # This software consists of voluntary contributions made by many - # individuals on behalf of the Apache Software Foundation. For more - # information on the Apache Software Foundation, please see - # <http://www.apache.org/>. - # - # $Id: index.py 179253 2005-05-31 18:18:23Z nd $ + # $Id: index.py 379638 2006-02-22 00:41:51Z jgallacher $ # # mod_python tests diff --git a/test/htdocs/psptest_fail.psp b/test/htdocs/psptest_fail.psp new file mode 100644 index 0000000000000000000000000000000000000000..80e7b7cba8e5fb693c774ca79ec13c09f4e4fd3f --- /dev/null +++ b/test/htdocs/psptest_fail.psp @@ -0,0 +1,4 @@ +fail +<% +session['dummy'] = 1 +%> diff --git a/test/htdocs/psptest_main.psp b/test/htdocs/psptest_main.psp new file mode 100644 index 0000000000000000000000000000000000000000..5813e07fff9b1bf81a9c70aac8c8184dbfad5a5b --- /dev/null +++ b/test/htdocs/psptest_main.psp @@ -0,0 +1,6 @@ +okay +<% +psp.set_error_page('psptest_fail.psp') +session['dummy'] = 1 +raise 'fail' +%> diff --git a/test/htdocs/ssi.shtml b/test/htdocs/ssi.shtml new file mode 100644 index 0000000000000000000000000000000000000000..f3cbc6061042ec76333dba7223fba266132a163c --- /dev/null +++ b/test/htdocs/ssi.shtml @@ -0,0 +1,4 @@ +<!--#python exec=" +filter.write(data[:1]) +filter.write(data[1:]) +"--> <!--#python eval="'ok'" --> diff --git a/test/htdocs/subdir/dummy.txt b/test/htdocs/subdir/dummy.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/test/htdocs/tests.py b/test/htdocs/tests.py index 366f03684205ecfa6dbd0ae75b78b349fffaaa35..19cdbb8aa8762c3b21b782475f9108864b0b28b3 100644 --- a/test/htdocs/tests.py +++ b/test/htdocs/tests.py @@ -1,58 +1,19 @@ - # ==================================================================== - # The Apache Software License, Version 1.1 # - # Copyright (c) 2000-2002 The Apache Software Foundation. All rights - # reserved. + # + # Licensed under the Apache License, Version 2.0 (the "License"); you + # may not use this file except in compliance with the License. You + # may obtain a copy of the License at # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions - # are met: + # http://www.apache.org/licenses/LICENSE-2.0 # - # 1. Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + # implied. See the License for the specific language governing + # permissions and limitations under the License. # - # 2. Redistributions in binary form must reproduce the above copyright - # notice, this list of conditions and the following disclaimer in - # the documentation and/or other materials provided with the - # distribution. # - # 3. The end-user documentation included with the redistribution, - # if any, must include the following acknowledgment: - # "This product includes software developed by the - # Apache Software Foundation (http://www.apache.org/)." - # Alternately, this acknowledgment may appear in the software itself, - # if and wherever such third-party acknowledgments normally appear. - # - # 4. The names "Apache" and "Apache Software Foundation" must - # not be used to endorse or promote products derived from this - # software without prior written permission. For written - # permission, please contact apache@apache.org. - # - # 5. Products derived from this software may not be called "Apache", - # "mod_python", or "modpython", nor may these terms appear in their - # name, without prior written permission of the Apache Software - # Foundation. - # - # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - # DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - # ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - # SUCH DAMAGE. - # ==================================================================== - # - # This software consists of voluntary contributions made by many - # individuals on behalf of the Apache Software Foundation. For more - # information on the Apache Software Foundation, please see - # <http://www.apache.org/>. - # - # $Id: tests.py 393776 2006-04-13 09:48:19Z grahamd $ + # $Id: tests.py 474119 2006-11-13 03:04:44Z grahamd $ # # mod_python tests @@ -80,7 +41,10 @@ class SimpleTestCase(unittest.TestCase): def test_apache_log_error(self): s = self.req.server + c = self.req.connection + apache.log_error("Testing apache.log_error():", apache.APLOG_INFO, s) + apache.log_error("xEMERGx", apache.APLOG_EMERG, s) apache.log_error("xALERTx", apache.APLOG_ALERT, s) apache.log_error("xCRITx", apache.APLOG_CRIT, s) @@ -90,6 +54,24 @@ class SimpleTestCase(unittest.TestCase): apache.log_error("xINFOx", apache.APLOG_INFO, s) apache.log_error("xDEBUGx", apache.APLOG_DEBUG, s) + s.log_error("xEMERGx", apache.APLOG_EMERG) + s.log_error("xALERTx", apache.APLOG_ALERT) + s.log_error("xCRITx", apache.APLOG_CRIT) + s.log_error("xERRx", apache.APLOG_ERR) + s.log_error("xWARNINGx", apache.APLOG_WARNING) + s.log_error("xNOTICEx", apache.APLOG_NOTICE) + s.log_error("xINFOx", apache.APLOG_INFO) + s.log_error("xDEBUGx", apache.APLOG_DEBUG) + + c.log_error("xEMERGx", apache.APLOG_EMERG) + c.log_error("xALERTx", apache.APLOG_ALERT) + c.log_error("xCRITx", apache.APLOG_CRIT) + c.log_error("xERRx", apache.APLOG_ERR) + c.log_error("xWARNINGx", apache.APLOG_WARNING) + c.log_error("xNOTICEx", apache.APLOG_NOTICE) + c.log_error("xINFOx", apache.APLOG_INFO) + c.log_error("xDEBUGx", apache.APLOG_DEBUG) + # see what's in the log now f = open("%s/logs/error_log" % apache.server_root()) # for some reason re doesn't like \n, why? @@ -97,7 +79,7 @@ class SimpleTestCase(unittest.TestCase): log = "".join(map(string.strip, f.readlines())) f.close() - if not re.search("xEMERGx.*xALERTx.*xCRITx.*xERRx.*xWARNINGx.*xNOTICEx.*xINFOx.*xDEBUGx", log): + if not re.search("xEMERGx.*xALERTx.*xCRITx.*xERRx.*xWARNINGx.*xNOTICEx.*xINFOx.*xDEBUGx.*xEMERGx.*xALERTx.*xCRITx.*xERRx.*xWARNINGx.*xNOTICEx.*xINFOx.*xDEBUGx.*xEMERGx.*xALERTx.*xCRITx.*xERRx.*xWARNINGx.*xNOTICEx.*xINFOx.*xDEBUGx", log): self.fail("Could not find test messages in error_log") @@ -297,8 +279,10 @@ class SimpleTestCase(unittest.TestCase): self.fail("req.phase should be 'PythonHandler'") log(" req.interpreter: %s" % `req.interpreter`) + if req.interpreter != apache.interpreter: + self.fail("req.interpreter should be same as apache.interpreter" % `apache.interpreter`) if req.interpreter != req.server.server_hostname: - self.fail("req.interpreter should be same as req.server_hostname: %s" % `req.server_hostname`) + self.fail("req.interpreter should be same as req.server.server_hostname: %s" % `req.server.server_hostname`) log(" req.content_type: %s" % `req.content_type`) log(" doing req.content_type = 'test/123' ...") @@ -341,7 +325,7 @@ class SimpleTestCase(unittest.TestCase): log(" req.unparsed_uri: %s" % `req.unparsed_uri`) if req.unparsed_uri != "/tests.py": - self.fail("req.unparse_uri should be '/tests.py'") + self.fail("req.unparsed_uri should be '/tests.py'") log(" req.uri: %s" % `req.uri`) if req.uri != "/tests.py": @@ -364,12 +348,12 @@ class SimpleTestCase(unittest.TestCase): self.fail("req.args should be None") log(" req.finfo: %s" % `req.finfo`) - if req.finfo[10] and (req.finfo[10] != req.canonical_filename): - self.fail("req.finfo[10] should be the (canonical) filename") + if req.finfo[apache.FINFO_FNAME] and (req.finfo[apache.FINFO_FNAME] != req.canonical_filename): + self.fail("req.finfo[apache.FINFO_FNAME] should be the (canonical) filename") log(" req.parsed_uri: %s" % `req.parsed_uri`) - if req.parsed_uri[6] != '/tests.py': - self.fail("req.parsed_uri[6] should be '/tests.py'") + if req.parsed_uri[apache.URI_PATH] != '/tests.py': + self.fail("req.parsed_uri[apache.URI_PATH] should be '/tests.py'") log(" req.used_path_info: %s" % `req.used_path_info`) if req.used_path_info != 2: @@ -389,6 +373,8 @@ class SimpleTestCase(unittest.TestCase): self.fail("get_config return should show PythonDebug 1") log("req.get_options(): %s" % `req.get_options()`) + for option in apache.main_server.get_options().keys(): + del req.get_options()[option] if req.get_options() != apache.table({"testing":"123"}): self.fail("get_options() should contain 'testing':'123', contains %s"%req.get_options().items()) @@ -495,6 +481,12 @@ class SimpleTestCase(unittest.TestCase): log = req.log_error conn = req.connection + try: + import socket + localip = socket.gethostbyname("localhost") + except: + localip = "127.0.0.1" + log("Examining connection memebers:") log(" connection.base_server: %s" % `conn.base_server`) @@ -502,15 +494,15 @@ class SimpleTestCase(unittest.TestCase): self.fail("conn.base_server should be same type as req.server") log(" connection.local_addr: %s" % `conn.local_addr`) - if not conn.local_addr[0] in ("127.0.0.1", "0.0.0.0"): + if not conn.local_addr[0] in ("127.0.0.1", "0.0.0.0", localip): self.fail("conn.local_addr[0] should be '127.0.0.1' or '0.0.0.0'") log(" connection.remote_addr: %s" % `conn.remote_addr`) - if not conn.remote_addr[0] in ("127.0.0.1", "0.0.0.0"): + if not conn.remote_addr[0] in ("127.0.0.1", "0.0.0.0", localip): self.fail("conn.remote_addr[0] should be '127.0.0.1' or '0.0.0.0'") log(" connection.remote_ip: %s" % `conn.remote_ip`) - if conn.remote_ip != "127.0.0.1": + if not conn.remote_ip in ("127.0.0.1", localip): self.fail("conn.remote_ip should be '127.0.0.1'") log(" connection.remote_host: %s" % `conn.remote_host`) @@ -538,7 +530,7 @@ class SimpleTestCase(unittest.TestCase): self.fail("conn.keepalives should be 1") log(" connection.local_ip: %s" % `conn.local_ip`) - if conn.local_ip != "127.0.0.1": + if not conn.local_ip in ("127.0.0.1", localip): self.fail("conn.local_ip should be '127.0.0.1'") log(" connection.local_host: %s" % `conn.local_host`) @@ -583,13 +575,6 @@ def handler(req): return apache.OK -def req_add_handler(req): - - req.secret_message = "foo" - req.add_handler("PythonHandler", "tests::simple_handler") - - return apache.OK - def simple_handler(req): # for req_add_handler() if (req.secret_message == "foo"): @@ -597,6 +582,14 @@ def simple_handler(req): return apache.OK +def req_add_handler(req): + + req.secret_message = "foo" + req.add_handler("PythonHandler", "tests::simple_handler") + req.add_handler("PythonHandler", simple_handler) + + return apache.OK + def req_add_bad_handler(req): # bad_handler does not exist so adding it should # should raise an AttributeError exception @@ -617,6 +610,19 @@ def req_add_empty_handler_string(req): return apache.OK +def req_add_handler_empty_phase(req): + req.log_error("req_add_handler_empty_phase") + req.log_error("phase=%s" % req.phase) + req.log_error("interpreter=%s" % req.interpreter) + req.log_error("directory=%s" % req.hlist.directory) + if req.phase != "PythonHandler": + directory = os.path.dirname(__file__) + req.add_handler("PythonHandler", "tests::req_add_handler_empty_phase", directory) + else: + req.write("test ok") + + return apache.OK + def accesshandler_add_handler_to_empty_hl(req): # Prior to version 3.2.6, adding a python handler # to and empty handler list would cause a segfault @@ -627,6 +633,32 @@ def accesshandler_add_handler_to_empty_hl(req): return apache.OK +def test_req_add_handler_directory(req): + # dir1 will not have a trailing slash and on Win32 + # will use back slashes and not forward slashes. + dir1 = os.path.dirname(__file__) + if req.phase == "PythonFixupHandler": + req.add_handler("PythonHandler", "tests::test_req_add_handler_directory", dir1) + else: + # dir2 should only use forward slashes and + # should have a trailing forward slash added by + # call to req.add_handler(). When dir1 and dir2 + # are normalised for current operating system, + # they should be equivalent. + dir2 = req.hlist.directory + if dir2[-1] != '/' or dir2.count('\\') != 0: + req.write('test failed') + else: + dir1 = os.path.normpath(dir1) + dir2 = os.path.normpath(dir2) + if dir2 != dir1: + req.write('test failed') + else: + req.write('test ok') + + return apache.OK + + def req_allow_methods(req): req.allow_methods(["PYTHONIZE"]) @@ -634,10 +666,45 @@ def req_allow_methods(req): def req_get_basic_auth_pw(req): - if (req.phase == "PythonAuthenHandler"): - if req.user != "spam": - return apache.HTTP_UNAUTHORIZED + pw = req.get_basic_auth_pw() + if req.user != "spam" or pw != "eggs": + req.write("test failed") + else: + req.write("test ok") + + return apache.OK + +def req_auth_type(req): + + if req.phase == "PythonAuthenHandler": + if req.auth_type() != "dummy": + req.log_error("auth_type check failed") + req.write("test failed") + return apache.DONE + if req.auth_name() != "blah": + req.log_error("auth_name check failed") + req.write("test failed") + return apache.DONE + req.user = "dummy" + req.ap_auth_type = req.auth_type() + elif req.phase == "PythonAuthzHandler": + if req.ap_auth_type != "dummy": + req.log_error("ap_auth_type check failed") + req.write("test failed") + return apache.DONE + if req.user != "dummy": + req.log_error("user check failed") + req.write("test failed") + return apache.DONE else: + if req.ap_auth_type != "dummy": + req.log_error("ap_auth_type check failed") + req.write("test failed") + return apache.DONE + if req.user != "dummy": + req.log_error("user check failed") + req.write("test failed") + return apache.DONE req.write("test ok") return apache.OK @@ -670,6 +737,17 @@ def req_internal_redirect_int(req): return apache.OK +def req_construct_url(req): + + url = req.construct_url("/index.html") + + if not re.match("^http://test_req_construct_url:[0-9]+/index.html$",url): + req.write("test failed") + else: + req.write("test ok") + + return apache.OK + def req_read(req): s = req.read() @@ -688,14 +766,42 @@ def req_readline(req): def req_readlines(req): - lines = req.readlines() + + if 'SizeHint' in req.headers_in: + lines = req.readlines(int(req.headers_in['SizeHint'])) + else: + lines = req.readlines() + req.write("".join(lines)) return apache.OK +def req_discard_request_body(req): + + s = req.read(10) + if s != '1234567890': + req.log_error('read() #1 returned %s' % `s`) + req.write('test failed') + return apache.OK + + status = req.discard_request_body() + if status != apache.OK: + req.log_error('discard_request_body() returned %d' % status) + return status + + s = req.read() + if s: + req.log_error('read() #2 returned %s' % `s`) + req.write('test failed') + return apache.OK + + req.write('test ok') + + return apache.OK + def req_register_cleanup(req): - req.cleanup_data = "test ok" + req.cleanup_data = "req_register_cleanup test ok" req.register_cleanup(cleanup, req) req.write("registered cleanup that will write to log") @@ -706,6 +812,11 @@ def cleanup(data): data.log_error(data.cleanup_data) +def server_cleanup(data): + # for srv_register_cleanup and apache_register_cleanup below + + apache.log_error(data) + def req_headers_out(req): req.headers_out["X-Test-Header"] = "test ok" @@ -761,9 +872,68 @@ def req_sendfile3(req): os.remove(fname) return apache.OK +def req_handler(req): + if req.phase == "PythonFixupHandler": + req.handler = "mod_python" + req.handler = None + req.handler = "mod_python" + req.add_handler("PythonHandler","tests::req_handler") + return apache.OK + elif req.phase == "PythonHandler": + req.write('test ok') + return apache.OK + else: + req.write('test failed') + return apache.OK + +def req_no_cache(req): + req.no_cache = 1 + req.write('test ok') + return apache.OK + +def req_update_mtime(req): + assert(req.mtime == 0.0) + req.update_mtime(100.0) + assert(req.mtime == 100.0) + req.set_etag() + req.set_last_modified() + req.write('test ok') + return apache.OK + +def util_redirect(req): + from mod_python import util + if req.main: + # Sub request for ErrorDocument. + req.write("test failed") + return apache.DONE + else: + if req.phase == "PythonFixupHandler": + util.redirect(req,location="/dummy",text="test ok") + else: + req.write('test failed') + return apache.OK + +def req_server_get_config(req): + + if req.server.get_config().get("PythonDebug","0") != "1" or \ + req.get_config().get("PythonDebug","0") != "0": + req.write('test failed') + else: + req.write('test ok') + + return apache.OK + def req_server_get_options(req): try: + server_options = apache.main_server.get_options() + assert(server_options.get("global","0") == "0") + assert(server_options.get("override","0") == "0") + + server_options = req.connection.base_server.get_options() + assert(server_options.get("global","0") == "0") + assert(server_options.get("override","0") == "0") + server_options = req.server.get_options() assert(server_options["global"] == "1") assert(server_options["override"] == "1") @@ -790,16 +960,14 @@ def fileupload(req): def srv_register_cleanup(req): - req.cleanup_data = "test ok" - req.server.register_cleanup(req, cleanup, req) + req.server.register_cleanup(req, server_cleanup, "srv_register_cleanup test ok") req.write("registered server cleanup that will write to log") return apache.OK def apache_register_cleanup(req): - req.cleanup_data = "test 2 ok" - apache.register_cleanup(cleanup, req) + apache.register_cleanup(server_cleanup, "apache_register_cleanup test ok") req.write("registered server cleanup that will write to log") return apache.OK @@ -819,6 +987,25 @@ def util_fieldstorage(req): def postreadrequest(req): + req.log_error('postreadrequest') + + req.add_common_vars() + + req.subprocess_env['TEST1'] = "'" + req.subprocess_env['TEST2'] = '"' + + req.log_error('subprocess_env = %s' % req.subprocess_env) + req.log_error('subprocess_env.values() = %s' % req.subprocess_env.values()) + + for value in req.subprocess_env.itervalues(): + req.log_error('VALUE = %s' % value) + + for item in req.subprocess_env.iteritems(): + req.log_error('ITEM = %s' % (item,)) + + req.log_error('SCRIPT_FILENAME = %s' % req.subprocess_env.get('SCRIPT_FILENAME')) + req.log_error('SCRIPT_FILENAME = %s' % req.subprocess_env['SCRIPT_FILENAME']) + req.write("test ok") return apache.DONE @@ -832,16 +1019,22 @@ def trans(req): def import_test(req): - import sys + import sys, os + directory = os.path.dirname(__file__) + assert(map(os.path.normpath, sys.path).count(directory) == 1) if sys.modules.has_key("dummymodule"): - req.write("test ok") + if not apache.main_server.get_options().has_key("dummymodule::function"): + req.log_error("dummymodule::function not executed") + req.write("test failed") + else: + req.write("test ok") else: req.log_error("dummymodule not found in sys.modules") req.write("test failed") return apache.OK -def outputfilter(filter): +def outputfilter1(filter): s = filter.read() while s: @@ -853,8 +1046,49 @@ def outputfilter(filter): return apache.OK +def outputfilter2(filter): + + s = filter.read() + while s: + for c in s: + filter.write(2*c) + s = filter.read() + + if s is None: + filter.close() + + return apache.OK + def simplehandler(req): + if req.phase != "PythonHandler": + req.write("test failed") + return apache.OK + + req.write("test ok") + + if req.phase != "PythonHandler": + req.write("test failed") + return apache.OK + + return apache.OK + +def req_add_output_filter(req): + + req.add_output_filter("MP_TEST_FILTER") + + req.write("test ok") + + return apache.OK + +def req_register_output_filter(req): + + req.register_output_filter("MP_TEST_FILTER1","tests::outputfilter1") + req.register_output_filter("MP_TEST_FILTER2",outputfilter2) + + req.add_output_filter("MP_TEST_FILTER1") + req.add_output_filter("MP_TEST_FILTER2") + req.write("test ok") return apache.OK @@ -936,6 +1170,66 @@ def Session_Session(req): return apache.OK +def files_directive(req): + + req.write(str(req.hlist.directory)) + return apache.OK + +none_handler = None + +def server_return_1(req): + raise apache.SERVER_RETURN, apache.OK + +def server_return_2(req): + req.write("test ok") + return apache.OK + +def phase_status_1(req): + apache.log_error("phase_status_1") + req.phases = [1] + return apache.DECLINED + +def phase_status_2(req): + apache.log_error("phase_status_2") + req.phases.append(2) + req.user = "bogus" + req.ap_auth_type = "bogus" + return apache.OK + +def phase_status_3(req): + apache.log_error("phase_status_3") + req.phases.append(3) + return apache.OK + +def phase_status_4(req): + apache.log_error("phase_status_4") + #req.phases.append(4) + return apache.OK + +def phase_status_5(req): + apache.log_error("phase_status_5") + req.phases.append(5) + return apache.DECLINED + +def phase_status_6(req): + apache.log_error("phase_status_6") + req.phases.append(6) + return apache.OK + +def phase_status_7(req): + apache.log_error("phase_status_7") + req.phases.append(7) + return apache.OK + +def phase_status_8(req): + apache.log_error("phase_status_8") + apache.log_error("phases = %s" % req.phases) + if req.phases != [1, 2, 5, 6, 7]: + req.write("test failed") + else: + req.write("test ok") + return apache.OK + def test_sys_argv(req): import sys req.write(repr(sys.argv)) @@ -954,8 +1248,14 @@ def PythonOption_items(req): return apache.OK def interpreter(req): - req.write(req.interpreter) - return apache.OK + if req.phase == "PythonFixupHandler": + if req.filename[-1] != '/' and os.path.isdir(req.filename): + req.write(req.interpreter) + return apache.DONE + return apache.OK + else: + req.write(req.interpreter) + return apache.DONE def index(req): return "test ok, interpreter=%s" % req.interpreter @@ -963,6 +1263,33 @@ def index(req): def test_publisher(req): return "test ok, interpreter=%s" % req.interpreter +def test_publisher_auth_nested(req): + def __auth__(req, user, password): + test_globals = test_publisher + req.notes["auth_called"] = "1" + return user == "spam" and password == "eggs" + def __access__(req, user): + req.notes["access_called"] = "1" + return 1 + assert(int(req.notes.get("auth_called",0))) + assert(int(req.notes.get("access_called",0))) + return "test ok, interpreter=%s" % req.interpreter + +class _test_publisher_auth_method_nested: + def method(self, req): + def __auth__(req, user, password): + test_globals = test_publisher + req.notes["auth_called"] = "1" + return user == "spam" and password == "eggs" + def __access__(req, user): + req.notes["access_called"] = "1" + return 1 + assert(int(req.notes.get("auth_called",0))) + assert(int(req.notes.get("access_called",0))) + return "test ok, interpreter=%s" % req.interpreter + +test_publisher_auth_method_nested = _test_publisher_auth_method_nested() + class OldStyleClassTest: def __init__(self): pass @@ -984,6 +1311,10 @@ def test_generator(req): yield c c += 1 +def server_side_include(req): + req.ssi_globals = { "data": "test" } + return apache.OK + class InstanceTest(object): def __call__(self, req): return "test callable instance ok" diff --git a/test/httpdconf.py b/test/httpdconf.py index 79cc28c1f41659d21ee82c38dd4e993f9f8eac0e..39fb1b0c015d080ba90dc0fedc31739badfa6f78 100644 --- a/test/httpdconf.py +++ b/test/httpdconf.py @@ -13,7 +13,7 @@ # implied. See the License for the specific language governing # permissions and limitations under the License. # - # $Id: httpdconf.py 383365 2006-03-05 18:40:22Z jgallacher $ + # $Id: httpdconf.py 394455 2006-04-16 10:49:39Z grahamd $ # # Config maker, a la HTMLGen. This could grow into something useful. # @@ -83,6 +83,10 @@ class AddOutputFilter(Directive): def __init__(self, val): Directive.__init__(self, self.__class__.__name__, val) +class AddType(Directive): + def __init__(self, val): + Directive.__init__(self, self.__class__.__name__, val) + class AuthBasicAuthoritative(Directive): # New in Apache 2.2 def __init__(self, val): @@ -121,6 +125,10 @@ class ErrorLog(Directive): def __init__(self, val): Directive.__init__(self, self.__class__.__name__, val) +class Files(ContainerTag): + def __init__(self, dir, *args): + ContainerTag.__init__(self, self.__class__.__name__, dir, args) + class IfModule(ContainerTag): def __init__(self, dir, *args): ContainerTag.__init__(self, self.__class__.__name__, dir, args) @@ -181,6 +189,10 @@ class NumServers(Directive): def __init__(self, val): Directive.__init__(self, self.__class__.__name__, val) +class Options(Directive): + def __init__(self, val): + Directive.__init__(self, self.__class__.__name__, val) + class PidFile(Directive): def __init__(self, val): Directive.__init__(self, self.__class__.__name__, val) @@ -189,6 +201,10 @@ class PythonAuthenHandler(Directive): def __init__(self, val): Directive.__init__(self, self.__class__.__name__, val) +class PythonAuthzHandler(Directive): + def __init__(self, val): + Directive.__init__(self, self.__class__.__name__, val) + class PythonConnectionHandler(Directive): def __init__(self, val): Directive.__init__(self, self.__class__.__name__, val) @@ -213,6 +229,10 @@ class PythonTransHandler(Directive): def __init__(self, val): Directive.__init__(self, self.__class__.__name__, val) +class PythonFixupHandler(Directive): + def __init__(self, val): + Directive.__init__(self, self.__class__.__name__, val) + class PythonImport(Directive): def __init__(self, val): Directive.__init__(self, self.__class__.__name__, val) diff --git a/test/test.py b/test/test.py index 856775ae9bd8816cb0ab130cf86ec9931c911eb0..a3f5286296202f6e8ca1ef61186f26b20c8337bc 100644 --- a/test/test.py +++ b/test/test.py @@ -13,7 +13,7 @@ # implied. See the License for the specific language governing # permissions and limitations under the License. # - # $Id: test.py 393776 2006-04-13 09:48:19Z grahamd $ + # $Id: test.py 473093 2006-11-09 22:15:52Z jgallacher $ # """ @@ -261,10 +261,12 @@ class HttpdCtrl: shutil.rmtree(logs) os.mkdir(logs) + # place if os.path.exists(TMP_DIR): shutil.rmtree(TMP_DIR) os.mkdir(TMP_DIR) + def makeConfig(self, append=""): # create config files, etc @@ -308,6 +310,9 @@ class HttpdCtrl: IfModule("!mod_dir.c", LoadModule("dir_module %s" % quoteIfSpace(os.path.join(modpath, "mod_dir.so")))), + IfModule("!mod_include.c", + LoadModule("include_module %s" % + quoteIfSpace(os.path.join(modpath, "mod_include.so")))), ServerRoot(SERVER_ROOT), ErrorLog("logs/error_log"), LogLevel("debug"), @@ -320,6 +325,7 @@ class HttpdCtrl: Listen(PORT), PythonOption('mod_python.mutex_directory %s' % TMP_DIR), PythonOption('PythonOptionTest sample_value'), + # PythonOption('mod_python.legacy.importer *'), DocumentRoot(DOCUMENT_ROOT), LoadModule("python_module %s" % quoteIfSpace(MOD_PYTHON_SO))) @@ -422,7 +428,7 @@ class PerRequestTestCase(unittest.TestCase): entity.write(boundary) entity.write('\r\n') entity.write('Content-Type: text/plain\r\n') - entity.write('Content-Disposition: form-data; name="%s"\r\n'%name) + entity.write('Content-Disposition: form-data;\r\n name="%s"\r\n'%name) entity.write('\r\n') entity.write(str(value)) entity.write('\r\n') @@ -508,7 +514,7 @@ class PerRequestTestCase(unittest.TestCase): print "\n * Testing req.add_handler()" rsp = self.vhost_get("test_req_add_handler") - if (rsp != "test ok"): + if (rsp != 2*"test ok"): self.fail(`rsp`) def test_req_add_bad_handler_conf(self): @@ -558,6 +564,50 @@ class PerRequestTestCase(unittest.TestCase): if (rsp == "no exception"): self.fail("Expected an exception") + def test_req_add_handler_empty_phase_conf(self): + + c = VirtualHost("*", + ServerName("test_req_add_handler_empty_phase"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonInterpPerDirective("On"), + PythonFixupHandler("tests::req_add_handler_empty_phase"), + PythonDebug("On"))) + return str(c) + + def test_req_add_handler_empty_phase(self): + # Adding handler to content phase when no handler already + # exists for that phase. + + print """\n * Testing req.add_handler() for empty phase""" + rsp = self.vhost_get("test_req_add_handler_empty_phase") + + if (rsp != "test ok"): + self.fail(`rsp`) + + def test_req_add_handler_directory_conf(self): + + c = VirtualHost("*", + ServerName("test_req_add_handler_directory"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonInterpPerDirective("On"), + PythonFixupHandler("tests::test_req_add_handler_directory"), + PythonDebug("On"))) + return str(c) + + def test_req_add_handler_directory(self): + # Checking that directory is canonicalized and trailing + # slash is added. + + print """\n * Testing req.add_handler() directory""" + rsp = self.vhost_get("test_req_add_handler_directory") + + if (rsp != "test ok"): + self.fail(`rsp`) + def test_accesshandler_add_handler_to_empty_hl_conf(self): # Note that there is no PythonHandler specified in the the VirtualHost # config. We want to see if req.add_handler will work when the @@ -615,7 +665,6 @@ class PerRequestTestCase(unittest.TestCase): SetHandler("mod_python"), AuthName("blah"), AuthType("basic"), - PythonAuthenHandler("tests::req_get_basic_auth_pw"), PythonHandler("tests::req_get_basic_auth_pw"), PythonDebug("On"))) return str(c) @@ -637,6 +686,37 @@ class PerRequestTestCase(unittest.TestCase): if (rsp != "test ok"): self.fail(`rsp`) + def test_req_auth_type_conf(self): + + c = VirtualHost("*", + ServerName("test_req_auth_type"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + AuthName("blah"), + AuthType("dummy"), + Require("valid-user"), + PythonAuthenHandler("tests::req_auth_type"), + PythonAuthzHandler("tests::req_auth_type"), + PythonHandler("tests::req_auth_type"), + PythonDebug("On"))) + return str(c) + + def test_req_auth_type(self): + + print "\n * Testing req.auth_type()" + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/tests.py", skip_host=1) + conn.putheader("Host", "%s:%s" % ("test_req_auth_type", PORT)) + conn.endheaders() + response = conn.getresponse() + rsp = response.read() + conn.close() + + if (rsp != "test ok"): + self.fail(`rsp`) + def test_req_requires_conf(self): c = VirtualHost("*", @@ -691,6 +771,25 @@ class PerRequestTestCase(unittest.TestCase): if rsp != "test ok": self.fail("internal_redirect") + def test_req_construct_url_conf(self): + + c = VirtualHost("*", + ServerName("test_req_construct_url"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("tests::req_construct_url"), + PythonDebug("On"))) + return str(c) + + def test_req_construct_url(self): + + print "\n * Testing req.construct_url()" + rsp = self.vhost_get("test_req_construct_url") + + if rsp != "test ok": + self.fail("construct_url") + def test_req_read_conf(self): c = str(Timeout("5")) + \ @@ -800,6 +899,75 @@ class PerRequestTestCase(unittest.TestCase): if (rsp != params): self.fail(`rsp`) + print "\n * Testing req.readlines(size_hint=30000)" + + params = ('1234567890'*3000+'\n')*4 + print " writing %d bytes..." % len(params) + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("POST", "/tests.py", skip_host=1) + conn.putheader("Host", "test_req_readlines:%s" % PORT) + conn.putheader("Content-Length", len(params)) + conn.putheader("SizeHint", 30000) + conn.endheaders() + conn.send(params) + response = conn.getresponse() + rsp = response.read() + conn.close() + + print " response size: %d\n" % len(rsp) + if (rsp != ('1234567890'*3000+'\n')): + self.fail(`rsp`) + + print "\n * Testing req.readlines(size_hint=32000)" + + params = ('1234567890'*3000+'\n')*4 + print " writing %d bytes..." % len(params) + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("POST", "/tests.py", skip_host=1) + conn.putheader("Host", "test_req_readlines:%s" % PORT) + conn.putheader("Content-Length", len(params)) + conn.putheader("SizeHint", 32000) + conn.endheaders() + conn.send(params) + response = conn.getresponse() + rsp = response.read() + conn.close() + + print " response size: %d\n" % len(rsp) + if (rsp != (('1234567890'*3000+'\n')*2)): + self.fail(`rsp`) + + def test_req_discard_request_body_conf(self): + + c = str(Timeout("5")) + \ + str(VirtualHost("*", + ServerName("test_req_discard_request_body"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("tests::req_discard_request_body"), + PythonDebug("On")))) + return c + + def test_req_discard_request_body(self): + + print "\n * Testing req.discard_request_body()" + + params = '1234567890'*2 + print " writing %d bytes..." % len(params) + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/tests.py", skip_host=1) + conn.putheader("Host", "test_req_discard_request_body:%s" % PORT) + conn.putheader("Content-Length", len(params)) + conn.endheaders() + conn.send(params) + response = conn.getresponse() + rsp = response.read() + conn.close() + + if (rsp != "test ok"): + self.fail(`rsp`) + def test_req_register_cleanup_conf(self): c = VirtualHost("*", @@ -822,7 +990,7 @@ class PerRequestTestCase(unittest.TestCase): f = open(os.path.join(SERVER_ROOT, "logs/error_log")) log = f.read() f.close() - if log.find("test ok") == -1: + if log.find("req_register_cleanup test ok") == -1: self.fail("Could not find test message in error_log") def test_req_headers_out_conf(self): @@ -922,6 +1090,144 @@ class PerRequestTestCase(unittest.TestCase): else: print "\n * Skipping req.sendfile() for a file which is a symbolic link" + def test_req_handler_conf(self): + + c = VirtualHost("*", + ServerName("test_req_handler"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + PythonFixupHandler("tests::req_handler"), + PythonDebug("On"))) + return str(c) + + def test_req_handler(self): + + print "\n * Testing req.handler" + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/", skip_host=1) + conn.putheader("Host", "%s:%s" % ("test_req_handler", PORT)) + conn.endheaders() + response = conn.getresponse() + rsp = response.read() + conn.close() + + if (rsp != "test ok"): + self.fail(`rsp`) + + def test_req_no_cache_conf(self): + + c = VirtualHost("*", + ServerName("test_req_no_cache"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("tests::req_no_cache"), + PythonDebug("On"))) + return str(c) + + def test_req_no_cache(self): + + print "\n * Testing req.no_cache" + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/tests.py", skip_host=1) + conn.putheader("Host", "%s:%s" % ("test_req_no_cache", PORT)) + conn.endheaders() + response = conn.getresponse() + rsp = response.read() + conn.close() + + if response.getheader("expires", None) is None: + self.fail(`response.getheader("expires", None)`) + + if (rsp != "test ok"): + self.fail(`rsp`) + + def test_req_update_mtime_conf(self): + + c = VirtualHost("*", + ServerName("test_req_update_mtime"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("tests::req_update_mtime"), + PythonDebug("On"))) + return str(c) + + def test_req_update_mtime(self): + + print "\n * Testing req.update_mtime" + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/tests.py", skip_host=1) + conn.putheader("Host", "%s:%s" % ("test_req_update_mtime", PORT)) + conn.endheaders() + response = conn.getresponse() + rsp = response.read() + conn.close() + + if response.getheader("etag", None) is None: + self.fail(`response.getheader("etag", None)`) + + if response.getheader("last-modified", None) is None: + self.fail(`response.getheader("last-modified", None)`) + + if (rsp != "test ok"): + self.fail(`rsp`) + + def test_util_redirect_conf(self): + + c = VirtualHost("*", + ServerName("test_util_redirect"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + PythonFixupHandler("tests::util_redirect"), + PythonHandler("tests::util_redirect"), + PythonDebug("On"))) + return str(c) + + def test_util_redirect(self): + + print "\n * Testing util.redirect()" + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/", skip_host=1) + conn.putheader("Host", "%s:%s" % ("test_util_redirect", PORT)) + conn.endheaders() + response = conn.getresponse() + rsp = response.read() + conn.close() + + if response.status != 302: + self.fail('did not receive 302 status response') + + if response.getheader("location", None) != "/dummy": + self.fail('did not receive correct location for redirection') + + if rsp != "test ok": + self.fail(`rsp`) + + def test_req_server_get_config_conf(self): + + c = VirtualHost("*", + ServerName("test_req_server_get_config"), + DocumentRoot(DOCUMENT_ROOT), + PythonDebug("On"), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("tests::req_server_get_config"), + PythonDebug("Off"))) + return str(c) + + def test_req_server_get_config(self): + + print "\n * Testing req.server.get_config()" + + rsp = self.vhost_get("test_req_server_get_config") + if (rsp != "test ok"): + self.fail(`rsp`) + def test_req_server_get_options_conf(self): c = VirtualHost("*", @@ -1249,6 +1555,7 @@ class PerRequestTestCase(unittest.TestCase): Directory(DOCUMENT_ROOT, PythonInterpPerDirectory('On'), SetHandler("mod_python"), + PythonFixupHandler("tests::interpreter"), PythonHandler("tests::interpreter"), PythonDebug("On")), ) @@ -1273,6 +1580,10 @@ class PerRequestTestCase(unittest.TestCase): if (rsp != interpreter_name+'SUBDIR/'): self.fail(`rsp`) + rsp = self.vhost_get("test_interpreter_per_directory", '/subdir').upper() + if (rsp != interpreter_name+'SUBDIR/'): + self.fail(`rsp`) + def test_util_fieldstorage_conf(self): c = VirtualHost("*", @@ -1336,19 +1647,15 @@ class PerRequestTestCase(unittest.TestCase): print "\n * Testing TransHandler" rsp = self.vhost_get("test_trans") - if (rsp[3:5] != "=="): # first line in tests.py + if (rsp[0:2] != " #"): # first line in tests.py self.fail(`rsp`) def test_import_conf(self): - # create a dummy module - f = open(os.path.join(DOCUMENT_ROOT, "dummymodule.py"), "w") - f.write("# nothing here") - f.close() - # configure apache to import it at startup c = Container(PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT), PythonImport("dummymodule test_import"), + PythonImport("dummymodule::function test_import"), VirtualHost("*", ServerName("test_import"), DocumentRoot(DOCUMENT_ROOT), @@ -1374,7 +1681,7 @@ class PerRequestTestCase(unittest.TestCase): SetHandler("mod_python"), PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT), PythonHandler("tests::simplehandler"), - PythonOutputFilter("tests::outputfilter MP_TEST_FILTER"), + PythonOutputFilter("tests::outputfilter1 MP_TEST_FILTER"), PythonDebug("On"), AddOutputFilter("MP_TEST_FILTER .py")) return str(c) @@ -1387,11 +1694,55 @@ class PerRequestTestCase(unittest.TestCase): if (rsp != "TEST OK"): self.fail(`rsp`) + def test_req_add_output_filter_conf(self): + + c = VirtualHost("*", + ServerName("test_req_add_output_filter"), + DocumentRoot(DOCUMENT_ROOT), + SetHandler("mod_python"), + PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT), + PythonHandler("tests::req_add_output_filter"), + PythonOutputFilter("tests::outputfilter1 MP_TEST_FILTER"), + PythonDebug("On")) + return str(c) + + def test_req_add_output_filter(self): + + print "\n * Testing req.add_output_filter" + rsp = self.vhost_get("test_req_add_output_filter") + + if (rsp != "TEST OK"): + self.fail(`rsp`) + + def test_req_register_output_filter_conf(self): + + c = VirtualHost("*", + ServerName("test_req_register_output_filter"), + DocumentRoot(DOCUMENT_ROOT), + SetHandler("mod_python"), + PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT), + PythonHandler("tests::req_register_output_filter"), + PythonDebug("On")) + return str(c) + + def test_req_register_output_filter(self): + + print "\n * Testing req.register_output_filter" + rsp = self.vhost_get("test_req_register_output_filter") + + if (rsp != "TTEESSTT OOKK"): + self.fail(`rsp`) + def test_connectionhandler_conf(self): + try: + localip = socket.gethostbyname("localhost") + except: + localip = "127.0.0.1" + self.conport = findUnusedPort() c = str(Listen("%d" % self.conport)) + \ - str(VirtualHost("127.0.0.1:%d" % self.conport, + str(VirtualHost("%s:%d" % (localip, self.conport), SetHandler("mod_python"), PythonPath("[r'%s']+sys.path" % DOCUMENT_ROOT), PythonConnectionHandler("tests::connectionhandler"))) @@ -1420,8 +1771,6 @@ class PerRequestTestCase(unittest.TestCase): Directory(DOCUMENT_ROOT, SetHandler("mod_python"), PythonHandler("tests"), - PythonOption('PythonOptionTest ""'), - PythonOption('mod_python.mutex_directory ""'), PythonOption("testing 123"), PythonDebug("On"))) return str(c) @@ -1545,6 +1894,26 @@ class PerRequestTestCase(unittest.TestCase): msg = 'psp_parser parse errors for: %s' % (', '.join(failures)) self.fail(msg) + def test_psp_error_conf(self): + + c = VirtualHost("*", + ServerName("test_psp_error"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("mod_python.psp"), + PythonOption('mod_python.session.database_directory "%s"' % TMP_DIR), + PythonDebug("On"))) + return str(c) + + def test_psp_error(self): + + print "\n * Testing mod_python.psp error page" + + rsp = self.vhost_get("test_psp_error", path="/psptest_main.psp") + if (rsp.strip().split() != ["okay","fail"]): + self.fail(`rsp`) + def test_Cookie_Cookie_conf(self): c = VirtualHost("*", @@ -1638,7 +2007,9 @@ class PerRequestTestCase(unittest.TestCase): Directory(DOCUMENT_ROOT, SetHandler("mod_python"), PythonHandler("tests::Session_Session"), - PythonOption('session_directory "%s"' % TMP_DIR), + PythonOption('mod_python.session.database_directory "%s"' % TMP_DIR), + PythonOption('mod_python.session.application_path "/path"'), + PythonOption('mod_python.session.application_domain "test_Session_Session"'), PythonDebug("On"))) return str(c) @@ -1658,6 +2029,18 @@ class PerRequestTestCase(unittest.TestCase): if rsp != "test ok" or setcookie == None: self.fail("session did not set a cookie") + parts = setcookie.split('; ') + fields = {} + for part in parts: + key, value = part.split('=') + fields[key] = value + + if not fields.has_key('path') or fields['path'] != '/path': + self.fail("session did not contain expected 'path'") + + if not fields.has_key('domain') or fields['domain'] != 'test_Session_Session': + self.fail("session did not contain expected 'domain'") + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) conn.putrequest("GET", "/tests.py", skip_host=1) conn.putheader("Host", "test_Session_Session:%s" % PORT) @@ -1677,7 +2060,7 @@ class PerRequestTestCase(unittest.TestCase): Directory(DOCUMENT_ROOT, SetHandler("mod_python"), PythonHandler("tests::Session_Session"), - PythonOption('session_directory "%s"' % TMP_DIR), + PythonOption('mod_python.session.database_directory "%s"' % TMP_DIR), PythonDebug("On"))) return str(c) @@ -1691,10 +2074,11 @@ class PerRequestTestCase(unittest.TestCase): conn.putheader("Cookie", bad_cookie) conn.endheaders() response = conn.getresponse() + setcookie = response.getheader("set-cookie", None) status = response.status conn.close() - if status != 500: - self.fail("session accepted a sid with illegal characters") + if status != 200 or not setcookie: + self.fail("session id with illegal characters not replaced") bad_cookie = 'pysid=%s; path=/' % ('abcdef'*64) conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) @@ -1703,10 +2087,105 @@ class PerRequestTestCase(unittest.TestCase): conn.putheader("Cookie", bad_cookie) conn.endheaders() response = conn.getresponse() + setcookie = response.getheader("set-cookie", None) + status = response.status + conn.close() + if status != 200 or not setcookie: + self.fail("session id which is too long not replaced") + + def test_files_directive_conf(self): + c = VirtualHost("*", + ServerName("test_files_directive"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + Files("*.py", + SetHandler("mod_python"), + PythonHandler("tests::files_directive"), + PythonDebug("On")))) + return str(c) + + def test_files_directive(self): + + directory = (DOCUMENT_ROOT.replace('\\', '/')+'/').upper() + + print "\n * Testing Files directive" + rsp = self.vhost_get("test_files_directive", path="/tests.py").upper() + + if rsp != directory: + self.fail(`rsp`) + + def test_none_handler_conf(self): + c = VirtualHost("*", + ServerName("test_none_handler"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("tests::none_handler"), + PythonDebug("On"))) + return str(c) + + def test_none_handler(self): + + print "\n * Testing None handler" + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/tests.py", skip_host=1) + conn.putheader("Host", "test_none_handler:%s" % PORT) + conn.endheaders() + response = conn.getresponse() status = response.status + rsp = response.read() conn.close() if status != 500: - self.fail("session accepted a sid which is too long") + print status, rsp + self.fail("none handler should generate error") + + def test_server_return_conf(self): + c = VirtualHost("*", + ServerName("test_server_return"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("tests::server_return_1"), + PythonHandler("tests::server_return_2"), + PythonDebug("On"))) + return str(c) + + def test_server_return(self): + + print "\n * Testing SERVER_RETURN" + rsp = self.vhost_get("test_server_return") + + if (rsp != "test ok"): + self.fail(`rsp`) + + def test_phase_status_conf(self): + c = VirtualHost("*", + ServerName("test_phase_status"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + AuthType("bogus"), + AuthName("bogus"), + Require("valid-user"), + PythonAuthenHandler("tests::phase_status_1"), + PythonAuthenHandler("tests::phase_status_2"), + PythonAuthenHandler("tests::phase_status_3"), + PythonAuthzHandler("tests::phase_status_4"), + PythonFixupHandler("tests::phase_status_5"), + PythonFixupHandler("tests::phase_status_6"), + PythonFixupHandler("tests::phase_status_7"), + PythonHandler("tests::phase_status_8"), + PythonDebug("On"))) + return str(c) + + def test_phase_status(self): + + print "\n * Testing phase status" + rsp = self.vhost_get("test_phase_status") + + if (rsp != "test ok"): + self.fail(`rsp`) def test_publisher_conf(self): c = VirtualHost("*", @@ -1717,7 +2196,7 @@ class PerRequestTestCase(unittest.TestCase): PythonHandler("mod_python.publisher"), PythonDebug("On"))) return str(c) - + def test_publisher(self): print "\n * Testing mod_python.publisher" @@ -1745,6 +2224,86 @@ class PerRequestTestCase(unittest.TestCase): if (rsp != "test ok, interpreter=test_publisher"): self.fail(`rsp`) + def test_publisher_auth_nested_conf(self): + c = VirtualHost("*", + ServerName("test_publisher_auth_nested"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("mod_python.publisher"), + PythonDebug("On"))) + return str(c) + + def test_publisher_auth_nested(self): + print "\n * Testing mod_python.publisher auth nested" + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/tests.py/test_publisher_auth_nested", skip_host=1) + conn.putheader("Host", "%s:%s" % ("test_publisher_auth_nested", PORT)) + auth = base64.encodestring("spam:eggs").strip() + conn.putheader("Authorization", "Basic %s" % auth) + conn.endheaders() + response = conn.getresponse() + rsp = response.read() + conn.close() + + if (rsp != "test ok, interpreter=test_publisher_auth_nested"): + self.fail(`rsp`) + + def test_publisher_auth_method_nested_conf(self): + c = VirtualHost("*", + ServerName("test_publisher_auth_method_nested"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("mod_python.publisher"), + PythonDebug("On"))) + return str(c) + + def test_publisher_auth_method_nested(self): + print "\n * Testing mod_python.publisher auth method nested" + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/tests.py/test_publisher_auth_method_nested/method", skip_host=1) + conn.putheader("Host", "%s:%s" % ("test_publisher_auth_method_nested", PORT)) + auth = base64.encodestring("spam:eggs").strip() + conn.putheader("Authorization", "Basic %s" % auth) + conn.endheaders() + response = conn.getresponse() + rsp = response.read() + conn.close() + + if (rsp != "test ok, interpreter=test_publisher_auth_method_nested"): + self.fail(`rsp`) + + def test_publisher_auth_digest_conf(self): + c = VirtualHost("*", + ServerName("test_publisher_auth_digest"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + SetHandler("mod_python"), + PythonHandler("mod_python.publisher"), + PythonDebug("On"))) + return str(c) + + def test_publisher_auth_digest(self): + print "\n * Testing mod_python.publisher auth digest compatability" + + # The contents of the authorization header is not relevant, + # as long as it looks valid. + + conn = httplib.HTTPConnection("127.0.0.1:%s" % PORT) + conn.putrequest("GET", "/tests.py/test_publisher", skip_host=1) + conn.putheader("Host", "%s:%s" % ("test_publisher_auth_digest", PORT)) + conn.putheader("Authorization", 'Digest username="Mufasa", realm="testrealm@host.com", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093", uri="/dir/index.html", qop=auth, nc=00000001, cnonce="0a4f113b", response="6629fae49393a05397450978507c4ef1", opaque="5ccc069c403ebaf9f0171e9517f40e41"') + conn.endheaders() + response = conn.getresponse() + rsp = response.read() + conn.close() + + if (rsp != "test ok, interpreter=test_publisher_auth_digest"): + self.fail(`rsp`) + def test_publisher_security_conf(self): c = VirtualHost("*", ServerName("test_publisher"), @@ -1974,6 +2533,28 @@ class PerRequestTestCase(unittest.TestCase): finally: os.remove('htdocs/temp.py') + def test_server_side_include_conf(self): + c = VirtualHost("*", + ServerName("test_server_side_include"), + DocumentRoot(DOCUMENT_ROOT), + Directory(DOCUMENT_ROOT, + Options("+Includes"), + AddType("text/html .shtml"), + AddOutputFilter("INCLUDES .shtml"), + PythonFixupHandler("tests::server_side_include"), + PythonDebug("On"))) + return str(c) + + def test_server_side_include(self): + + print "\n * Testing server side include" + rsp = self.vhost_get("test_server_side_include", path="/ssi.shtml") + + rsp = rsp.strip() + + if (rsp != "test ok"): + self.fail(`rsp`) + class PerInstanceTestCase(unittest.TestCase, HttpdCtrl): # this is a test case which requires a complete # restart of httpd (e.g. we're using a fancy config) @@ -2046,19 +2627,29 @@ class PerInstanceTestCase(unittest.TestCase, HttpdCtrl): perRequestSuite.addTest(PerRequestTestCase("test_req_add_handler")) perRequestSuite.addTest(PerRequestTestCase("test_req_add_bad_handler")) perRequestSuite.addTest(PerRequestTestCase("test_req_add_empty_handler_string")) + perRequestSuite.addTest(PerRequestTestCase("test_req_add_handler_empty_phase")) + perRequestSuite.addTest(PerRequestTestCase("test_req_add_handler_directory")) perRequestSuite.addTest(PerRequestTestCase("test_accesshandler_add_handler_to_empty_hl")) perRequestSuite.addTest(PerRequestTestCase("test_req_allow_methods")) perRequestSuite.addTest(PerRequestTestCase("test_req_get_basic_auth_pw")) + perRequestSuite.addTest(PerRequestTestCase("test_req_auth_type")) perRequestSuite.addTest(PerRequestTestCase("test_req_requires")) perRequestSuite.addTest(PerRequestTestCase("test_req_internal_redirect")) + perRequestSuite.addTest(PerRequestTestCase("test_req_construct_url")) perRequestSuite.addTest(PerRequestTestCase("test_req_read")) perRequestSuite.addTest(PerRequestTestCase("test_req_readline")) perRequestSuite.addTest(PerRequestTestCase("test_req_readlines")) + perRequestSuite.addTest(PerRequestTestCase("test_req_discard_request_body")) perRequestSuite.addTest(PerRequestTestCase("test_req_register_cleanup")) perRequestSuite.addTest(PerRequestTestCase("test_req_headers_out")) perRequestSuite.addTest(PerRequestTestCase("test_req_sendfile")) perRequestSuite.addTest(PerRequestTestCase("test_req_sendfile2")) perRequestSuite.addTest(PerRequestTestCase("test_req_sendfile3")) + perRequestSuite.addTest(PerRequestTestCase("test_req_handler")) + perRequestSuite.addTest(PerRequestTestCase("test_req_no_cache")) + perRequestSuite.addTest(PerRequestTestCase("test_req_update_mtime")) + perRequestSuite.addTest(PerRequestTestCase("test_util_redirect")) + perRequestSuite.addTest(PerRequestTestCase("test_req_server_get_config")) perRequestSuite.addTest(PerRequestTestCase("test_req_server_get_options")) perRequestSuite.addTest(PerRequestTestCase("test_fileupload")) perRequestSuite.addTest(PerRequestTestCase("test_fileupload_embedded_cr")) @@ -2071,19 +2662,29 @@ class PerInstanceTestCase(unittest.TestCase, HttpdCtrl): perRequestSuite.addTest(PerRequestTestCase("test_postreadrequest")) perRequestSuite.addTest(PerRequestTestCase("test_trans")) perRequestSuite.addTest(PerRequestTestCase("test_outputfilter")) + perRequestSuite.addTest(PerRequestTestCase("test_req_add_output_filter")) + perRequestSuite.addTest(PerRequestTestCase("test_req_register_output_filter")) perRequestSuite.addTest(PerRequestTestCase("test_connectionhandler")) perRequestSuite.addTest(PerRequestTestCase("test_import")) perRequestSuite.addTest(PerRequestTestCase("test_pipe_ext")) perRequestSuite.addTest(PerRequestTestCase("test_cgihandler")) perRequestSuite.addTest(PerRequestTestCase("test_psphandler")) perRequestSuite.addTest(PerRequestTestCase("test_psp_parser")) + perRequestSuite.addTest(PerRequestTestCase("test_psp_error")) perRequestSuite.addTest(PerRequestTestCase("test_Cookie_Cookie")) perRequestSuite.addTest(PerRequestTestCase("test_Cookie_MarshalCookie")) perRequestSuite.addTest(PerRequestTestCase("test_Session_Session")) perRequestSuite.addTest(PerRequestTestCase("test_Session_illegal_sid")) perRequestSuite.addTest(PerRequestTestCase("test_interpreter_per_directive")) perRequestSuite.addTest(PerRequestTestCase("test_interpreter_per_directory")) + perRequestSuite.addTest(PerRequestTestCase("test_files_directive")) + perRequestSuite.addTest(PerRequestTestCase("test_none_handler")) + perRequestSuite.addTest(PerRequestTestCase("test_server_return")) + perRequestSuite.addTest(PerRequestTestCase("test_phase_status")) perRequestSuite.addTest(PerRequestTestCase("test_publisher")) + perRequestSuite.addTest(PerRequestTestCase("test_publisher_auth_nested")) + perRequestSuite.addTest(PerRequestTestCase("test_publisher_auth_method_nested")) + perRequestSuite.addTest(PerRequestTestCase("test_publisher_auth_digest")) perRequestSuite.addTest(PerRequestTestCase("test_publisher_old_style_instance")) perRequestSuite.addTest(PerRequestTestCase("test_publisher_instance")) perRequestSuite.addTest(PerRequestTestCase("test_publisher_security")) @@ -2095,6 +2696,8 @@ class PerInstanceTestCase(unittest.TestCase, HttpdCtrl): # configurations, so disable it. #perRequestSuite.addTest(PerRequestTestCase("test_publisher_cache")) + perRequestSuite.addTest(PerRequestTestCase("test_server_side_include")) + # this must be last so its error_log is not overwritten perRequestSuite.addTest(PerRequestTestCase("test_internal")) @@ -2132,7 +2735,7 @@ class PerInstanceTestCase(unittest.TestCase, HttpdCtrl): f = open(os.path.join(SERVER_ROOT, "logs/error_log")) log = f.read() f.close() - if log.find("test ok") == -1: + if log.find("srv_register_cleanup test ok") == -1: self.fail("Could not find test message in error_log") def test_apache_register_cleanup(self): @@ -2161,7 +2764,7 @@ class PerInstanceTestCase(unittest.TestCase, HttpdCtrl): f = open(os.path.join(SERVER_ROOT, "logs/error_log")) log = f.read() f.close() - if log.find("test 2 ok") == -1: + if log.find("apache_register_cleanup test ok") == -1: self.fail("Could not find test message in error_log") def test_apache_exists_config_define(self):