diff options
| author | 2016-07-23 17:11:38 +0200 | |
|---|---|---|
| committer | 2016-07-23 17:11:38 +0200 | |
| commit | 3f705cf03ccd919e0930bc3e95b98daff9f0560a (patch) | |
| tree | e12c530198e3d5ee7032d5aaa381e7ecc8781cdf /p/api/greader.php | |
| parent | ca6ca218dca17c3806191f72fa2b3fe02acc1692 (diff) | |
| parent | 43f3be7098a908321c29a14a1fbe542389479155 (diff) | |
Merge branch 'dev'
Diffstat (limited to 'p/api/greader.php')
| -rw-r--r-- | p/api/greader.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/p/api/greader.php b/p/api/greader.php index b9942f0bc..894c2e960 100644 --- a/p/api/greader.php +++ b/p/api/greader.php @@ -23,7 +23,7 @@ Server-side API compatible with Google Reader API layer 2 require('../../constants.php'); require(LIB_PATH . '/lib_rss.php'); //Includes class autoloader -$ORIGINAL_INPUT = file_get_contents('php://input'); +$ORIGINAL_INPUT = file_get_contents('php://input', false, null, -1, 1048576); if (PHP_INT_SIZE < 8) { //32-bit function dec2hex($dec) { @@ -46,6 +46,8 @@ function headerVariable($headerName, $varName) { $upName = 'HTTP_' . strtoupper($headerName); if (isset($_SERVER[$upName])) { $header = $_SERVER[$upName]; + } elseif (isset($_SERVER['REDIRECT_' . $upName])) { + $header = $_SERVER['REDIRECT_' . $upName]; } elseif (function_exists('getallheaders')) { $ALL_HEADERS = getallheaders(); if (isset($ALL_HEADERS[$headerName])) { @@ -134,6 +136,7 @@ function checkCompatibility() { die('FAIL 64-bit or GMP extension!'); } if ((!array_key_exists('HTTP_AUTHORIZATION', $_SERVER)) && //Apache mod_rewrite trick should be fine + (!array_key_exists('REDIRECT_HTTP_AUTHORIZATION', $_SERVER)) && //Apache mod_rewrite with FCGI (empty($_SERVER['SERVER_SOFTWARE']) || (stripos($_SERVER['SERVER_SOFTWARE'], 'nginx') === false)) && //nginx should be fine (empty($_SERVER['SERVER_SOFTWARE']) || (stripos($_SERVER['SERVER_SOFTWARE'], 'lighttpd') === false)) && //lighttpd should be fine ((!function_exists('getallheaders')) || (stripos(php_sapi_name(), 'cgi') !== false))) { //Main problem is Apache/CGI mode @@ -361,6 +364,9 @@ function streamContents($path, $include_target, $start_time, $count, $order, $ex case 'user/-/state/com.google/read': $state = FreshRSS_Entry::STATE_NOT_READ; break; + case 'user/-/state/com.google/unread': + $state = FreshRSS_Entry::STATE_READ; + break; default: $state = FreshRSS_Entry::STATE_ALL; break; |
