} else {
$this->redirect($route, $code);
}
}
/**
* Set response header.
*
* @param ResponseInterface|null $response
* @return void
*/
public function header(ResponseInterface $response = null): void
{
if (null === $response) {
/** @var PageInterface $page */
$page = $this['page'];
$response = new Response($page->httpResponseCode(), $page->httpHeaders(), '');
}
header("HTTP/{$response->getProtocolVersion()} {$response->getStatusCode()} {$response->getReasonPhrase()}");
foreach ($response->getHeaders() as $key => $values) {
// Skip internal Grav headers.
if (strpos($key, 'Grav-Internal-') === 0) {
continue;
}
foreach ($values as $i => $value) {
header($key . ': ' . $value, $i === 0);
}
}
}
/**
* Set the system locale based on the language and configuration
*
* @return void
*/
public function setLocale(): void
{
// Initialize Locale if set and configured.
if ($this['language']->enabled() && $this['config']->get('system.languages.override_locale')) {
"Cannot modify header information - headers already sent by (output started at /srv/disk8/2197592/www/quoipro.com/system/src/Grav/Common/Grav.php:203)"
} else {
$this->redirect($route, $code);
}
}
/**
* Set response header.
*
* @param ResponseInterface|null $response
* @return void
*/
public function header(ResponseInterface $response = null): void
{
if (null === $response) {
/** @var PageInterface $page */
$page = $this['page'];
$response = new Response($page->httpResponseCode(), $page->httpHeaders(), '');
}
header("HTTP/{$response->getProtocolVersion()} {$response->getStatusCode()} {$response->getReasonPhrase()}");
foreach ($response->getHeaders() as $key => $values) {
// Skip internal Grav headers.
if (strpos($key, 'Grav-Internal-') === 0) {
continue;
}
foreach ($values as $i => $value) {
header($key . ': ' . $value, $i === 0);
}
}
}
/**
* Set the system locale based on the language and configuration
*
* @return void
*/
public function setLocale(): void
{
// Initialize Locale if set and configured.
if ($this['language']->enabled() && $this['config']->get('system.languages.override_locale')) {
"HTTP/1.1 200 OK"
// Prevent caching if session messages were displayed in the page.
$noCache = $messages->isCleared();
if ($noCache) {
$response = $response->withHeader('Cache-Control', 'no-store, max-age=0');
}
// Handle ETag and If-None-Match headers.
if ($response->getHeaderLine('ETag') === '1') {
$etag = md5($body);
$response = $response->withHeader('ETag', '"' . $etag . '"');
$search = trim($this['request']->getHeaderLine('If-None-Match'), '"');
if ($noCache === false && $search === $etag) {
$response = $response->withStatus(304);
$body = '';
}
}
// Echo page content.
$this->header($response);
echo $body;
$this['debugger']->render();
// Response object can turn off all shutdown processing. This can be used for example to speed up AJAX responses.
// Note that using this feature will also turn off response compression.
if ($response->getHeaderLine('Grav-Internal-SkipShutdown') !== '1') {
register_shutdown_function([$this, 'shutdown']);
}
}
/**
* Clean any output buffers. Useful when exiting from the application.
*
* Please use $grav->close() and $grav->redirect() instead of calling this one!
*
* @return void
*/
public function cleanOutputBuffers(): void
{
Grav\Framework\Psr7\Response {#87}
// Register the auto-loader.
$loader = require $autoload;
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
// Set internal encoding.
@ini_set('default_charset', 'UTF-8');
mb_internal_encoding('UTF-8');
use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
// Get the Grav instance
$grav = Grav::instance(array('loader' => $loader));
// Process the page
try {
$grav->process();
} catch (\Error|\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
}
| Key | Value |
| user | Grav\Common\User\User {#245} |
| redirect_after_login | "/"
|
| Key | Value |
| DOCUMENT_ROOT | "/home/www/quoipro.com"
|
| SCRIPT_FILENAME | "/home/www/quoipro.com/index.php"
|
| HTTP_HOST | "www.quoipro.com"
|
| PHP_FCGI_MAX_REQUESTS | "200"
|
| PATH | "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| PHP_FCGI_CHILDREN | "0"
|
| PWD | "/srv/disk8/2197592/www/quoipro.com"
|
| CONTENT_LENGTH | "0"
|
| SCRIPT_NAME | "/index.php"
|
| REQUEST_URI | "/"
|
| QUERY_STRING | "" |
| REQUEST_METHOD | "GET"
|
| SERVER_PROTOCOL | "HTTP/1.1"
|
| GATEWAY_INTERFACE | "CGI/1.1"
|
| REMOTE_PORT | "45890"
|
| SERVER_ADMIN | "[no address given]"
|
| CONTEXT_DOCUMENT_ROOT | "/home/domains/www.quoipro.com"
|
| CONTEXT_PREFIX | "" |
| REQUEST_SCHEME | "http"
|
| REMOTE_ADDR | "18.97.14.85"
|
| SERVER_PORT | "80"
|
| SERVER_ADDR | "185.176.40.75"
|
| SERVER_NAME | "www.quoipro.com"
|
| SERVER_SOFTWARE | "Apache"
|
| SERVER_SIGNATURE | "" |
| HTTP_CONNECTION | "close"
|
| HTTP_ACCEPT_ENCODING | "zstd, br, gzip"
|
| HTTP_ACCEPT_LANGUAGE | "en-US,en;q=0.5"
|
| HTTP_ACCEPT | "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
| HTTP_USER_AGENT | "CCBot/2.0 (https://commoncrawl.org/faq/)"
|
| SCRIPT_URI | "http://www.quoipro.com/"
|
| SCRIPT_URL | "/"
|
| env_vhost | "quoipro.com"
|
| UNIQUE_ID | "ai0p4mcvSmqWIAIbOSvq0QAAAU8"
|
| FCGI_ROLE | "RESPONDER"
|
| PHP_SELF | "/index.php"
|
| REQUEST_TIME_FLOAT | 1781344738.4682
|
| REQUEST_TIME | 1781344738
|
| argv | [] |
| argc | 0
|
| Key | Value |
| DOCUMENT_ROOT | "/home/www/quoipro.com"
|
| SCRIPT_FILENAME | "/home/www/quoipro.com/index.php"
|
| HTTP_HOST | "www.quoipro.com"
|
| PHP_FCGI_MAX_REQUESTS | "200"
|
| PATH | "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
| PHP_FCGI_CHILDREN | "0"
|
| PWD | "/srv/disk8/2197592/www/quoipro.com"
|
| CONTENT_LENGTH | "0"
|
| SCRIPT_NAME | "/index.php"
|
| REQUEST_URI | "/"
|
| QUERY_STRING | "" |
| REQUEST_METHOD | "GET"
|
| SERVER_PROTOCOL | "HTTP/1.1"
|
| GATEWAY_INTERFACE | "CGI/1.1"
|
| REMOTE_PORT | "45890"
|
| SERVER_ADMIN | "[no address given]"
|
| CONTEXT_DOCUMENT_ROOT | "/home/domains/www.quoipro.com"
|
| CONTEXT_PREFIX | "" |
| REQUEST_SCHEME | "http"
|
| REMOTE_ADDR | "18.97.14.85"
|
| SERVER_PORT | "80"
|
| SERVER_ADDR | "185.176.40.75"
|
| SERVER_NAME | "www.quoipro.com"
|
| SERVER_SOFTWARE | "Apache"
|
| SERVER_SIGNATURE | "" |
| HTTP_CONNECTION | "close"
|
| HTTP_ACCEPT_ENCODING | "zstd, br, gzip"
|
| HTTP_ACCEPT_LANGUAGE | "en-US,en;q=0.5"
|
| HTTP_ACCEPT | "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
|
| HTTP_USER_AGENT | "CCBot/2.0 (https://commoncrawl.org/faq/)"
|
| SCRIPT_URI | "http://www.quoipro.com/"
|
| SCRIPT_URL | "/"
|
| env_vhost | "quoipro.com"
|
| UNIQUE_ID | "ai0p4mcvSmqWIAIbOSvq0QAAAU8"
|
| FCGI_ROLE | "RESPONDER"
|