Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9A757DD98 for ; Fri, 21 Sep 2012 11:35:40 +0000 (UTC) Received: (qmail 11135 invoked by uid 500); 21 Sep 2012 11:35:37 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 10507 invoked by uid 500); 21 Sep 2012 11:35:32 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 10458 invoked by uid 99); 21 Sep 2012 11:35:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 11:35:31 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [195.190.10.232] (HELO mail.bulb.hr) (195.190.10.232) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 11:35:22 +0000 Received: from [192.168.100.38] (bulbdoab.iskon.hr [213.191.139.77]) (authenticated bits=0) by mail.bulb.hr (5/8.14.4) with ESMTP id q8LBZ1wU031823 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=OK) for ; Fri, 21 Sep 2012 13:35:01 +0200 Message-ID: <505C50B4.9010307@bulb.hr> Date: Fri, 21 Sep 2012 13:34:12 +0200 From: Ivan Prostran User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on ravel.bulb.hr X-Old-Spam-Status: No, score=-1.0 required=20.0 tests=ALL_TRUSTED, T_DATE_IN_FUTURE_96_Q autolearn=disabled version=3.3.1 Subject: [users@httpd] Input filters that alter content-length Hi, I have the following scenario : - Apache/2.2.19 (Solaris 10 SPARC) SetInputFilter alterxmlbody (AP_FTYPE_RESOURCE) SetHandler weblogic-handler The handler forwards requests to multiple weblogic servers and the filter itself analyzes and/or changes the POST data in a way that the length of the incoming request may be changed. The question is : What is the proper and legitimate way to deal with this situation? Should the input filter set the new CL value in "headers_in" before returning from the callback, or just remove it from the list? apr_off_t length; apr_brigade_length (bb,1,&length); apr_table_setn(f->r->headers_in, "Content-Length", apr_off_t_toa(f->r->pool, length)); Unfortunately, this approach breaks the pipeline because sometimes the filter needs to buffer data over more than one call. or apr_table_unset(f->r->headers_in, "Content-Length"); Best regards Ivan --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org