Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b87b729
)
MDL-40889 prevent 304 when minimising JS
author
Petr Škoda
<commits@skodak.org>
Fri, 26 Jul 2013 14:44:12 +0000
(16:44 +0200)
committer
Petr Škoda
<commits@skodak.org>
Fri, 2 Aug 2013 14:31:30 +0000
(16:31 +0200)
lib/jslib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/jslib.php
b/lib/jslib.php
index
cef5c98
..
3139e6b
100644
(file)
--- a/
lib/jslib.php
+++ b/
lib/jslib.php
@@
-107,6
+107,11
@@
function js_minify($files) {
return '';
}
return '';
}
+ // We do not really want any 304 here!
+ // There does not seem to be any better way to prevent them here.
+ unset($_SERVER['HTTP_IF_NONE_MATCH']);
+ unset($_SERVER['HTTP_IF_MODIFIED_SINCE']);
+
if (0 === stripos(PHP_OS, 'win')) {
Minify::setDocRoot(); // IIS may need help
}
if (0 === stripos(PHP_OS, 'win')) {
Minify::setDocRoot(); // IIS may need help
}
@@
-130,7
+135,7
@@
function js_minify($files) {
$error = 'unknown';
try {
$result = Minify::serve('Files', $options);
$error = 'unknown';
try {
$result = Minify::serve('Files', $options);
- if ($result['success']) {
+ if ($result['success']
and $result['statusCode'] == 200
) {
return $result['content'];
}
} catch (Exception $e) {
return $result['content'];
}
} catch (Exception $e) {