diff options
| author | 2013-12-26 20:11:18 +0100 | |
|---|---|---|
| committer | 2013-12-26 20:11:18 +0100 | |
| commit | 2c57e7254d613683ec20076d37b33ea2a7dd2d83 (patch) | |
| tree | cadc4bec72850eb64b9e10ca2c477b143fbbbcc3 | |
| parent | 574d37bddc4e00ddbc6af57c28838e1dea6a730b (diff) | |
Favicons : test pour améliorer le cache HTTP
Test d'utilisation de PATH_INFO plutôt que QUERY_STRING pour améliorer
la mise en cache.
À tester sur différents serveurs
| -rw-r--r-- | app/Models/Feed.php | 2 | ||||
| -rw-r--r-- | p/f.php | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index f9a586122..4f90b9872 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -116,7 +116,7 @@ class FreshRSS_Feed extends Minz_Model { @unlink($path . '.txt'); } public function favicon () { - return Minz_Url::display ('/f.php?' . $this->hash()); + return Minz_Url::display ('/f.php/' . $this->hash()); } public function _id ($value) { @@ -36,7 +36,14 @@ function download_favicon ($website, $dest) { return true; } -$id = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '0'; +if (isset($_SERVER['PATH_INFO'])) { + $id = substr($_SERVER['PATH_INFO'], 1); +} elseif (isset($_SERVER['QUERY_STRING'])) { + $id = $_SERVER['QUERY_STRING']; +} else { + $id = '0'; +} + if (!ctype_xdigit($id)) { $id = '0'; } |
