coar 97/08/25 09:02:31
Modified: src CHANGES src/main http_request.c http_request.h http_config.h Log: Add r->mtime field to reduce gratuitous date parsing, and update_mtime() function to advance it as needed. (This will be used by the ETag and Last-Modified changes coming shortly.) Reviewed by: Roy Fielding Revision Changes Path 1.420 +8 -2 apachen/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apachen/src/CHANGES,v retrieving revision 1.419 retrieving revision 1.420 diff -u -r1.419 -r1.420 --- CHANGES 1997/08/25 02:26:52 1.419 +++ CHANGES 1997/08/25 16:02:21 1.420 @@ -1,5 +1,11 @@ Changes with Apache 1.3a2 + *) API: A new field in the request_rec, r->mtime, has been added to + avoid gratuitous parsing of date strings. It is intended to hold + the last-modified date of the resource (if applicable). An + update_mtime() routine has also been added to advance it if + appropriate. [Roy Fielding, Ken Coar] + *) If a htaccess file can not be read due to bad permissions, deny access to the directory with a HTTP_FORBIDDEN. The previous behavior was to ignore the htaccess file if it could not @@ -14,8 +20,8 @@ *) Canonicalise filenames under Win32. Short filenames are converted to long ones. Backslashes are converted to forward - slashes. Case is converted to lower. Parts of URLs that do not - correspond to files are left completely alone. [Ben Laurie] + slashes. Case is converted to lower. Parts of URLs that do not + correspond to files are left completely alone. [Ben Laurie] *) PORT: 2 new OSs added to the list of ports: Encore's UMAX V: Arieh Markel <[EMAIL PROTECTED]> 1.79 +12 -0 apachen/src/main/http_request.c Index: http_request.c =================================================================== RCS file: /export/home/cvs/apachen/src/main/http_request.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -r1.78 -r1.79 --- http_request.c 1997/08/19 07:52:42 1.78 +++ http_request.c 1997/08/25 16:02:27 1.79 @@ -1201,3 +1201,15 @@ && (r->prev == NULL); /* otherwise, this is an internal redirect */ } + +/* + * Function to set the r->mtime field to the specified value if it's later + * than what's already there. + */ +API_EXPORT(time_t) update_mtime(request_rec *r, time_t dependency_mtime) +{ + if (r->mtime < dependency_mtime) { + r->mtime = dependency_mtime; + } + return r->mtime; +} 1.15 +1 -0 apachen/src/main/http_request.h Index: http_request.h =================================================================== RCS file: /export/home/cvs/apachen/src/main/http_request.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- http_request.h 1997/08/18 07:17:27 1.14 +++ http_request.h 1997/08/25 16:02:27 1.15 @@ -87,6 +87,7 @@ API_EXPORT(void) internal_redirect_handler (const char *new_uri, request_rec *); API_EXPORT(int) some_auth_required (request_rec *r); API_EXPORT(int) is_initial_req(request_rec *r); +API_EXPORT(time_t) update_mtime(request_rec *r, time_t dependency_mtime); #ifdef CORE_PRIVATE /* Function called by main.c to handle first-level request */ 1.46 +1 -1 apachen/src/main/http_config.h Index: http_config.h =================================================================== RCS file: /export/home/cvs/apachen/src/main/http_config.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- http_config.h 1997/08/23 04:00:28 1.45 +++ http_config.h 1997/08/25 16:02:28 1.46 @@ -246,7 +246,7 @@ * handle it back-compatibly, or at least signal an error). */ -#define MODULE_MAGIC_NUMBER 19970818 +#define MODULE_MAGIC_NUMBER 19970825 #define STANDARD_MODULE_STUFF MODULE_MAGIC_NUMBER, -1, __FILE__, NULL /* Generic accessors for other modules to get at their own module-specific