SylvainTI / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

maxAge is not set to 365 days when query-string ends with number #319

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify commit/version: trunk

What steps will reproduce the problem?
1. append a number to the query string. The config.php says: " * Note: Despite 
this setting, if you include a number at the end of the
 * querystring, maxAge will be set to one year. E.g. /min/f=hello.css&123456"

Expected output:
maxAge to be one year.

Actual output:
maxAge was not changed.

Reason:
regex wrong.

FIX:

This is the culprit:
index.php
if (preg_match('/&\\d/', $_SERVER['QUERY_STRING']) || isset($_GET['v'])) 

my suggested fix:
if (preg_match('/\\d$/', $_SERVER['QUERY_STRING']) || isset($_GET['v'])) {

Original issue reported on code.google.com by leo.saue...@gmail.com on 22 Jul 2014 at 10:30

GoogleCodeExporter commented 9 years ago
This must be a problem in your environment. Please post to the Google group.

Original comment by mrclay....@gmail.com on 22 Jul 2014 at 4:27