Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 49013 invoked by uid 500); 7 Jun 2001 23:38:47 -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 48989 invoked from network); 7 Jun 2001 23:38:46 -0000 X-Authentication-Warning: cobra.cs.Virginia.EDU: jcw5q owned process doing -bs Date: Thu, 7 Jun 2001 19:38:49 -0400 (EDT) From: Cliff Woolley X-X-Sender: To: Subject: byterange filter + apr_brigade_partition Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hey... I'm finally getting around to applying the six-month-old patch to change the prototype for apr_brigade_partition() to this: APU_DECLARE(apr_status_t) apr_brigade_partition(apr_bucket_brigade *b, apr_off_t point, apr_bucket **after_point) This is so that the caller can have more information when a failure occurs, and was at the request of Greg Stein when the function first came into existence. The patch just slipped through the cracks and was forgotten since then. Anyway, I'll have to patch the byterange filter in Apache to account for the change, and I'm looking for input on what the correct action is when a failure actually occurs. Right now, Apache doesn't test for a failure to partition (which would have been indicated by a NULL return value) at all. So in the code below, what would be the right thing to stick in the "XXX: handle error" spot? Thanks, Cliff Index: http_protocol.c =================================================================== RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v retrieving revision 1.324 diff -u -d -r1.324 http_protocol.c --- http_protocol.c 2001/06/06 19:30:49 1.324 +++ http_protocol.c 2001/06/07 23:31:39 @@ -2317,6 +2317,7 @@ (rv = parse_byterange(current, clength, &range_start, &range_end))) { apr_bucket *e2; apr_bucket *ec; + apr_status_t rvstart, rvend; if (rv == -1) { continue; @@ -2339,8 +2340,11 @@ APR_BRIGADE_INSERT_TAIL(bsend, e); } - e = apr_brigade_partition(bb, range_start); - e2 = apr_brigade_partition(bb, range_end + 1); + rvstart = apr_brigade_partition(bb, range_start, &e); + rvend = apr_brigade_partition(bb, range_end + 1, &e2); + if ((rvstart != APR_SUCCESS) || (rvend != APR_SUCCESS)) { + /* XXX: handle error */ + } ec = e; do { -------------------------------------------------------------- Cliff Woolley cliffwoolley@yahoo.com Charlottesville, VA