You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by bn...@apache.org on 2004/01/08 18:50:03 UTC
cvs commit: httpd-2.0/server core.c
bnicholes 2004/01/08 09:50:03
Modified: server core.c
Log:
If large file support is enabled allow the file to be split into AP_MAX_SENDFILE sized buckets. Otherwise Apache will be unable to send files larger than 2 gig due to signed 32-bit limitations.
Revision Changes Path
1.255 +6 -2 httpd-2.0/server/core.c
Index: core.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/core.c,v
retrieving revision 1.254
retrieving revision 1.255
diff -u -r1.254 -r1.255
--- core.c 1 Jan 2004 13:26:23 -0000 1.254
+++ core.c 8 Jan 2004 17:50:03 -0000 1.255
@@ -1,7 +1,7 @@
/* ====================================================================
* The Apache Software License, Version 1.1
*
- * Copyright (c) 2000-2004 The Apache Software Foundation. All rights
+ * Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -3508,8 +3508,12 @@
}
bb = apr_brigade_create(r->pool, c->bucket_alloc);
-#if APR_HAS_SENDFILE && APR_HAS_LARGE_FILES
+#if APR_HAS_LARGE_FILES
+#if APR_HAS_SENDFILE
if ((d->enable_sendfile != ENABLE_SENDFILE_OFF) &&
+#else
+ if (
+#endif
(r->finfo.size > AP_MAX_SENDFILE)) {
/* APR_HAS_LARGE_FILES issue; must split into mutiple buckets,
* no greater than MAX(apr_size_t), and more granular than that
Re: [Bug?] cvs commit: httpd-2.0/server core.c
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Woha...
At 11:50 AM 1/8/2004, bnicholes@apache.org wrote:
>bnicholes 2004/01/08 09:50:03
>
> Modified: server core.c
> Log:
> If large file support is enabled allow the file to be split into AP_MAX_SENDFILE sized buckets. Otherwise Apache will be unable to send files larger than 2 gig due to signed 32-bit limitations.
>
> RCS file: /home/cvs/httpd-2.0/server/core.c,v
> retrieving revision 1.254
> retrieving revision 1.255
> diff -u -r1.254 -r1.255
> --- core.c 1 Jan 2004 13:26:23 -0000 1.254
> +++ core.c 8 Jan 2004 17:50:03 -0000 1.255
> @@ -3508,8 +3508,12 @@
> }
>
> bb = apr_brigade_create(r->pool, c->bucket_alloc);
> -#if APR_HAS_SENDFILE && APR_HAS_LARGE_FILES
> +#if APR_HAS_LARGE_FILES
> +#if APR_HAS_SENDFILE
> if ((d->enable_sendfile != ENABLE_SENDFILE_OFF) &&
> +#else
> + if (
> +#endif
> (r->finfo.size > AP_MAX_SENDFILE)) {
> /* APR_HAS_LARGE_FILES issue; must split into mutiple buckets,
> * no greater than MAX(apr_size_t), and more granular than that
Ok that is a messy one to grok but I think I got it...
Haven't you broken the EnableSendfile off directive if the user is trying to avoid
using sendfile on non-largefile builds?
E.g. if someone determines that their sendfile implementation is broken, will
the server still react properly to EnableSendfile off on linux or bsd?
Bill