xmltv/grab Get_nice.pm,1.29,1.30

Stefan Becker <[email protected]>
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/grab
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6025/grab

Modified Files:
	Get_nice.pm 
Log Message:
get_nice: support compressed response bodies

Some HTTP servers, like yle.fi, randomly return a gzip-compressed body
in the response. Switch to $r->decoded_content(charset => "none") to
automatically de-compress the body, but leave character set processing
to the caller.

This has to be implemented in XMLTV::Get_nice or otherwise this won't
work together with Memoize.


Index: Get_nice.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/Get_nice.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** Get_nice.pm	13 Apr 2014 16:12:17 -0000	1.29
--- Get_nice.pm	22 Feb 2015 15:55:31 -0000	1.30
***************
*** 163,167 ****
          return undef;
      } else {
!         return $r->content;
      }
  
--- 163,168 ----
          return undef;
      } else {
!         # De-compress, if necessary, but skip character set conversions
!         return $r->decoded_content(charset => 'none');
      }
  


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.