PHP CVS 43 CVS PHP SRC SAPI APACHE2FILTER SAPI APACHE2 C SAPI APACHE2HANDLER SAPI APACHE2 C
Date: Fri, 11 Jul 2003 04:23:34 -0000

Subject: cvs: php-src /sapi/apache2filter sapi_apache2.c /sapi/apache2handler sapi_apache2.c
From: sniper@no-spam (Jani Taskinen)

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
@@no-spam -18,7 +18,7 @@no-spam +----------------------------------------------------------------------+
*/
-/* $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>
@@no-spam -435,10 +435,16 @@no-spam 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
@@no-spam -18,7 +18,7 @@no-spam +----------------------------------------------------------------------+
*/
-/* $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>
@@no-spam -465,9 +465,15 @@no-spam 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) {