Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 20132 invoked by uid 500); 21 Jan 2001 19:18:23 -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 20117 invoked from network); 21 Jan 2001 19:18:21 -0000 X-Authentication-Warning: mako.covalent.net: dougm owned process doing -bs Date: Sun, 21 Jan 2001 11:18:19 -0800 (PST) From: Doug MacEachern To: new-httpd@apache.org Subject: Re: Both ap_r* patches. In-Reply-To: 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 rbb.new patch results in a core dump for any request that does not use ap_r* : 0x809a318 in apr_brigade_flush (b=0x0) at apr_brigade.c:194 194 apr_size_t i = b->end - b->start; (gdb) where #0 0x809a318 in apr_brigade_flush (b=0x0) at apr_brigade.c:194 #1 0x8068eb7 in end_output_stream (r=0x84d6cc4) at http_protocol.c:1624 #2 0x806ac77 in ap_finalize_request_protocol (r=0x84d6cc4) at http_protocol.c:2682 #3 0x806f267 in process_request_internal (r=0x84d6cc4) at http_request.c:1356 #4 0x806f321 in ap_process_request (r=0x84d6cc4) at http_request.c:1378 #5 0x808ec5e in ap_process_http_connection (c=0x812d5cc) at connection.c:249 #6 0x808e95b in ap_run_process_connection (c=0x812d5cc) at connection.c:85 #7 0x808eb95 in ap_process_connection (c=0x812d5cc) at connection.c:221 #8 0x807fe4b in process_socket (p=0x812d4ec, sock=0x812d51c, my_child_num=0, my_thread_num=0) at mpmt_pthread.c:417 #9 0x8080230 in worker_thread (dummy=0x84aa650) at mpmt_pthread.c:549 #10 0x4008ddd0 in pthread_start_thread_event (arg=0xbf7ffc00) at manager.c:274 patch below fixes for me, is this the right thing todo? --- modules/http/http_protocol.c~ Sun Jan 21 10:39:42 2001 +++ modules/http/http_protocol.c Sun Jan 21 11:16:03 2001 @@ -1621,7 +1621,13 @@ { apr_bucket *b; - apr_brigade_flush(r->bb); + if (r->bb) { + apr_brigade_flush(r->bb); + } + else { + r->bb = apr_brigade_create(r->pool); + } + b = apr_bucket_create_eos(); APR_BRIGADE_INSERT_TAIL(r->bb, b); ap_pass_brigade(r->output_filters, r->bb);