Fix cacert download with IE
authorweb <web@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 25 Oct 2006 19:26:52 +0000 (19:26 +0000)
committerweb <web@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 25 Oct 2006 19:26:52 +0000 (19:26 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.11@1024 839d8a87-29fc-0310-9880-83ba4fa771e5

modules/platal.php

index a25e405..683e7a4 100644 (file)
@@ -40,7 +40,7 @@ class PlatalModule extends PLModule
         return array(
             'login.php'   => $this->make_hook('index',     AUTH_PUBLIC),
             '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
@@ -74,14 +74,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;
     }