com php-src: Fixed bug #72308 (fastcgi_finish_request a nd logging environment variables): NEWS main/fast cgi.c sapi/fpm/fpm/fpm_main.c

From: Date: Thu, 02 Jun 2016 06:16:32 +0000
Subject: com php-src: Fixed bug #72308 (fastcgi_finish_request a nd logging environment variables): NEWS main/fast cgi.c sapi/fpm/fpm/fpm_main.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92268@lists.php.net to get a copy of this message
Commit: 31ce3a661a04ec8addd8b0ede4af2d336646d0ec Author: Xinchen Hui <laruence@gmail.com> Thu, 2 Jun 2016 14:16:32 +0800 Parents: 51cb58e7092afe794b56e575e3c18ae23d7905ee Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=31ce3a661a04ec8addd8b0ede4af2d336646d0ec Log: Fixed bug #72308 (fastcgi_finish_request and logging environment variables) Bugs: https://bugs.php.net/72308 Changed paths: M NEWS M main/fastcgi.c M sapi/fpm/fpm/fpm_main.c Diff: diff --git a/NEWS b/NEWS index 27846d9..54c7960 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,10 @@ PHP NEWS . Fixed bug #72218 (If host name cannot be resolved then PHP 7 crashes). (Esminis at esminis dot lt) +- FPM: + . Fixed bug #72308 (fastcgi_finish_request and logging environment + variables). (Laruence) + - Intl: . Fixed bug #64524 (Add intl.use_exceptions to php.ini-*).. (Anatol) diff --git a/main/fastcgi.c b/main/fastcgi.c index fbc6f40..8fc7d6a 100644 --- a/main/fastcgi.c +++ b/main/fastcgi.c @@ -1049,7 +1049,12 @@ static int fcgi_read_request(fcgi_request *req) req->in_len = 0; req->out_hdr = NULL; req->out_pos = req->out_buf; - req->has_env = 1; + + if (req->has_env) { + fcgi_hash_clean(&req->env); + } else { + req->has_env = 1; + } if (safe_read(req, &hdr, sizeof(fcgi_header)) != sizeof(fcgi_header) || hdr.version < FCGI_VERSION_1) { diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index 940d6c7..5adeb63 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -1538,7 +1538,7 @@ PHP_FUNCTION(fastcgi_finish_request) /* {{{ */ php_header(); fcgi_flush(request, 1); - fcgi_close(request, 0, 1); + fcgi_close(request, 0, 0); RETURN_TRUE; }

« previous php.cvs (#92268) next »