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 nl...@apache.org on 2005/08/10 12:52:42 UTC
svn commit: r231212 - /httpd/mod_python/trunk/src/requestobject.c
Author: nlehuen
Date: Wed Aug 10 03:52:39 2005
New Revision: 231212
URL: http://svn.apache.org/viewcvs?rev=231212&view=rev
Log:
Graham's patch for MODPYTHON-67.
Modified:
httpd/mod_python/trunk/src/requestobject.c
Modified: httpd/mod_python/trunk/src/requestobject.c
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/requestobject.c?rev=231212&r1=231211&r2=231212&view=diff
==============================================================================
--- httpd/mod_python/trunk/src/requestobject.c (original)
+++ httpd/mod_python/trunk/src/requestobject.c Wed Aug 10 03:52:39 2005
@@ -492,7 +492,7 @@
}
}
#endif
-
+
Py_BEGIN_ALLOW_THREADS
ap_internal_redirect(new_uri, self->request_rec);
Py_END_ALLOW_THREADS
@@ -1235,6 +1235,15 @@
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");
+ return -1;
+ }
+ self->request_rec->path_info =
+ apr_pstrdup(self->request_rec->pool, PyString_AsString(val));
+ return 0;
+ }
return PyMember_SetOne((char*)self->request_rec,
find_memberdef(request_rec_mbrs, (char*)name),
@@ -1433,7 +1442,7 @@
{"uri", (getter)getreq_recmbr, NULL, "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"},
- {"path_info", (getter)getreq_recmbr, NULL, "Path_info, if any", "path_info"},
+ {"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"},
{"parsed_uri", (getter)getreq_rec_uri, NULL, "Components of URI", "parsed_uri"},