[Pkg-mozext-commits] [requestpolicy] 27/50: [tst][ref] favicon: create favicon.ico.php

David Prévot taffit at moszumanska.debian.org
Mon Jun 27 12:50:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository requestpolicy.

commit c6fe335327fa765c4b833a60181abfc5541053f2
Author: Martin Kimmerle <dev at 256k.de>
Date:   Sun Jun 12 11:15:49 2016 +0200

    [tst][ref] favicon: create favicon.ico.php
---
 tests/content/.htaccess       |  5 ++---
 tests/content/favicon.ico.php | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/tests/content/.htaccess b/tests/content/.htaccess
old mode 100644
new mode 100755
index 07b29dc..1936ffd
--- a/tests/content/.htaccess
+++ b/tests/content/.htaccess
@@ -1,3 +1,2 @@
-<IfModule mod_alias.c>
-Redirect 301 /favicon.ico http://www.otherdomain.test/subdirectory/flag-gray.png
-</IfModule>
+RewriteEngine on
+RewriteRule "^favicon\.ico$" "/favicon.ico.php" [PT]
diff --git a/tests/content/favicon.ico.php b/tests/content/favicon.ico.php
new file mode 100644
index 0000000..e62b696
--- /dev/null
+++ b/tests/content/favicon.ico.php
@@ -0,0 +1,19 @@
+<?php
+
+$type = 'direct';
+
+switch ($type) {
+  case '404':
+    header('HTTP/1.0 404 Not Found');
+    exit;
+
+  case 'redirect':
+    header('Location: http://www.otherdomain.test/subdirectory/flag-gray.png');
+    exit;
+
+  case 'direct':
+  default:
+    header('Content-Type: image/png');
+    readfile('subdirectory/flag-gray.png');
+    exit;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list