From: Jay Freeman (saurik) Date: Wed, 30 Jul 2008 08:37:13 +0000 (+0000) Subject: Fixed If-Last-Modified support in APT to be correct. X-Git-Url: https://git.saurik.com/apt-legacy.git/commitdiff_plain/fc9b22c747e4418ec70d11b0c5ed375fee32026a?ds=sidebyside Fixed If-Last-Modified support in APT to be correct. M cfnetwork.diff git-svn-id: http://svn.telesphoreo.org/trunk@406 514c082c-b64e-11dc-b46d-3d985efe055d --- diff --git a/methods/http.cc b/methods/http.cc index 1a7e7c9..eb39da7 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -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); } diff --git a/methods/http.cc.orig b/methods/http.cc.orig index 10f1ae0..650bad0 100644 --- a/methods/http.cc.orig +++ b/methods/http.cc.orig @@ -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); }