HTTP/1.1 by default

This commit is contained in:
Giuseppe Criscione 2024-11-01 19:21:41 +01:00
parent 5fd1bde7bf
commit 8f399efaf5
3 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ class Header
*/
public static function status(ResponseStatus $responseStatus, bool $send = true, bool $exit = false)
{
$protocol = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0';
$protocol = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1';
$responseStatus = implode(' ', [$protocol, $responseStatus->value]);
if (!$send) {
return $responseStatus;

View File

@ -1,4 +1,4 @@
<?php header(($_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0') . ' 500 Internal Server Error'); ?>
<?php header(($_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1') . ' 500 Internal Server Error'); ?>
<?php include __DIR__ . '/partials/header.php' ?>
<h2>The site is currently offline<br>due to technical problems</h2>
<p>If you are the maintainer of this site, please run <code>composer install</code>. Composer autoloader was not found.</p>

View File

@ -1,4 +1,4 @@
<?php header(($_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0') . ' 500 Internal Server Error'); ?>
<?php header(($_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1') . ' 500 Internal Server Error'); ?>
<?php include __DIR__ . '/partials/header.php' ?>
<h2>The site is currently offline<br>due to technical problems</h2>
<p>If you are the maintainer of this site, please switch to a PHP version supported by the installed release of Formwork.</p>