Skip to content

Conversation

@alexandre-daubois
Copy link
Member

No description provided.

@AlliBalliBaba
Copy link
Contributor

Wouldn't it make sense to do this in cgi.go when registering the $_SERVER array? Unless I'm missing something.

frankenphp/cgi.go

Lines 77 to 93 in abfd893

if request.TLS == nil {
rs = "http"
https = ""
sslProtocol = ""
} else {
rs = "https"
https = "on"
// and pass the protocol details in a manner compatible with apache's mod_ssl
// (which is why these have an SSL_ prefix and not TLS_).
if v, ok := tlsProtocolStrings[request.TLS.Version]; ok {
sslProtocol = v
} else {
sslProtocol = ""
}
}

@alexandre-daubois
Copy link
Member Author

Definitely! Also it would avoid duplication. I'll update accordingly, thanks!

@alexandre-daubois
Copy link
Member Author

PR updated, the diff is drastically simplified

@dunglas dunglas merged commit d2a1b61 into php:main Jun 27, 2025
43 checks passed
@dunglas
Copy link
Member

dunglas commented Jun 27, 2025

Thanks!

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.

3 participants