Posted At : March 19, 2009 10:37 AM
By adding the 'Accept-Encoding':'gzip' header we were telling our apache server to serve up the compressed version of the content and we could see the content was compressed coming through Charles Proxy, and our application was working perfectly.
However, I started working on the exact same code the next day and straight away got an error - the application was erroring because it was getting binary data where it expected the decompressed XML data.
I turned Charles back on to see what was going on and it started working again. With my best sherlock holmes head on I rapidly deduced that Charles as well as proxying the request was also decompressing it helpfully for me.
Luckily I'd already come across the solution to the problem courtesy of Anirudh Sasikumar (GzipHTTPService) and Paul Robertson (Gzip Encoder).
I made some minor modifications to Anirudh's Gzip HTTP Service to do two things.
With these changes it is a drop in replacement for the <mx:HTTPService/> tag.
The changes are as follows:
For convenience you can download the modified files from here.
Hope it helps.
Cheers, Mark
0 Comments