=== modified file 'sites/all/modules/contrib/memcache/memcache_admin/memcache_admin.module'
--- sites/all/modules/contrib/memcache/memcache_admin/memcache_admin.module 2010-10-11 23:36:43 +0000
+++ sites/all/modules/contrib/memcache/memcache_admin/memcache_admin.module 2010-10-14 01:40:08 +0000
@@ -231,10 +231,15 @@
global $_memcache_statistics;
// Try not to break non-HTML pages.
- if (function_exists('drupal_get_headers')) {
- $headers = drupal_get_headers();
- if(strstr($headers, 'xml') || strstr($headers, 'javascript') || strstr($headers, 'plain')) {
- return;
+ if (function_exists('drupal_get_http_header')) {
+ $header = drupal_get_http_header('content-type');
+ if ($header) {
+ $formats = array('xml', 'javascript', 'json', 'plain', 'image', 'application', 'csv', 'x-comma-separated-values');
+ foreach ($formats as $format) {
+ if (strstr($header, $format)) {
+ return;
+ }
+ }
}
}
Comments
Comment #1
jeremy commentedHow did you run into this issue, chx? I was using the memcache_admin module today on a 7.x website and didn't run into any problems... Can you provide more detail, explain how to duplicate so we can understand why this is a critical bug?
Comment #2
jeremy commentedOkay, I get it... Tested, confirmed to not cause any regressions.
Thanks, patch committed:
http://drupal.org/cvs?commit=435916
Comment #3
chx commentedJust for credit: i stole this from devel.