Merge pull request #2772 from ifsnow/fix/default-accept-header
Change the default value of accept request header
This commit is contained in:
commit
2441fe5d21
|
@ -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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue