feat(fastcgi): populate SERVER_ADDR by default - #7912
Merged
Conversation
Populate the SERVER_ADDR FastCGI environment variable using the local socket address of the incoming connection from the request context. This improves out-of-the-box compatibility for PHP applications that rely on $_SERVER['SERVER_ADDR'] (such as legacy frameworks and custom telemetry packages) when migrating from Nginx or Apache. Co-developed-by: Gemini AI <renich+gemini@woralelandia.com> Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
steadytao
requested changes
Jul 30, 2026
steadytao
left a comment
Member
There was a problem hiding this comment.
Please also cover IPv4, IPv6, missing local-address context, Unix-domain addresses and an explicitly configured SERVER_ADDR override.
Member
|
Ah, quick note is we require an AI assistance disclosure as well. |
Contributor
Author
Hi Zen (@steadytao), AI assistance was already disclosed in commit 445b281: Co-developed-by: Gemini AI renich+gemini@woralelandia.com For full clarity, the specific model used during pair programming is Gemini 3.6 Flash with effort set to High. |
Validate that SERVER_ADDR is only populated when the local address parses as a valid IP address, preventing Unix socket paths from being assigned if SplitHostPort fails. Add test cases covering IPv4, IPv6, missing context, Unix sockets, and explicit overrides. Co-developed-by: Gemini AI <renich+gemini@woralelandia.com> Signed-off-by: Rénich Bon Ćirić <renich@woralelandia.com>
steadytao
approved these changes
Aug 10, 2026
steadytao
left a comment
Member
There was a problem hiding this comment.
Apologies for the delay. LGTM.
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.
Populate the SERVER_ADDR FastCGI environment variable using the local socket address of the incoming connection from the request context. Only sets SERVER_ADDR when local address resolves to a valid IP address.
Fixes #7891