]> git.saurik.com Git - apt-legacy.git/commitdiff
Fixed If-Last-Modified support in APT to be correct.
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 30 Jul 2008 08:37:13 +0000 (08:37 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 30 Jul 2008 08:37:13 +0000 (08:37 +0000)
M cfnetwork.diff

git-svn-id: http://svn.telesphoreo.org/trunk@406 514c082c-b64e-11dc-b46d-3d985efe055d

methods/http.cc
methods/http.cc.orig

index 1a7e7c95827552187be702f375145d42d40b6272..eb39da73ff76ab1a3298be4ee32082080993797d 100644 (file)
@@ -1143,7 +1143,7 @@ int HttpMethod::Loop()
          CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("If-Range"), sr);
          CFRelease(sr);
       } else if (Queue->LastModified != 0) {
-         sr = CFStringCreateWithCString(kCFAllocatorDefault, TimeRFC1123(SBuf.st_mtime).c_str(), se);
+         sr = CFStringCreateWithCString(kCFAllocatorDefault, TimeRFC1123(Queue->LastModified).c_str(), se);
          CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("If-Modified-Since"), sr);
          CFRelease(sr);
       }
index 10f1ae0ec8917d61101ceab70cdf6372e89e322b..650bad052a21cc2fae8c783ae20b647f4b49b29e 100644 (file)
@@ -1139,7 +1139,7 @@ int HttpMethod::Loop()
          CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("If-Range"), sr);
          CFRelease(sr);
       } else if (Queue->LastModified != 0) {
-         sr = CFStringCreateWithCString(kCFAllocatorDefault, TimeRFC1123(SBuf.st_mtime).c_str(), se);
+         sr = CFStringCreateWithCString(kCFAllocatorDefault, TimeRFC1123(Queue->LastModified).c_str(), se);
          CFHTTPMessageSetHeaderFieldValue(hm, CFSTR("If-Modified-Since"), sr);
          CFRelease(sr);
       }