gzip handling in NSURLConnection

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

  1. macrumors member

    Joined:
    Mar 16, 2008
    Location:
    Austin, Texas
    #1
    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?

    Thanks!
     
  2. Guest

    caveman_uk

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

Share This Page