Merge pull request #1178 from marciomeschini/marco/fix_accept_header
add webp accepted content type only if WebP enabled
This commit is contained in:
commit
7692bd2610
|
@ -67,7 +67,11 @@ static NSString *const kCompletedCallbackKey = @"completed";
|
|||
_downloadQueue = [NSOperationQueue new];
|
||||
_downloadQueue.maxConcurrentOperationCount = 6;
|
||||
_URLCallbacks = [NSMutableDictionary new];
|
||||
_HTTPHeaders = [NSMutableDictionary dictionaryWithObject:@"image/webp,image/*;q=0.8" forKey:@"Accept"];
|
||||
#ifdef SD_WEBP
|
||||
_HTTPHeaders = [@{@"Accept": @"image/webp,image/*;q=0.8"} mutableCopy];
|
||||
#else
|
||||
_HTTPHeaders = [@{@"Accept": @"image/*;q=0.8"} mutableCopy];
|
||||
#endif
|
||||
_barrierQueue = dispatch_queue_create("com.hackemist.SDWebImageDownloaderBarrierQueue", DISPATCH_QUEUE_CONCURRENT);
|
||||
_downloadTimeout = 15.0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue