some my fixes

 function blocks404_preprocess_page(&$vars, $hook) {
-  if (strpos(drupal_get_headers(), 'HTTP/1.1 404 Not Found') !== FALSE) {
+  if (strpos(drupal_get_headers(), $_SERVER['SERVER_PROTOCOL'].' 404 Not Found') !== FALSE) {
     module_load_include('inc', 'blocks404', 'blocks404.active');
     _blocks404_preprocess_page($vars);
   }

Comments

johnalbin’s picture

Status: Needs review » Postponed (maintainer needs more info)

Its hardcoded in Drupal core: http://api.drupal.org/api/function/drupal_not_found/6

So I have to search for the exact same string in my module.

This doesn't appear to be a bug. Why would your implementation be better than hardcoding "HTTP/1.1"?

dema502’s picture

I use drupal+apache on backend and ngnix on frontend
Nginx request apache by HTTP/1.0 protocol and this check (strpos(drupal_get_headers(), 'HTTP/1.1 404 Not Found') is not working.

johnalbin’s picture

But as I said, Drupal hard codes that string in http://api.drupal.org/api/function/drupal_not_found/6

This module just looks for that string. How is that your system doesn't have the string that Drupal hard-coded into the headers? :-\

johnalbin’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

I'd love to discuss this more. But without more information, there's nothing for me to fix, afaik. Please re-open if you'd like to continue the discussion. :-)