aboutsummaryrefslogtreecommitdiff
path: root/pmwiki.php
diff options
context:
space:
mode:
authorpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2023-02-11 05:23:16 +0000
committerpetko <petko@524c5546-5005-0410-9a3e-e25e191bd360>2023-02-11 05:23:16 +0000
commit295dce20f91eb4e222ba4f74767bd487c7d2870b (patch)
treedad8d0cb59c48947b9ad63f98c04e6d77bae6ec1 /pmwiki.php
parent9b39b0e19d37fe05bb64f8c609bccfc796aff082 (diff)
downloadpmwiki.svn-295dce20f91eb4e222ba4f74767bd487c7d2870b.tar.bz2
pm_servefile() add argument $cachecontrol.
git-svn-id: svn://pmwiki.org/pmwiki/trunk@4364 524c5546-5005-0410-9a3e-e25e191bd360
Diffstat (limited to 'pmwiki.php')
-rw-r--r--pmwiki.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/pmwiki.php b/pmwiki.php
index 6d8249bb..55dcf551 100644
--- a/pmwiki.php
+++ b/pmwiki.php
@@ -381,7 +381,7 @@ SDVA($ServeFileExts, array(
'README' => 'text/plain', 'txt' => 'text/plain',
'css' => 'text/css', 'js' => 'application/javascript',
));
-function pm_servefile($basedir, $path) {
+function pm_servefile($basedir, $path, $cachecontrol='no-cache') {
global $ServeFileExts;
header("X-Sent-Via: pm_servefile");
$ext = preg_replace('!^.*[./]!', '', $path);
@@ -395,7 +395,7 @@ function pm_servefile($basedir, $path) {
die('File not found');
}
- header('Cache-Control: private');
+ header("Cache-Control: $cachecontrol");
header('Expires: ');
$filelastmod = gmdate('D, d M Y H:i:s \G\M\T', filemtime($filepath));
if (@$_SERVER['HTTP_IF_MODIFIED_SINCE'] == $filelastmod)