#487: Fix cacert access from IE
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 25 Oct 2006 19:35:50 +0000 (19:35 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 25 Oct 2006 19:35:50 +0000 (19:35 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1025 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/platal.php

index 35514b8..7d72369 100644 (file)
@@ -39,7 +39,7 @@ class PlatalModule extends PLModule
     {
         return array(
             'index'       => $this->make_hook('index',     AUTH_PUBLIC),
-            'cacert.pem'  => $this->make_hook('cacert',    AUTH_PUBLIC),
+           'cacert.pem'  => $this->make_hook('cacert',    AUTH_PUBLIC),
             'changelog'   => $this->make_hook('changelog', AUTH_PUBLIC),
 
             // Preferences thingies
@@ -71,14 +71,13 @@ class PlatalModule extends PLModule
 
     function handler_cacert(&$page)
     {
-        if (preg_match('/MSIE/i', $_SERVER['HTTP_USER_AGENT']))
-        {
-            $data = file_get_contents('/etc/ssl/xorgCA/cacert.der');
-        } else {
-            $data = file_get_contents('/etc/ssl/xorgCA/cacert.pem');
-        }
-        header('Content-Type: application/x-x509-ca-cert');
-        header('Content-Length: '.strlen($data));
+        $data = file_get_contents("/etc/ssl/xorgCA/cacert.pem","r");
+        header("Pragma:");
+       header("Set-Cookie:");
+       header("Cache-Control:");
+       header("Expires:");
+       header("Content-Type: application/x-x509-ca-cert");
+        header("Content-Length: ".strlen($data));
         echo $data;
         exit;
     }