Changeset 182729 in webkit
- Timestamp:
- Apr 13, 2015 7:05:37 AM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r182726 r182729 1 2015-04-13 Sungmann Cho <sungmann.cho@navercorp.com> 2 3 [Curl] Small improvements to CurlCacheEntry::parseResponseHeaders() 4 https://bugs.webkit.org/show_bug.cgi?id=143597 5 6 Reviewed by Csaba Osztrogonác. 7 8 Most lines of code in CurlCacheEntry::parseResponseHeaders() don't need to be 9 executed if the response has "no-cache" or "no-store" directive, but we are 10 checking these conditions in the middle of the method. We can move this to the 11 beginning of the method for efficiency. 12 13 No new tests, no behavior change. 14 15 * platform/network/curl/CurlCacheEntry.cpp: 16 (WebCore::CurlCacheEntry::parseResponseHeaders): 17 1 18 2015-04-13 Sergio Villar Senin <svillar@igalia.com> 2 19 -
trunk/Source/WebCore/platform/network/curl/CurlCacheEntry.cpp
r182571 r182729 274 274 using namespace std::chrono; 275 275 276 if (response.cacheControlContainsNoCache() || response.cacheControlContainsNoStore() || !response.hasCacheValidatorFields()) 277 return false; 278 276 279 double fileTime; 277 280 time_t fileModificationDate; 278 281 279 if (getFileModificationTime(m_headerFilename, fileModificationDate)) { 280 fileTime = difftime(fileModificationDate, 0); 281 fileTime *= 1000.0; 282 } else 282 if (getFileModificationTime(m_headerFilename, fileModificationDate)) 283 fileTime = difftime(fileModificationDate, 0) * 1000.0; 284 else 283 285 fileTime = currentTimeMS(); // GMT 284 285 if (response.cacheControlContainsNoCache() || response.cacheControlContainsNoStore())286 return false;287 288 if (!response.hasCacheValidatorFields())289 return false;290 286 291 287 auto maxAge = response.cacheControlMaxAge();
Note: See TracChangeset
for help on using the changeset viewer.