Autoptimize - Version 1.6.2

Version Description

  • Yet another emergency bugfix I'm afraid: apache_request_headers (again in config/delayed.php) is only available on ... Apache (duh), breaking non-Apache systems such as ngnix, Lighttpd and MS IIS badly. Reported by multiple users, thanks all!
Download this release

Release Info

Developer futtta
Plugin Icon 128x128 Autoptimize
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

Files changed (4) hide show
  1. autoptimize.php +1 -1
  2. config/default.php +2 -3
  3. config/delayed.php +2 -3
  4. readme.txt +4 -1
autoptimize.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Autoptimize
4
  Plugin URI: http://blog.futtta.be/category/autoptimize/
5
  Description: Optimizes your website, concatenating the CSS and JavaScript code, and compressing it.
6
- Version: 1.6.1
7
  Author: Frank Goossens (futtta)
8
  Author URI: http://blog.futtta.be/
9
  Released under the GNU General Public License (GPL)
3
  Plugin Name: Autoptimize
4
  Plugin URI: http://blog.futtta.be/category/autoptimize/
5
  Description: Optimizes your website, concatenating the CSS and JavaScript code, and compressing it.
6
+ Version: 1.6.2
7
  Author: Frank Goossens (futtta)
8
  Author URI: http://blog.futtta.be/
9
  Released under the GNU General Public License (GPL)
config/default.php CHANGED
@@ -37,9 +37,8 @@ $contents = file_get_contents(__FILE__.'.'.$encoding);
37
  $eTag=md5($contents);
38
  $modTime=filemtime(__FILE__.'.none');
39
 
40
- $headers = apache_request_headers();
41
- $eTagMatch = (isset($headers['If-None-Match']) && strpos($headers['If-None-Match'],$eTag));
42
- $modTimeMatch = (isset($headers['If-Modified-Since']) && strtotime($headers['If-Modified-Since']) === $modTime);
43
 
44
  if (($modTimeMatch)||($eTagMatch)) {
45
  header('HTTP/1.1 304 Not Modified');
37
  $eTag=md5($contents);
38
  $modTime=filemtime(__FILE__.'.none');
39
 
40
+ $eTagMatch = (isset($_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'],$eTag));
41
+ $modTimeMatch = (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) === $modTime);
 
42
 
43
  if (($modTimeMatch)||($eTagMatch)) {
44
  header('HTTP/1.1 304 Not Modified');
config/delayed.php CHANGED
@@ -47,9 +47,8 @@ if($encoding != 'none' && $iscompressed == false)
47
  $eTag=md5($contents);
48
  $modTime=filemtime(__FILE__.'.none');
49
 
50
- $headers = apache_request_headers();
51
- $eTagMatch = (isset($headers['If-None-Match']) && strpos($headers['If-None-Match'],$eTag));
52
- $modTimeMatch = (isset($headers['If-Modified-Since']) && strtotime($headers['If-Modified-Since']) === $modTime);
53
 
54
  if (($modTimeMatch)||($eTagMatch)) {
55
  header('HTTP/1.1 304 Not Modified');
47
  $eTag=md5($contents);
48
  $modTime=filemtime(__FILE__.'.none');
49
 
50
+ $eTagMatch = (isset($_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'],$eTag));
51
+ $modTimeMatch = (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) === $modTime);
 
52
 
53
  if (($modTimeMatch)||($eTagMatch)) {
54
  header('HTTP/1.1 304 Not Modified');
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: futtta, turl
3
  Tags: css, html, javascript, js, optimize, speed, cache, data-uri, aggregate, minimize, performance, pagespeed
4
  Requires at least: 2.7
5
  Tested up to: 3.5
6
- Stable tag: 1.6.1
7
 
8
  Autoptimize is a WordPress plugin that speeds up your website, and helps you save bandwidth.
9
 
@@ -32,6 +32,9 @@ You can report problems on the [wordpress.org support forum](http://wordpress.or
32
 
33
  == Changelog ==
34
 
 
 
 
35
  = 1.6.1 =
36
  * fixed stupid typo in config/delayed.php which broke things badly (april fools-wise); strpos instead of str_pos as reported by Takahiro.
37
 
3
  Tags: css, html, javascript, js, optimize, speed, cache, data-uri, aggregate, minimize, performance, pagespeed
4
  Requires at least: 2.7
5
  Tested up to: 3.5
6
+ Stable tag: 1.6.2
7
 
8
  Autoptimize is a WordPress plugin that speeds up your website, and helps you save bandwidth.
9
 
32
 
33
  == Changelog ==
34
 
35
+ = 1.6.2 =
36
+ * Yet another emergency bugfix I'm afraid: apache_request_headers (again in config/delayed.php) is only available on ... Apache (duh), breaking non-Apache systems such as ngnix, Lighttpd and MS IIS badly. Reported by multiple users, thanks all!
37
+
38
  = 1.6.1 =
39
  * fixed stupid typo in config/delayed.php which broke things badly (april fools-wise); strpos instead of str_pos as reported by Takahiro.
40