commit 8c5d7e58d9d58703ac254df90a8b35fe6ec44061
parent 905e512bea43e055d8ee806851f3e3a28bc59f74
Author: markseu <mark2011@mayberg.se>
Date: Sat, 14 Apr 2018 00:49:01 +0200
Updated core, send data response
Diffstat:
1 file changed, 11 insertions(+), 0 deletions(-)
diff --git a/system/plugins/core.php b/system/plugins/core.php
@@ -262,6 +262,17 @@ class YellowCore
}
return $statusCode;
}
+
+ // Send data response
+ function sendData($statusCode, $rawData, $fileName, $cacheable)
+ {
+ @header($this->toolbox->getHttpStatusFormatted($statusCode));
+ if(!$cacheable) @header("Cache-Control: no-cache, must-revalidate");
+ @header("Content-Type: ".$this->toolbox->getMimeContentType($fileName));
+ @header("Last-Modified: ".$this->toolbox->getHttpDateFormatted(time()));
+ echo $rawData;
+ return $statusCode;
+ }
// Send status response
function sendStatus($statusCode, $location = "")