summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamienmckenna2016-11-14 14:33:26 -0500
committerMathieu Lutfy2016-11-14 14:33:26 -0500
commitf98cbf4f9ddaa29bb3ab2f9b6af1193623f76ed9 (patch)
tree1f3c08eb333a0d4f075f63b6e77e9d3061a2ab16
parentf92721a1b969b13c70d61039806c5a54380f9de2 (diff)
Issue #1398578 by mow, DamienMcKenna, jamix, Philip_Clarke, bendev: Apache has problem with urlencoded query strings in cached file namesHEAD7.x-1.27.x-1.x
-rw-r--r--boost.module8
1 files changed, 8 insertions, 0 deletions
diff --git a/boost.module b/boost.module
index a0438f2..604665c 100644
--- a/boost.module
+++ b/boost.module
@@ -339,6 +339,14 @@ function boost_exit($destination = NULL) {
// Attach extension to filename.
$_boost['filename'] .= '.' . $_boost['matched_header_info']['extension'];
// Write to file.
+ $_boost['filename'] = str_ireplace('%2F', '/', $_boost['filename']);
+
+ // If the filename includes URL encoded characters create an extra copy of
+ // the file with the characters decoded.
+ if (rawurldecode($_boost['filename']) != $_boost['filename']) {
+ boost_write_file(rawurldecode($_boost['filename']), $data);
+ }
+
boost_write_file($_boost['filename'], $data);
// Gzip support.