On 05/15/2014 04:35 AM, Chris Cannam wrote: > > > On Thu, May 15, 2014, at 12:17 PM, Ted Felix wrote: >> On 05/15/2014 06:51 AM, Tim Munro wrote: >>> Do test QNetworkAccessManager with .rg files. I discovered an >>> annoying tendency to automatically expand zipped files, even when >>> they are suffixed .rg. >> >> It seems to work fine for me. My test file is very small, though. >> Was there anything interesting about your test file? > > Is it possible it's the server that notices the file is gzipped, and > magically gives it an XML content type with gzip encoding? If the Qt > code had at the same time become able to handle such encodings, then > that might come out as a regression overall for Rosegarden as you > describe.
Using an old Red Hat 7.1 Apache server, I first noticed that the downloaded file, while keeping the same name, was several times larger than the original. A hex editor confirmed the file had been decompressed, and a packet sniffer confirmed that the decompression was taking place on my end, following the transfer. And the server was indeed sending back the header, "Content-Encoding: gzip." I think web browsers routinely decompress this stuff, and The QT folks apparently don't consider it a bug when QNetworkAccessManager thinks it's a web browser. After a day or so of trial and error, I found that QNetworkRequest.RawHeader("Accept-Encoding", "gzip,deflate") repressed the behavior, but it seemed a little too squirrelly to me. I wish the class had some sort of a real switch to control this. I'm seeing the same behavior with both Qt4 and Qt5. A possible kludge might be to recompress files that have been automatically decompressed, in order to keep the rest of Rosegarden happy. Tim Munro ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Rosegarden-devel mailing list Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel