diff options
author | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2023-02-11 05:23:16 +0000 |
---|---|---|
committer | petko <petko@524c5546-5005-0410-9a3e-e25e191bd360> | 2023-02-11 05:23:16 +0000 |
commit | 295dce20f91eb4e222ba4f74767bd487c7d2870b (patch) | |
tree | dad8d0cb59c48947b9ad63f98c04e6d77bae6ec1 /pmwiki.php | |
parent | 9b39b0e19d37fe05bb64f8c609bccfc796aff082 (diff) | |
download | pmwiki.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.php | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |