Skip to content

Commit

Permalink
Merge branch 'PHP-7.0'
Browse files Browse the repository at this point in the history
* PHP-7.0:
  Fixed bug #72308 (fastcgi_finish_request and logging environment variables)
  • Loading branch information
laruence committed Jun 2, 2016
2 parents 1b4946e + 31ce3a6 commit 0ed4034
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
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 0ed4034

Please sign in to comment.