From fc16eef8b2028768bd25f68f38bf967850ced645 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Tue, 25 Sep 2012 21:48:25 -0700 Subject: [PATCH] Disabling HTTP pipelining for image request operations --- AFNetworking/UIImageView+AFNetworking.h | 4 ++-- AFNetworking/UIImageView+AFNetworking.m | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/AFNetworking/UIImageView+AFNetworking.h b/AFNetworking/UIImageView+AFNetworking.h index 1c8bfb8..c44a0cb 100644 --- a/AFNetworking/UIImageView+AFNetworking.h +++ b/AFNetworking/UIImageView+AFNetworking.h @@ -36,7 +36,7 @@ /** Creates and enqueues an image request operation, which asynchronously downloads the image from the specified URL, and sets it the request is finished. Any previous image request for the receiver will be cancelled. If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. - @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set to use HTTP pipelining, and not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` @param url The URL used for the image request. */ @@ -48,7 +48,7 @@ @param url The URL used for the image request. @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. - @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set to use HTTP pipelining, and not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` + @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` */ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage; diff --git a/AFNetworking/UIImageView+AFNetworking.m b/AFNetworking/UIImageView+AFNetworking.m index 334c700..8933290 100644 --- a/AFNetworking/UIImageView+AFNetworking.m +++ b/AFNetworking/UIImageView+AFNetworking.m @@ -89,7 +89,6 @@ static char kAFImageRequestOperationObjectKey; { NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setHTTPShouldHandleCookies:NO]; - [request setHTTPShouldUsePipelining:YES]; [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; [self setImageWithURLRequest:request placeholderImage:placeholderImage success:nil failure:nil];