Use WWW::Mechanize. It will honor the Transfer-Encoding headers.
In reply to Re: fetching a gzipped website by Corion in thread fetching a gzipped website by Anonymous Monk