gzip handling in NSURLConnection

Discussion in 'iOS Programming' started by ace2600, Jan 13, 2009.

  1. ace2600 macrumors member

    Mar 16, 2008
    Austin, Texas
    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?

  2. caveman_uk Guest


    Feb 17, 2003
    Hitchin, Herts, UK
    I seem to recall reading somewhere that this behavior was an unannounced change between SDK versions.

Share This Page