~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to src/store.cc

  • Committer: Package Import Robot
  • Author(s): Luigi Gangitano
  • Date: 2011-09-02 13:33:41 UTC
  • mto: (21.2.8 sid)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: package-import@ubuntu.com-20110902133341-56p01dh4mh6e308v
Tags: upstream-3.1.15
ImportĀ upstreamĀ versionĀ 3.1.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
1431
1431
void
1432
1432
StoreEntry::negativeCache()
1433
1433
{
1434
 
    if (expires == 0)
 
1434
    // XXX: should make the default for expires 0 instead of -1
 
1435
    //      so we can distinguish "Expires: -1" from nothing.
 
1436
    if (expires <= 0)
1435
1437
#if HTTP_VIOLATIONS
1436
1438
        expires = squid_curtime + Config.negativeTtl;
1437
1439
#else
1491
1493
    if (served_date < 0 || served_date > squid_curtime)
1492
1494
        served_date = squid_curtime;
1493
1495
 
 
1496
    /* Bug 1791:
 
1497
     * If the returned Date: is more than 24 hours older than
 
1498
     * the squid_curtime, then one of us needs to use NTP to set our
 
1499
     * clock.  We'll pretend that our clock is right.
 
1500
     */
 
1501
    else if (served_date < (squid_curtime - 24 * 60 * 60) )
 
1502
        served_date = squid_curtime;
 
1503
 
1494
1504
    /*
1495
1505
     * Compensate with Age header if origin server clock is ahead
1496
1506
     * of us and there is a cache in between us and the origin