You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2006/11/22 11:41:07 UTC

svn commit: r478119 - in /httpd/mod_python/trunk: Doc/appendixc.tex Doc/modpython5.tex lib/python/mod_python/__init__.py lib/python/mod_python/importer.py src/include/mpversion.h

Author: grahamd
Date: Wed Nov 22 02:41:06 2006
New Revision: 478119

URL: http://svn.apache.org/viewvc?view=rev&rev=478119
Log:
(MODPYTHON-129) Changed how return status of stacked handlers registered
against PythonHandler phase are interpreted. Subsequent stacked content
handlers are now executed when apache.DECLINED is returned as well as when
apache.OK is returned.


Modified:
    httpd/mod_python/trunk/Doc/appendixc.tex
    httpd/mod_python/trunk/Doc/modpython5.tex
    httpd/mod_python/trunk/lib/python/mod_python/__init__.py
    httpd/mod_python/trunk/lib/python/mod_python/importer.py
    httpd/mod_python/trunk/src/include/mpversion.h

Modified: httpd/mod_python/trunk/Doc/appendixc.tex
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/Doc/appendixc.tex?view=diff&rev=478119&r1=478118&r2=478119
==============================================================================
--- httpd/mod_python/trunk/Doc/appendixc.tex (original)
+++ httpd/mod_python/trunk/Doc/appendixc.tex Wed Nov 22 02:41:06 2006
@@ -199,24 +199,28 @@
       for \code{apr_stat()}.
     \item
       (\citetitle[http://issues.apache.org/jira/browse/MODPYTHON-129]{MODPYTHON-129})
-      When specifying multiple handlers for phases other than the content
-      phase as defined by \code{PythonHandler}, 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 previously stacked handlers of any phase would
-      in turn be executed as long as they returned \code{apache.OK}, this
-      is no longer the case and now only occurs for \code{PythonHandler}.
-      What happens for other phases is dependent on the phase, but in all
-      cases, 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.
+      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.

Modified: httpd/mod_python/trunk/Doc/modpython5.tex
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/Doc/modpython5.tex?view=diff&rev=478119&r1=478118&r2=478119
==============================================================================
--- httpd/mod_python/trunk/Doc/modpython5.tex (original)
+++ httpd/mod_python/trunk/Doc/modpython5.tex Wed Nov 22 02:41:06 2006
@@ -27,8 +27,7 @@
 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. This is now the case only for the \code{PythonHandler}
-directive.
+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
@@ -335,8 +334,14 @@
 this one handler.
 
 Where multiple handlers are specified, if any handler in the sequence
-returns a value other than \code{apache.OK}, then execution of all
-subsequent handlers for this phase are aborted.
+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}

Modified: httpd/mod_python/trunk/lib/python/mod_python/__init__.py
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/lib/python/mod_python/__init__.py?view=diff&rev=478119&r1=478118&r2=478119
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/__init__.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/__init__.py Wed Nov 22 02:41:06 2006
@@ -20,5 +20,5 @@
 __all__ = ["apache", "cgihandler", "psp",
            "publisher", "util", "python22"]
 
-version = "3.3.0-dev-20061119"
+version = "3.3.0-dev-20061122"
 

Modified: httpd/mod_python/trunk/lib/python/mod_python/importer.py
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/lib/python/mod_python/importer.py?view=diff&rev=478119&r1=478118&r2=478119
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/importer.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/importer.py Wed Nov 22 02:41:06 2006
@@ -1090,7 +1090,7 @@
     "typehandler":              [ apache.DECLINED ],
     "fixuphandler":             [ apache.DECLINED, apache.OK ],
     "loghandler":               [ apache.DECLINED, apache.OK ],
-    "handler":                  [ apache.OK ],
+    "handler":                  [ apache.DECLINED, apache.OK ],
 }
 
 def _execute_target(config, req, object, arg):

Modified: httpd/mod_python/trunk/src/include/mpversion.h
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/src/include/mpversion.h?view=diff&rev=478119&r1=478118&r2=478119
==============================================================================
--- httpd/mod_python/trunk/src/include/mpversion.h (original)
+++ httpd/mod_python/trunk/src/include/mpversion.h Wed Nov 22 02:41:06 2006
@@ -1,5 +1,5 @@
 #define MPV_MAJOR 3
 #define MPV_MINOR 3
 #define MPV_PATCH 0
-#define MPV_BUILD 20061119
-#define MPV_STRING "3.3.0-dev-20061119"
+#define MPV_BUILD 20061122
+#define MPV_STRING "3.3.0-dev-20061122"