Added more properties to Request object

pull/11/head
Mike Cao 14 years ago
parent 8e4b75f5e6
commit b085ecd888

@ -437,7 +437,7 @@ class Flight {
}
// Disable caching for AJAX requests
if (self::request()->isAjax) {
if (self::request()->ajax) {
self::response()->cache(false);
}

@ -20,8 +20,13 @@ class Request {
'base' => str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])),
'method' => $_SERVER['REQUEST_METHOD'],
'referrer' => $_SERVER['HTTP_REFERER'],
'ipAddress' => $_SERVER['REMOTE_ADDR'],
'isAjax' => ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'),
'ip' => $_SERVER['REMOTE_ADDR'],
'ajax' => ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'),
'scheme' => $_SERVER['SERVER_PROTOCOL'],
'user_agent' => $_SERVER['HTTP_USER_AGENT'],
'body' => file_get_contents('php://input'),
'type' => $_SERVER['CONTENT_TYPE'],
'length' => $_SERVER['CONTENT_LENGTH'],
'query' => array(),
'data' => $_POST,
'cookies' => $_COOKIE,

Loading…
Cancel
Save