AFHTTPClient docs indicate Default Header value for Accept-Encoding gzip, but is not implemented #640

Closed
blakewatters opened this Issue Nov 12, 2012 · 3 comments

Projects

None yet

2 participants

@blakewatters

The header file for AFHTTPClient indicates that a default header is set for Accept-Encoding gzip, but it does not appear to be implemented in AFHTTPClient.m Not sure if the default behavior was removed or never implemented, but the header seems to be inaccurate.

@blakewatters

Ah actually it looks like NSURLConnection adds this header transparently. In any case, should probably be mentioned parenthetically in the docs since you won't see it in the outbound headers dictionary but will see a gzipped response.

@mattt

Thanks for pointing this out, Blake.

As it were, the documentation is actually outdated. The gzip encoding header was removed with Pull Request #494.

eaac6a1 removes this from the documentation, which should clear up any confusion. As for documenting the specific behavior of NSURLConnection, that's probably best left up to Apple (especially since I don't really know for sure what's going on across all versions anyway).

@mattt mattt closed this Nov 13, 2012
@blakewatters

Yeah I spent 20 minutes searching around for any coherent specifications about what version they introduced the gzip support in, but could only find anecdotal tales of needing or not needing to add the header. It seems very similar to situation with Cache-Control headers and eTag/conditional GET support, as it will magically work or not work depending on the cocktail of headers you put together. Very annoying.

@MrMaksimize MrMaksimize added a commit to MrMaksimize/AFNetworking that referenced this issue Nov 14, 2012
@MrMaksimize MrMaksimize Merge remote-tracking branch 'mainline/master'
* mainline/master: (105 commits)
  [Issue #640] Removing documentation note about default Accept-Encoding header
  [Issue #633] Manually casting scalar types in initWithCoder for AFURLConnectionOperation and AFHTTPClient
  Using addOperations:waitUntilFinished: instead of adding each operation individually in -enqueueBatchOfHTTPRequestOperations:... to fix an edge case bug where only one of the operations in a batch will run.
  Indenting macro conditionals
  Distinguisging between CoreServices and MobileCoreServices for #warning
  Removing quotes for #warning macros
  Derive keys string representations using the description method as specified in AFQueryStringFromParametersWithEncoding documentation
  Update CHANGES
  [#624] Moved __unused keywords for better Xcode indexing.
  Adding chanelog item for 5b32b45
  [Issue #619] Sorting dictionary keys with caseInsensitiveCompare to ensure deterministic ordering of query string parameters, which may otherwise cause ambiguous representations of nested parameters
  Adding release notes for 1.0.1
  Update CHANGES
  [Issue #591] Attempts to fix crash caused by incorrect calculation of range when reading data into buffer.
  Document change for next version.
  [Issue #599] Refactoring AFHTTPClient to remove unnecessary JSON / plist serialization functions, logging any error that may arise.
  [Issue #565] Checking for kCFStringEncodingInvalidId from CFStringConvertIANACharSetNameToEncoding() before getting NSStringEncoding with CFStringConvertEncodingToNSStringEncoding, which may otherwise lead to unexpected behavior
  [Issue #603] Removing duplicated runloop scheduling of outputStream
  [Issue #592][Issue #600] Changes the logic of UIImageView -setImageWithURLRequest:placeholderImage:success:failure: such that if the success block is specified, the default behavior of self.image = image is not executed. This allows for full customization over any post-processing on the image, or the animation to be used when setting the image.
  Removing excess whitespace
  ...
f4b2937
@greghe greghe pushed a commit to skillz/AFNetworking that referenced this issue Sep 3, 2015
@mattt mattt [Issue #640] Removing documentation note about default Accept-Encodin…
…g header
d7fbd23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment