Bug #76922 [Opn->Csd]: FastCGI terminates connection immediately after FCGI_GET_VALUES

From: Date: Fri, 03 Nov 2023 14:08:47 +0000
Subject: Bug #76922 [Opn->Csd]: FastCGI terminates connection immediately after FCGI_GET_VALUES
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245732@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76922&edit=1 ID: 76922 Updated by: git@php.net Reported by: webmaster_20180923 at cubiclesoft dot com Summary: FastCGI terminates connection immediately after FCGI_GET_VALUES -Status: Open +Status: Closed Type: Bug Package: FPM related Operating System: N/A PHP Version: 7.2.10 Block user comment: N Private report: N New Comment: Automatic comment on behalf of bukka Revision: https://github.com/php/php-src/commit/e3d1beb0f18255cf1965d69b7456907c643aa9ff Log: Fix bug #76922: FastCGI terminates conn after FCGI_GET_VALUES Previous Comments: ------------------------------------------------------------------------ [2018-09-23 15:02:18] webmaster_20180923 at cubiclesoft dot com Description: ------------ Sending a valid FCGI_GET_VALUES record results in a valid FCGI_GET_VALUES_RESULT response BUT the connection is terminated immediately afterwards. If a FastCGI enabled application wants to know what the limits of the FastCGI server are before beginning to make requests, then this behavior requires two separate FastCGI connections - one to obtain the information and another to make the actual request. In addition, the conditions of a general-purpose FastCGI server can change between connections. FCGI_GET_VALUES is not considered to be an actual request as it is a management record type AND the FastCGI specification mandates that the client drives server connection/disconnection (not the other way around). As a result, PHP's behavior is not compliant with the FastCGI spec. Test script: --------------- Analysis: The fcgi_read_request() function returns 0 back to the caller (fcgi_accept_request()) when handling FCGI_GET_VALUES. That, in turn, results in calling fcgi_close(), which terminates the connection. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76922&edit=1

« previous php.bugs (#245732) next »