# Note that Compress::Zlib::memGunzip() destroys its input, thus $body2 . # There seems to be a bug (?) in Compress::Zlib such that compressing and # then uncompressing some strings (ones with non-ASCII characters?) does # not result in the original string. One example is watan.com, which # uses the "windows-1256" encoding. Thus, only send the gzip'd $body if # decompression exactly undoes compression. Inefficient. :( # jsm-- is there a better way, e.g. simply not compressing windows-1256 # text, or converting all text to utf-8? if ($ENV{HTTP_ACCEPT_ENCODING}=~ /\bgzip\b/i) { eval { require Compress::Zlib } ; if (!$@) {