From: Fil <fi...@re...> - 2002-09-30 11:22:52
|
Hi, I'm one of the developers of "spip", a CMS based on PHP (see http://uzine.net/spip if you want to know more). We're trying hard to circumvent the php bug with ob_gz_handler, but one of our users tells us that he has problems with privoxy. Here's the code where we detect if we should use the handler. What can we add to be privoxy-safe? (And, why doesn't privoxy handle compressed pages, haha). Thanx. // // Reglage de l'output buffering : si possible, generer une sortie // compressee pour economiser de la bande passante // if ($flag_obgz) { $use_gz = true; // si un buffer est deja ouvert, stop if (ob_get_contents()) $use_gz = false; // special bug de proxy if (eregi("NetCache|Hasd_proxy", $HTTP_VIA)) { $use_gz = false; } // special bug Netscape Win 4.0x if (eregi("Mozilla/4\.0[^ ].*Win", $HTTP_USER_AGENT)) { $use_gz = false; } if ($use_gz) { @ob_start("ob_gzhandler"); } @header("Vary: Cookie, Accept-Encoding"); } else @header("Vary: Cookie"); // // end output buffering // (If you want to try: http://uzine.net/spip is itslef a good example.) -- Fil |