View Full Version : gzip handling in NSURLConnection

Jan 13, 2009, 11:59 PM
I've read that NSURLConnection automatically decompresses request that are gzipped. Without having to specify accept-encoding or anything in the request. In doing an asynchronous NSURLConnection, I print the lengths of the returned data in each didReceiveData call, but it appears to be the uncompressed length.

Does NSURLConnection decompress the data before sending to didReceiveData? How can I tell if the data being received was originally compressed?


Jan 14, 2009, 02:57 AM
I seem to recall reading somewhere that this behavior was an unannounced change between SDK versions.