aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-26 20:11:18 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-12-26 20:11:18 +0100
commit2c57e7254d613683ec20076d37b33ea2a7dd2d83 (patch)
treecadc4bec72850eb64b9e10ca2c477b143fbbbcc3 /p
parent574d37bddc4e00ddbc6af57c28838e1dea6a730b (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
Diffstat (limited to 'p')
-rw-r--r--p/f.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/p/f.php b/p/f.php
index 872b8cc2c..660128a59 100644
--- a/p/f.php
+++ b/p/f.php
@@ -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';
}