Etag still needs -gzip replacement

This commit is contained in:
relikd
2019-08-21 11:40:14 +02:00
parent eb32ca9617
commit 466e12ba5f
2 changed files with 5 additions and 3 deletions

View File

@@ -71,8 +71,10 @@ static _Atomic(NSUInteger) _queueSize = 0;
NSMutableURLRequest *req = [self newRequestURL:meta.url];
if (!flag) {
// Both fields should be sent (if server provides both) RFC: https://tools.ietf.org/html/rfc7232#section-2.4
if (meta.etag.length > 0)
[req setValue:meta.etag forHTTPHeaderField:@"If-None-Match"]; // ETag
if (meta.etag.length > 0) {
NSString *etag = [meta.etag stringByReplacingOccurrencesOfString:@"-gzip" withString:@""];
[req setValue:etag forHTTPHeaderField:@"If-None-Match"]; // ETag
}
if (meta.modified.length > 0)
[req setValue:meta.modified forHTTPHeaderField:@"If-Modified-Since"];
}

View File

@@ -70,7 +70,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>11491</string>
<string>11510</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.news</string>
<key>LSMinimumSystemVersion</key>