diff options
author | foobar <sniper@php.net> | 2003-07-11 04:23:34 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2003-07-11 04:23:34 +0000 |
commit | d6430ab79f964ace209f639bdb92dd89ba74d715 (patch) | |
tree | c74978cd304f65b87f6ab62ac48add1e2264600f /sapi/apache2filter | |
parent | 5aeedb4c88717e50ee362b2d36c560ee0cff63c2 (diff) | |
download | php-git-d6430ab79f964ace209f639bdb92dd89ba74d715.tar.gz |
- Fixed bug #21074 (Apache2: "ErrorDocument xxx /error.php" broken). (Jani)
Diffstat (limited to 'sapi/apache2filter')
-rw-r--r-- | sapi/apache2filter/sapi_apache2.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index f53407c551..176a0227f4 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -435,10 +435,16 @@ static int php_output_filter(ap_filter_t *f, apr_bucket_brigade *bb) 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, |