2001-06-07
2001-06-07 04:33:52 by Per Hedbor <ph@opera.com>
-
9424463aa19c99f68e826218fd8a52a7fde6f20d
(20 lines)
(+14/-6)
[
Show
| Annotate
]
Branch: 5.2
Fixed [Bug 1707 (#1707)], [Bug 1708 (#1708)] and [Bug 1603 (#1603)]
Rev: server/protocols/http.pike:1.316
2:
// Modified by Francesco Chemolli to add throttling capabilities.
// Copyright © 1996 - 2000, Roxen IS.
- constant cvs_version = "$Id: http.pike,v 1.315 2001/06/06 22:11:00 per Exp $";
+ constant cvs_version = "$Id: http.pike,v 1.316 2001/06/07 04:33:52 per Exp $";
// #define REQUEST_DEBUG
#define MAGIC_ERROR
1612:
{
/* ({ time, len }) */
array(int) since_info = Roxen.parse_since( since );
+ // werror("since: %{%O, %}\n"
+ // "lm: %O\n",
+ // since_info,
+ // misc->last_modified );
if ( ((since_info[0] >= misc->last_modified) &&
((since_info[1] == -1) || (since_info[1] == file->len)))
// actually ok, or...
- || ((misc->cacheable>0)
- && (since_info[0] + misc->cacheable<= predef::time(1)))
- // cacheable, and not enough time has passed.
+ // || ((misc->cacheable>0)
+ // && (since_info[0] + misc->cacheable<= predef::time(1))
+ // // cacheable, and not enough time has passed.
)
{
file->error = 304;
1626:
}
}
}
+ else // Dynamic content.
+ heads["Expires"] = Roxen.http_date( misc->last_modified );
}
if(prot != "HTTP/0.9")
1999: Inside #if defined(RAM_CACHE)
TIMER_START(cache_lookup);
array cv;
if( prot != "HTTP/0.9" &&
- misc->cacheable &&
+ misc->cacheable &&
+ !since &&
(cv = conf->datacache->get( raw_url )) )
{
MY_TRACE_ENTER (sprintf ("Found %O in ram cache - checking entry", raw_url), 0);