Skip to content

Web: HTTPS, REQUEST_SCHEME, SERVER_PORT in $_SERVER (#235)#264

Merged
PurHur merged 1 commit into
masterfrom
feat/web-server-https-scheme-port
May 19, 2026
Merged

Web: HTTPS, REQUEST_SCHEME, SERVER_PORT in $_SERVER (#235)#264
PurHur merged 1 commit into
masterfrom
feat/web-server-https-scheme-port

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 19, 2026

Summary

  • Populate $_SERVER['REQUEST_SCHEME'], HTTPS, SERVER_PORT, and SERVER_NAME from Host / X-Forwarded-Proto in VM (Superglobals::populateServer) and AOT (superglobals_refresh.c).
  • Denylist runtime $_SERVER keys in SuperglobalInit::compileTimeReadString so AOT binaries read refreshed values instead of compile-time defaults.

Closes #235.

Test plan

  • SuperglobalsUrlSchemeTest (VM)
  • web_server_https.phpt via RealWorldTest
  • RuntimeSuperglobalRefreshTest::testHttpsSchemeFromCgiEnvironment (AOT)
  • Docker (php-compiler:22.04-dev, tar copy): targeted PHPUnit above
./script/docker-ci-local.sh --filter SuperglobalsUrlSchemeTest

Made with Cursor

Populate scheme and port from Host / X-Forwarded-Proto in VM and AOT
refresh; avoid baking runtime $_SERVER keys at AOT compile time.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 37f5363 into master May 19, 2026
1 check was pending
@PurHur PurHur deleted the feat/web-server-https-scheme-port branch May 19, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web: HTTPS, HTTP_HOST, and SERVER_PORT in $_SERVER for absolute URLs

1 participant