From: Justin Erenkrantz Date: Thu, 30 Aug 2001 21:29:15 +0000 (+0000) Subject: Fix a segfault with mod_include when r->path_info is not set X-Git-Tag: 2.0.26~372 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9dd8693d2bd91692bdfdbcd113a370452b66b751;p=apache Fix a segfault with mod_include when r->path_info is not set (which is the case with mod_proxy). My only question about this is whether we should place some value (such as ) when path_info isn't set. Submitted by: Ian Holsman Reviewed by: Justin Erenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90825 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 94e1567039..a1904447ad 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.26-dev + *) Fix a segfault with mod_include when r->path_info is not set + (which is the case with mod_proxy). [Ian Holsman ] + *) Add -X functionality back. This indicates to all MPMs and any other part of Apache that it should run in "debug" mode. [Justin Erenkrantz] diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index b6c0ed1ad1..a516e9486f 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -113,7 +113,9 @@ static void add_include_vars(request_rec *r, char *timefmt) apr_table_setn(e, "LAST_MODIFIED", ap_ht_time(r->pool, r->finfo.mtime, timefmt, 0)); apr_table_setn(e, "DOCUMENT_URI", r->uri); - apr_table_setn(e, "DOCUMENT_PATH_INFO", r->path_info); + if (r->path_info && *r->path_info) { + apr_table_setn(e, "DOCUMENT_PATH_INFO", r->path_info); + } if (apr_get_username(&pwname, r->finfo.user, r->pool) == APR_SUCCESS) { apr_table_setn(e, "USER_NAME", pwname); }