Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 17900 invoked from network); 15 Nov 2007 17:44:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Nov 2007 17:44:02 -0000 Received: (qmail 55099 invoked by uid 500); 15 Nov 2007 17:43:46 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 54899 invoked by uid 500); 15 Nov 2007 17:43:46 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 54882 invoked by uid 99); 15 Nov 2007 17:43:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Nov 2007 09:43:46 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 15 Nov 2007 17:43:44 +0000 Received: (qmail 9039 invoked by uid 2161); 15 Nov 2007 17:17:23 -0000 Received: from [192.168.2.4] (euler.heimnetz.de [192.168.2.4]) by cerberus.heimnetz.de (Postfix on SuSE Linux 7.0 (i386)) with ESMTP id 09AA71721C for ; Thu, 15 Nov 2007 18:17:11 +0100 (CET) Message-ID: <473C7F2B.5070409@apache.org> Date: Thu, 15 Nov 2007 18:17:31 +0100 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071030 SeaMonkey/1.1.6 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: httpd/sandbox/amsterdam/d/modules/proxy/mod_serf.c?revision=595110&view=markup References: <99EA83DCDE961346AFA9B5EC33FEC08B05B232@VF-MBX11.internal.vodafone.com> In-Reply-To: X-Enigmail-Version: 0.95.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 11/15/2007 04:26 PM, Jim Jagielski wrote: > > On Nov 15, 2007, at 7:02 AM, Pl�m, R�diger, VF-Group wrote: > >> >> @@ -567,8 +567,21 @@ >> return APR_SUCCESS; >> } >> >> - if (mode == AP_MODE_EATCRLF || mode == AP_MODE_EXHAUSTIVE || >> - mode == AP_MODE_SPECULATIVE) { >> + if (mode == AP_MODE_SPECULATIVE) { >> + const char *data; >> + apr_size_t len; >> + apr_bucket *b; >> + serf_bucket_t *sb; >> + >> + ctx->serf_bucket_status = serf_bucket_read(ctx->serf_in_bucket, >> + readbytes, &data, >> &len); >> + >> + sb = serf_bucket_simple_create(data, len, NULL, NULL, >> ctx->serf_bkt_alloc); >> + serf_bucket_aggregate_prepend(ctx->serf_in_bucket, sb); >> >> Hm. Don't we need the following lines here? >> >> b = apr_bucket_transient_create(data, len, f->c->bucket_alloc); >> APR_BRIGADE_INSERT_TAIL(bb, b); >> >> Otherwise I guess we read the data but do not return it :-). >> >> > > I don't follow that, but I'm still not quite fully awake yet... Well, as far as I understand AP_MODE_SPECULATIVE its purpose is to read data and return it to the caller, but leave the data in the input filter chain such that a following read (or better a get_brigade) from the input filter chain returns the same data again. And in the case above we only read the data from ser_in_bucket, but unlike in the AP_MODE_READBYTES case we do not create a transient bucket with data and add it to the bb brigade. So the caller gets back an empty brigade with no data. Regards R�diger