Web: FastCGI record codec + VM listener (#173)#3261
Merged
Conversation
Add lib/Web/FastCgi framing (records, PARAMS codec, request assembly), bin/fcgi.php / phpc fcgi for single-request VM serving, and PHPUnit coverage for binary records plus 009-FastCGIWeb health over TCP. php-src reference: sapi/fpm/fpm/fpm_main.c. Multiplexed loop and AOT adapter remain follow-ups on #173. Co-authored-by: Cursor <cursoragent@cursor.com>
FCGI_KEEP_CONN serves multiple requests per connection; RequestHandler can exec phpc-built binaries via CgiAotDriver::runCapture and fcgi --binary. Co-authored-by: Cursor <cursoragent@cursor.com>
Add health + PATH_INFO tests behind FASTCGI_WEB_AOT_SMOKE_GATE, exercising bin/fcgi.php --binary with the compiled example app over TCP FastCGI records. Co-authored-by: Cursor <cursoragent@cursor.com>
6a57b20 to
bbe15d6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lib/Web/FastCgi/(issue Web: FastCGI request loop adapter (nginx / php-fpm compatible) #173 slice 1).bin/fcgi.phpandphpc fcgifor VM serving over TCP;RequestHandlermaps PARAMS → CGI env and runsCgiDriver::runVmScript(slice 2).FCGI_KEEP_CONNmultiplex — multiple requests per connection (php-fpm keep-alive parity).--binaryflag routes throughCgiAotDriver::runCapture()for native AOT binaries (Web: AOT CGI wrapper for phpc-built binaries (production nginx spawn) #665 pattern).FastCgiTest::testAotFastCgiHealthReturnsOk+testAotFastCgiPathInfoDiagnosticsbehindFASTCGI_WEB_AOT_SMOKE_GATE=1.FastCgiRecordTest(binary fixtures),FastCgiTest(009-FastCGIWeb health + keep-alive multiplex + AOT,@group serve).php-src reference
sapi/fpm/fpm/fpm_main.c— FastCGI request loopmain/fastcgi.c—FCGI_KEEP_CONNCgiDriver,CgiAotDriver,Superglobals)Verification
Remaining on #173
FASTCGI_SMOKE_GATECI wiring (CI: FASTCGI_SMOKE_GATE opt-in in ci-local after #173 lands #1899)Part of #173