sniper Fri Jul 11 00:23:34 2003 EDT
Modified files:
/php-src/sapi/apache2filter sapi_apache2.c
/php-src/sapi/apache2handler sapi_apache2.c
Log:
- Fixed bug #21074 (Apache2: "ErrorDocument xxx /error.php" broken). (Jani)
Index: php-src/sapi/apache2filter/sapi_apache2.c
diff -u php-src/sapi/apache2filter/sapi_apache2.c:1.115
php-src/sapi/apache2filter/sapi_apache2.c:1.116
--- php-src/sapi/apache2filter/sapi_apache2.c:1.115 Tue Jun 10 16:03:44 2003
+++ php-src/sapi/apache2filter/sapi_apache2.c Fri Jul 11 00:23:34 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.115 2003/06/10 20:03:44 imajes Exp $ */
+/* $Id: sapi_apache2.c,v 1.116 2003/07/11 04:23:34 sniper Exp $ */
#include <fcntl.h>
@@ -435,10 +435,16 @@
return ap_pass_brigade(f->next, bb);
}
- /* setup standard CGI variables */
- ap_add_common_vars(f->r);
- ap_add_cgi_vars(f->r);
-
+ /* Setup the CGI variables if this is the main request.. */
+ if (f->r->main == NULL ||
+ /* .. or if the sub-request envinronment differs from the
main-request. */
+ f->r->subprocess_env != f->r->main->subprocess_env
+ ) {
+ /* setup standard CGI variables */
+ ap_add_common_vars(f->r);
+ ap_add_cgi_vars(f->r);
+ }
+
ctx = SG(server_context);
if (ctx == NULL) {
ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, f->r,
Index: php-src/sapi/apache2handler/sapi_apache2.c
diff -u php-src/sapi/apache2handler/sapi_apache2.c:1.21
php-src/sapi/apache2handler/sapi_apache2.c:1.22
--- php-src/sapi/apache2handler/sapi_apache2.c:1.21 Tue Jun 10 16:03:44 2003
+++ php-src/sapi/apache2handler/sapi_apache2.c Fri Jul 11 00:23:34 2003
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sapi_apache2.c,v 1.21 2003/06/10 20:03:44 imajes Exp $ */
+/* $Id: sapi_apache2.c,v 1.22 2003/07/11 04:23:34 sniper Exp $ */
#include <fcntl.h>
@@ -465,9 +465,15 @@
return DECLINED;
}
- /* setup standard CGI variables */
- ap_add_common_vars(r);
- ap_add_cgi_vars(r);
+ /* Setup the CGI variables if this is the main request */
+ if (r->main == NULL ||
+ /* .. or if the sub-request envinronment differs from the
main-request. */
+ r->subprocess_env != r->main->subprocess_env
+ ) {
+ /* setup standard CGI variables */
+ ap_add_common_vars(r);
+ ap_add_cgi_vars(r);
+ }
ctx = SG(server_context);
if (ctx == NULL) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php