Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 66999 invoked by uid 500); 21 Feb 2002 02:19:42 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 66988 invoked by uid 500); 21 Feb 2002 02:19:41 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 21 Feb 2002 02:19:40 -0000 Message-ID: <20020221021940.79401.qmail@icarus.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/server core.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N wrowe 02/02/20 18:19:39 Modified: include httpd.h server core.c Log: Fix the close-on-sendfile bug where Win32 would transmit a single sendfile bucket and then lose it's socket, and fix a comment. Submitted by: Ryan Morgan Revision Changes Path 1.178 +2 -2 httpd-2.0/include/httpd.h Index: httpd.h =================================================================== RCS file: /home/cvs/httpd-2.0/include/httpd.h,v retrieving revision 1.177 retrieving revision 1.178 diff -u -r1.177 -r1.178 --- httpd.h 11 Feb 2002 23:20:15 -0000 1.177 +++ httpd.h 21 Feb 2002 02:19:39 -0000 1.178 @@ -324,9 +324,9 @@ * APR_HAS_LARGE_FILES introduces the problem of spliting sendfile into * mutiple buckets, no greater than MAX(apr_size_t), and more granular * than that in case the brigade code/filters attempt to read it directly. - * ### 4mb is an invention, no idea if it is reasonable. + * ### 16mb is an invention, no idea if it is reasonable. */ -#define AP_MAX_SENDFILE 16777216 +#define AP_MAX_SENDFILE 16777216 /* 2^24 */ /** * Special Apache error codes. These are basically used 1.150 +1 -1 httpd-2.0/server/core.c Index: core.c =================================================================== RCS file: /home/cvs/httpd-2.0/server/core.c,v retrieving revision 1.149 retrieving revision 1.150 diff -u -r1.149 -r1.150 --- core.c 19 Feb 2002 04:45:53 -0000 1.149 +++ core.c 21 Feb 2002 02:19:39 -0000 1.150 @@ -3633,7 +3633,7 @@ hdtr.trailers = vec_trailers; } #if APR_HAS_SENDFILE - if (!c->keepalive) { + if (!c->keepalive && APR_BUCKET_IS_EOS(last_e)) { /* Prepare the socket to be reused */ flags |= APR_SENDFILE_DISCONNECT_SOCKET; }