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 8A87799F5 for ; Wed, 29 Feb 2012 08:15:11 +0000 (UTC) Received: (qmail 73357 invoked by uid 500); 29 Feb 2012 08:15:11 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 73091 invoked by uid 500); 29 Feb 2012 08:15:03 -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 72962 invoked by uid 99); 29 Feb 2012 08:14:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Feb 2012 08:14:59 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sorinm@gmail.com designates 209.85.214.45 as permitted sender) Received: from [209.85.214.45] (HELO mail-bk0-f45.google.com) (209.85.214.45) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Feb 2012 08:14:49 +0000 Received: by bkcjg9 with SMTP id jg9so3465854bkc.18 for ; Wed, 29 Feb 2012 00:14:29 -0800 (PST) Received-SPF: pass (google.com: domain of sorinm@gmail.com designates 10.204.133.210 as permitted sender) client-ip=10.204.133.210; Authentication-Results: mr.google.com; spf=pass (google.com: domain of sorinm@gmail.com designates 10.204.133.210 as permitted sender) smtp.mail=sorinm@gmail.com; dkim=pass header.i=sorinm@gmail.com Received: from mr.google.com ([10.204.133.210]) by 10.204.133.210 with SMTP id g18mr10971068bkt.107.1330503269415 (num_hops = 1); Wed, 29 Feb 2012 00:14:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=4+KYUaaabKhxVqA6NSa5fzSy+KIUVg1J0VkQnWbuZWU=; b=Dj1rX1VFXcgci0ghn4PLmHJHXb7zlgyB06WtSSaF5MhGGSAjYnIj+2+GhwncTaLXlA WzFkRMW5QntJIfttpSJsHemgzhNippMCa1MKEGL/i0PFNS20RdBzA50Niu14IvFZhW67 ouTB53XNj3HPaIhGMTqtaSKPJCQDbxcyKW9qs= Received: by 10.204.133.210 with SMTP id g18mr8889176bkt.107.1330503269312; Wed, 29 Feb 2012 00:14:29 -0800 (PST) Received: from [192.168.2.204] (ant06-1-82-242-109-184.fbx.proxad.net. [82.242.109.184]) by mx.google.com with ESMTPS id e13sm35655558bku.12.2012.02.29.00.14.26 (version=SSLv3 cipher=OTHER); Wed, 29 Feb 2012 00:14:27 -0800 (PST) Message-ID: <4F4DDE5B.9020906@gmail.com> Date: Wed, 29 Feb 2012 09:14:19 +0100 From: Sorin Manolache User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120216 Icedove/8.0 MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: about setting r->headers_out References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 02/29/12 07:52, Rui Hu wrote: > hi, > > I want to set "Content-Type" and "Cache-Control" fields in my private > module. So I hooked fixups and used apr_table_setn to set > r->headers_out but nothing happened. Was it thought through? > > Thanks for you help! Try to set r->err_headers_out. For content-type you could check the configuration directive DefaultType. You could also set Cache-Control with the Headers directive. Check its "always" option too. You can also combine the Headers directive with environment variables set in r->subprocess_env. Check http://httpd.apache.org/docs/2.0/mod/mod_headers.html#header Regards, Sorin