From 6ca4e168a0d84987270e42485a8edbf4293a977d Mon Sep 17 00:00:00 2001 From: web Date: Wed, 25 Oct 2006 19:26:52 +0000 Subject: [PATCH] Fix cacert download with IE git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.11@1024 839d8a87-29fc-0310-9880-83ba4fa771e5 --- modules/platal.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/modules/platal.php b/modules/platal.php index a25e405..683e7a4 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -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; } -- 2.1.4