Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0E5BB9699 for ; Fri, 13 Jan 2012 16:25:08 +0000 (UTC) Received: (qmail 24594 invoked by uid 500); 13 Jan 2012 16:25:07 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 24568 invoked by uid 500); 13 Jan 2012 16:25:06 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 24560 invoked by uid 99); 13 Jan 2012 16:25:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2012 16:25:05 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of martin.townsend@power-oasis.com designates 81.19.188.97 as permitted sender) Received: from [81.19.188.97] (HELO geode.123-dns.net) (81.19.188.97) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2012 16:24:59 +0000 Received: from host81-134-101-164.in-addr.btopenworld.com ([81.134.101.164] helo=[172.27.104.125]) by geode.123-dns.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1Rljvg-0006vH-Vt for modules-dev@httpd.apache.org; Fri, 13 Jan 2012 16:24:37 +0000 Message-ID: <4F105AC3.8060104@power-oasis.com> Date: Fri, 13 Jan 2012 16:24:35 +0000 From: Martin Townsend Organization: Power Oasis User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: A few questions on Input Filters References: <6B61A030-4A68-4094-B244-E88C9261B097@apache.org> <4F0D6FCA.1010301@power-oasis.com> <4F0DC2EA.4030605@joe-lewis.com> In-Reply-To: <4F0DC2EA.4030605@joe-lewis.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - geode.123-dns.net X-AntiAbuse: Original Domain - httpd.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - power-oasis.com Thanks Joe for the info, my input filter is now behaving itself again. I've not seen any FLUSH buckets yet so I doubt I will as we are running the bare minimum of modules. I'll let you know if I do though. One last question, when I don't see the EOS bucket should I return a certain APR_ error code to say the POST request hasn't finished yet. I'm currently return APR_OK and this seems to work. Cheers, Martin. On 11/01/2012 17:12, Joe Lewis wrote: > On 01/11/2012 04:17 AM, Martin Townsend wrote: >> The problem occured when the POST request was split into two brigades >> which are passed independently to my filter. So my first question is >> this expected? > > You should definitely expect that. Don't assume that the entire > content will always come in the same way. In this kind of development > architecture (where anyone can build a module), we should expect the > unexpected. > >> I assume it is so I have to alter my filter to handle partial >> bucket brigades. >> If so, I take it I can infer a partial brigade by the fact that the >> EOS bucket is not present? >> Whilst looking through other input filters I notice they handle FLUSH >> buckets, for my input filter I take it I can ignore these buckets as >> all I'm trying to do is extract the POST data to a buffer and then >> process it without altering it. > > If the brigade doesn't have that EOS, there is more to the stream to > be read. When you see the FLUSH bucket, you should really be passing > the brigade on to the next chain (FLUSH buckets are created when the > brigade needs to be split). > > I had originally thought that FLUSH buckets were output buckets to > prevent the client from waiting too long. Are you seeing these on an > input chain? If so, what other modules are involved? I'm curious for > my own understanding of how other modules might effect some of the > stuff I have written. > >> I noticed that one module's input filter ignored sub requests, does >> anyone know when sub requests occur within the input filter phase and >> whether I can ignore these too. > > The input's have already been done when a sub request is created. > Usually, a sub request is happening when an output filter or a content > generator are being called, so I'm not sure a sub-request will see the > input from the parent filter. > >> >> Many Thanks, >> Martin. > > That is what the list is for. Hope you can get things straightened out! > Joe Lewis > -- > www.silverhawk.net