Change the default value of accept request header

This commit is contained in:
ifsnow 2019-06-26 13:27:55 +09:00
parent 515a5f7ac0
commit fcaa7d6c7a
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ static void * SDWebImageDownloaderContext = &SDWebImageDownloaderContext;
}
headerDictionary[@"User-Agent"] = userAgent;
}
headerDictionary[@"Accept"] = @"image/*;q=0.8";
headerDictionary[@"Accept"] = @"image/*,*/*;q=0.8";
_HTTPHeaders = headerDictionary;
_HTTPHeadersLock = dispatch_semaphore_create(1);
_operationsLock = dispatch_semaphore_create(1);

View File

@ -37,7 +37,7 @@
}
- (void)test02ThatByDefaultDownloaderSetsTheAcceptHTTPHeader {
expect([[SDWebImageDownloader sharedDownloader] valueForHTTPHeaderField:@"Accept"]).to.match(@"image/\\*");
expect([[SDWebImageDownloader sharedDownloader] valueForHTTPHeaderField:@"Accept"]).to.match(@"image/\\*,\\*/\\*;q=0.8");
}
- (void)test03ThatSetAndGetValueForHTTPHeaderFieldWork {