Mailing List Archive

cvs commit: apachen/src/main http_core.c
dgaudet 97/11/12 12:42:10

Modified: src CHANGES
src/main http_core.c
Log:
http_core was mmap()ing even in cases where it wasn't going to
read the file.

Submitted by: Ben Hyde <bhyde@gensym.com>
Reviewed by: Dean Gaudet, Martin Kraemer

Revision Changes Path
1.505 +3 -0 apachen/src/CHANGES

Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apachen/src/CHANGES,v
retrieving revision 1.504
retrieving revision 1.505
diff -u -r1.504 -r1.505
--- CHANGES 1997/11/12 10:46:52 1.504
+++ CHANGES 1997/11/12 20:42:06 1.505
@@ -1,5 +1,8 @@
Changes with Apache 1.3b3

+ *) http_core was mmap()ing even in cases where it wasn't going to
+ read the file. [Ben Hyde <bhyde@gensym.com>]
+
*) Complete rewrite ;_) of mod_rewrite's URL rewriting engine:
Now the rewriting engine (the heart of mod_rewrite) is organized more
straight-forward, first time well documented and reduced to the really



1.138 +4 -3 apachen/src/main/http_core.c

Index: http_core.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -r1.137 -r1.138
--- http_core.c 1997/11/11 22:43:26 1.137
+++ http_core.c 1997/11/12 20:42:09 1.138
@@ -1859,9 +1859,10 @@

#ifdef USE_MMAP_FILES
block_alarms();
- if (r->finfo.st_size >= MMAP_THRESHOLD) {
- /* we need to protect ourselves in case we die while we've got the
- * file mmapped */
+ if ((r->finfo.st_size >= MMAP_THRESHOLD)
+ && ( !r->header_only || (d->content_md5 & 1))) {
+ /* we need to protect ourselves in case we die while we've got the
+ * file mmapped */
mm = mmap (NULL, r->finfo.st_size, PROT_READ, MAP_PRIVATE,
fileno(f), 0);
} else {