Hi,

I maintain a PHP library for fetching and parsing RSS files, and I've
started getting bug reports from users as they upgrade to 4.3.2

One of the features of the library is support for HTTP's gzip encoding in
order to reduce the bandwidth consumed by fetching RSS files.  Since
upgrading to 4.3.2 users are seeing "gzinflate(): buffer error" or
"gzinflate(): data error" when fetching files from *some* (but not all)
gzip enabled webservers.

I have confirmed this behaviour for PHP 4.3.2 and zlib 1.1.3

The code (which has been working for a little while now) looks like:
  # where results is the content fetched via HTTP
  $results = substr($results, 10);
  $results = gzinflate($results);

In PHP pre-4.3.2 it was neccessary to strip off the first 10 chars (the
gzip header) in order to get this to work.

In PHP 4.3.2 this causes a "buffer error".

If I remove the call to substr(), I get a "data error".

An example file which is not working is:
  http://www.aaronsw.com/weblog/index.xml

(but curl -H "Accept-encoding: gzip" http://www.aaronsw.com/weblog/index.xml
| zcat works just fine)

An example file which work is:
http://dev.protest.net/~kellan/cvs-rss/magpie_cvs.rdf

These 2 servers are running identical versions of Apache and mod_gzip

(note the same problem shows up for plain HTML files, I'm just focused on
RSS)

Looking through the section on Zlib in the PHP docs, I notice that there
has been some work to include Zlib support with PHP 4.3.x, could that
potentially be the problem?

Any help, would be greatly greatly appreciated, as I'm a little baffled.

Thanks,
Kellan

-- 
"the truth is always revolutionary" [antonio gramsci]

[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to