You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2001/07/25 23:55:27 UTC
cvs commit: httpd-2.0/modules/generators mod_asis.c
wrowe 01/07/25 14:55:27
Modified: modules/generators mod_asis.c
Log:
Same fix for largefile support as core.c
Revision Changes Path
1.37 +11 -4 httpd-2.0/modules/generators/mod_asis.c
Index: mod_asis.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/generators/mod_asis.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- mod_asis.c 2001/07/24 20:38:01 1.36
+++ mod_asis.c 2001/07/25 21:55:27 1.37
@@ -118,10 +118,17 @@
}
if (!r->header_only) {
- /* XXX: APR_HAS_LARGE_FILES issue; need to split into mutiple send_fd
- * chunks, no greater than MAX(apr_size_t).
- */
- ap_send_fd(f, r, 0, r->finfo.size, &nbytes);
+ apr_off_t start = 0;
+ apr_off_t fsize = r->finfo.size;
+#ifdef APR_HAS_LARGE_FILES
+ /* must split into mutiple send_fd chunks */
+ while (fsize > AP_MAX_SENDFILE) {
+ ap_send_fd(f, r, start, AP_MAX_SENDFILE, &nbytes);
+ start += AP_MAX_SENDFILE;
+ fsize -= AP_MAX_SENDFILE;
+ }
+#endif
+ ap_send_fd(f, r, start, (apr_size_t)fsize, &nbytes);
}
apr_file_close(f);