Skip to content

Commit

Permalink
Fixed bug #72308 (fastcgi_finish_request and logging environment vari…
Browse files Browse the repository at this point in the history
…ables)
  • Loading branch information
laruence committed Jun 2, 2016
1 parent 51cb58e commit 31ce3a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 6 additions & 1 deletion main/fastcgi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion sapi/fpm/fpm/fpm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 31ce3a6

Please sign in to comment.