--- readwrite-old.c	2005-10-02 13:51:15.703125000 +0700
+++ readwrite.c	2005-10-02 13:52:16.546875000 +0700
@@ -206,6 +206,8 @@
         /* Unbuffered i/o */
         apr_size_t nbytes;
         rv = read_with_timeout(thefile, buf, *len, &nbytes);
+        if (rv == APR_EOF)
+            thefile->eof_hit = TRUE;
         *len = nbytes;
     }
 
