Merge pull request #55241 from nextcloud/fix-request-protocol-empty-on-occ

This commit is contained in:
Thomas Citharel 2025-09-22 10:33:38 +02:00 committed by GitHub
commit ded505a440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -676,7 +676,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
* @return string HTTP protocol. HTTP/2, HTTP/1.1 or HTTP/1.0.
*/
public function getHttpProtocol(): string {
$claimedProtocol = $this->server['SERVER_PROTOCOL'];
$claimedProtocol = $this->server['SERVER_PROTOCOL'] ?? '';
if (\is_string($claimedProtocol)) {
$claimedProtocol = strtoupper($claimedProtocol);