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/03/24 12:06:14 UTC

svn commit: r388487 - in /httpd/mod_python/trunk: lib/python/mod_python/__init__.py src/include/mpversion.h src/mod_python.c

Author: grahamd
Date: Fri Mar 24 03:06:08 2006
New Revision: 388487

URL: http://svn.apache.org/viewcvs?rev=388487&view=rev
Log:
Moved where python_filter() accesses per request Python config to after the
request config object is acquired. Needed as way ap_internal_fast_redirect()
is used by Apache to implement DirectoryIndex was creating scenario where
per request config was null in parent request when accessed, causing a crash.
(MODPYTHON-103) (MODPYTHON-146)

Modified:
    httpd/mod_python/trunk/lib/python/mod_python/__init__.py
    httpd/mod_python/trunk/src/include/mpversion.h
    httpd/mod_python/trunk/src/mod_python.c

Modified: httpd/mod_python/trunk/lib/python/mod_python/__init__.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/__init__.py?rev=388487&r1=388486&r2=388487&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/__init__.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/__init__.py Fri Mar 24 03:06:08 2006
@@ -20,5 +20,5 @@
 __all__ = ["apache", "cgihandler", "psp",
            "publisher", "util", "python22"]
 
-version = "3.3.0-dev-20060321"
+version = "3.3.0-dev-20060324"
 

Modified: httpd/mod_python/trunk/src/include/mpversion.h
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/include/mpversion.h?rev=388487&r1=388486&r2=388487&view=diff
==============================================================================
--- httpd/mod_python/trunk/src/include/mpversion.h (original)
+++ httpd/mod_python/trunk/src/include/mpversion.h Fri Mar 24 03:06:08 2006
@@ -1,5 +1,5 @@
 #define MPV_MAJOR 3
 #define MPV_MINOR 3
 #define MPV_PATCH 0
-#define MPV_BUILD 20060321
-#define MPV_STRING "3.3.0-dev-20060321"
+#define MPV_BUILD 20060324
+#define MPV_STRING "3.3.0-dev-20060324"

Modified: httpd/mod_python/trunk/src/mod_python.c
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/mod_python.c?rev=388487&r1=388486&r2=388487&view=diff
==============================================================================
--- httpd/mod_python/trunk/src/mod_python.c (original)
+++ httpd/mod_python/trunk/src/mod_python.c Fri Mar 24 03:06:08 2006
@@ -1454,8 +1454,6 @@
     /* get configuration */
     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);
 
     /* determine interpreter to use */
     interp_name = select_interp_name(req, NULL, conf, NULL, f->frec->name, is_input);
@@ -1471,6 +1469,9 @@
 
     /* create/acquire request object */
     request_obj = get_request_object(req, interp_name, 0);
+
+    req_config = (py_req_config *) ap_get_module_config(req->request_config,
+                                                        &python_module);
 
     /* the name of python function to call */
     if (ctx->name) {