mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
move header printing to displayhandler, and print header according to response method
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7531 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c20bc9fef2
commit
aa8fb9df1d
5 changed files with 45 additions and 50 deletions
|
|
@ -9,16 +9,4 @@ class JSONDisplayHandler {
|
|||
$json = preg_replace("(\r\n|\n)",'\n',json_encode2($variables));
|
||||
return $json;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief print a HTTP HEADER for JSON, which is encoded in UTF-8
|
||||
**/
|
||||
function printHeader() {
|
||||
header("Content-Type: text/html; charset=UTF-8");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
|
||||
header("Cache-Control: no-store, no-cache, must-revalidate");
|
||||
header("Cache-Control: post-check=0, pre-check=0", false);
|
||||
header("Pragma: no-cache");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue