Skip to content
Permalink
Browse files

Add second parameter to most header(...) calls

  • Loading branch information...
Fauxil Fox
Fauxil Fox committed Jun 11, 2018
1 parent 18980db commit e0151038830a0145a983133878b4e0a90625e6f2
@@ -15,7 +15,7 @@
if ($_SESSION["user"]->isArtist()) {
$artist = $_SESSION["user"]->getArtistPage();
HTTPCode::set(302);
header("Location: ".ROOTDIR."Artist/".$artist->getUrl());
header("Location: ".ROOTDIR."Artist/".$artist->getUrl(), true);
die("Redirecting...");
} else {
HTTPCode::set(400);
@@ -17,7 +17,7 @@
if ($_SESSION["user"]->isArtist()) {
$artist = $_SESSION["user"]->getArtistPage();
HTTPCode::set(302);
header("Location: ".ROOTDIR."Artist/".$artist->getUrl());
header("Location: ".ROOTDIR."Artist/".$artist->getUrl(), true);
die("Redirecting...");
} else {
HTTPCode::set(400);
@@ -1,6 +1,6 @@
<?php
header("Location: ../Unimplemented");
header($_SERVER["SERVER_PROTOCOL"]." 302 Temporary Redirect");
header("Location: ../Unimplemented", true);
header($_SERVER["SERVER_PROTOCOL"]." 302 Temporary Redirect", true);
die("Redirecting...");
@@ -1,4 +1,4 @@
<?php
header("Location: https://www.youtube.com/channel/UCI8shN2z06O5cBJIfR2DIaA/live");
header("Location: https://www.youtube.com/channel/UCI8shN2z06O5cBJIfR2DIaA/live", true);
?>
Redirecting...
@@ -1,6 +1,6 @@
<?php
header("Content-Type: text/css; charset=UTF-8");
header("Cache-Control: max-age=259200"); // 3 days
header("Content-Type: text/css; charset=UTF-8", true);
header("Cache-Control: max-age=259200", true); // 3 days

define("ROOTDIR", "../");
define("REAL_ROOTDIR", "../");
@@ -1,6 +1,6 @@
<?php
header("Content-Type: text/css; charset=UTF-8");
header("Cache-Control: max-age=86400");
header("Content-Type: text/css; charset=UTF-8", true);
header("Cache-Control: max-age=86400", true);
?>
html, html {
font-family: "Roboto", "Helvetica", "Arial", sans-serif;

Some generated files are not rendered by default. Learn more.

@@ -1,5 +1,5 @@
<?php
header("Content-Type: application/javascript; charset=UTF-8");
header("Content-Type: application/javascript; charset=UTF-8", true);
?>
function rgb2hex(rgb) {
var rgb = rgb.match(/(\d+)/g);
@@ -1,5 +1,5 @@
<?php
header("Content-Type: application/javascript; charset=UTF-8");
header("Content-Type: application/javascript; charset=UTF-8", true);

define("ROOTDIR", "../../");
define("REAL_ROOTDIR", "../../");
@@ -1,5 +1,5 @@
<?php
header("Content-Type: application/javascript; charset=UTF-8");
header("Content-Type: application/javascript; charset=UTF-8", true);

define("ROOTDIR", "../../");
define("REAL_ROOTDIR", "../../");
@@ -1,5 +1,5 @@
<?php
header("Content-Type: application/javascript; charset=UTF-8");
header("Content-Type: application/javascript; charset=UTF-8", true);

define("ROOTDIR", "../../");
define("REAL_ROOTDIR", "../../");
@@ -1,6 +1,6 @@
<?php
header("Content-Type: application/javascript; charset=UTF-8");
header("Cache-Control: max-age=86400");
header("Content-Type: application/javascript; charset=UTF-8", true);
header("Cache-Control: max-age=86400", true);
?>
window.markdownCurrentlyParsing = {};

@@ -1,5 +1,5 @@
<?php
header("Content-Type: application/javascript; charset=UTF-8");
header("Content-Type: application/javascript; charset=UTF-8", true);

define("ROOTDIR", "../../");
define("REAL_ROOTDIR", "../../");
@@ -1,5 +1,5 @@
<?php
header("Content-Type: application/javascript; charset=UTF-8");
header("Content-Type: application/javascript; charset=UTF-8", true);
?>
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
Object.defineProperty(Array.prototype, 'includes', {
@@ -1,5 +1,5 @@
<?php
header("Content-Type: application/javascript; charset=UTF-8");
header("Content-Type: application/javascript; charset=UTF-8", true);
?>
function totp(K,t) {
function sha1(C){
@@ -83,7 +83,7 @@
$minifiedCss = (new Minifier())->run($output);
$minifiedCss = trim(<<<PHP_HEADER_FOR_MINIFIED_CSS
<?php header("Content-Type: text/css; charset=UTF-8");header("Cache-Control: max-age=86400");?>
<?php header("Content-Type: text/css; charset=UTF-8", true);header("Cache-Control: max-age=86400", true);?>
PHP_HEADER_FOR_MINIFIED_CSS
).$minifiedCss;
@@ -52,6 +52,6 @@ public static function set(int $code) : void {
if (php_sapi_name() == "cli") {
return;
}
header($_SERVER["SERVER_PROTOCOL"]." ".$code." ".self::CODE_MAP[$code]);
header($_SERVER["SERVER_PROTOCOL"]." ".$code." ".self::CODE_MAP[$code], true);
}
}

0 comments on commit e015103

Please sign in to comment.
You can’t perform that action at this time.