Return-Path: X-Original-To: apmail-apr-dev-archive@www.apache.org Delivered-To: apmail-apr-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98698DDCC for ; Fri, 21 Sep 2012 10:43:12 +0000 (UTC) Received: (qmail 95816 invoked by uid 500); 21 Sep 2012 10:43:11 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 95295 invoked by uid 500); 21 Sep 2012 10:43:05 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 95264 invoked by uid 99); 21 Sep 2012 10:43:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2012 10:43:03 +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: 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 10:42:56 +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 q8LAgXll022432 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=OK) for ; Fri, 21 Sep 2012 12:42:33 +0200 Message-ID: <505C4468.5030604@bulb.hr> Date: Fri, 21 Sep 2012 12:41:44 +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: dev@apr.apache.org Subject: Input filters that alter content-length 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-Virus-Checked: Checked by ClamAV on apache.org 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 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)); or apr_table_unset(f->r->headers_in, "Content-Length"); Best regards Ivan