[xml] xmlNanoHTTPFetch and gzip

I'm using the xmlNanoHTTPFetch function to retrieve RSS and Atom feeds.
I've noticed that in some cases, the servers send compressed data in
gzip format. The compressed files are received ok but are saved in
compressed rather than uncompressed format. 

Ideally, I'd think they would be uncompressed before saving to make the
compression transparent. But if NanoHTTP is saving them in compressed
format by design, how can I find out whether the data received is
compressed? Does xmlNanoHTTPFetch set a flag or variable somewhere to
tell me that I'm dealing with compressed data so I can handle it
correctly when opening and reading the saved file?

I'm using the libxml2-2.6.26- package included with RHEL/CentOS.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]