Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 61818 invoked by uid 500); 9 Nov 2000 00:47:28 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 61753 invoked from network); 9 Nov 2000 00:47:25 -0000 X-Authentication-Warning: kurgan.lyra.org: gstein set sender to gstein@lyra.org using -f Date: Wed, 8 Nov 2000 16:48:24 -0800 From: Greg Stein To: new-httpd@apache.org Subject: Re: cvs commit: apache-2.0/src/modules/standard mod_file_cache.c Message-ID: <20001108164824.T14445@lyra.org> Mail-Followup-To: new-httpd@apache.org References: <20001108230746.69555.qmail@locus.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20001108230746.69555.qmail@locus.apache.org>; from trawick@locus.apache.org on Wed, Nov 08, 2000 at 11:07:46PM -0000 X-URL: http://www.lyra.org/greg/ X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Euh... that would indicate a problem with ap_send_fd(). We pass in an offset, so it should use it. We shouldn't have to see beforehand. Am I missing something about ap_send_fd's API? Cheers, -g On Wed, Nov 08, 2000 at 11:07:46PM -0000, trawick@locus.apache.org wrote: > trawick 00/11/08 15:07:38 > > Modified: src/modules/standard mod_file_cache.c > Log: > When caching file handles (vs. mmaps) reset the file pointer > before serving, since a filter may have caused the file pointer > to advance. > > Revision Changes Path > 1.32 +8 -0 apache-2.0/src/modules/standard/mod_file_cache.c > > Index: mod_file_cache.c > =================================================================== > RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_file_cache.c,v > retrieving revision 1.31 > retrieving revision 1.32 > diff -u -r1.31 -r1.32 > --- mod_file_cache.c 2000/11/08 19:07:34 1.31 > +++ mod_file_cache.c 2000/11/08 23:07:32 1.32 > @@ -401,6 +401,14 @@ > #if APR_HAS_SENDFILE > apr_size_t nbytes; > apr_status_t rv = APR_EINIT; > + apr_off_t offset = 0; > + > + rv = apr_seek(file->file, APR_SET, &offset); > + if (rv != APR_SUCCESS) { > + ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, > + "seek failed"); > + return HTTP_INTERNAL_SERVER_ERROR; > + } > > rv = ap_send_fd(file->file, r, 0, file->finfo.size, &nbytes); > if (rv != APR_SUCCESS) { > > > -- Greg Stein, http://www.lyra.org/