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 91B4E9C6A for ; Wed, 29 Feb 2012 10:02:55 +0000 (UTC) Received: (qmail 70245 invoked by uid 500); 29 Feb 2012 10:02:55 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 70187 invoked by uid 500); 29 Feb 2012 10:02:54 -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 70174 invoked by uid 99); 29 Feb 2012 10:02:54 -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 10:02:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tchrbupt@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 10:02:46 +0000 Received: by bkcjg9 with SMTP id jg9so3577198bkc.18 for ; Wed, 29 Feb 2012 02:02:25 -0800 (PST) Received-SPF: pass (google.com: domain of tchrbupt@gmail.com designates 10.204.15.205 as permitted sender) client-ip=10.204.15.205; Authentication-Results: mr.google.com; spf=pass (google.com: domain of tchrbupt@gmail.com designates 10.204.15.205 as permitted sender) smtp.mail=tchrbupt@gmail.com; dkim=pass header.i=tchrbupt@gmail.com Received: from mr.google.com ([10.204.15.205]) by 10.204.15.205 with SMTP id l13mr4388394bka.99.1330509745950 (num_hops = 1); Wed, 29 Feb 2012 02:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iGq5E94iXJQsLxlgdDeEibb/Nfo4UpUB95z3yr0RUF0=; b=nUnWX//NRMLJL8OWPKjUFwBAHqJTKFrmd8VfkqOA6NeGwApdFu5J3sS4rzP5ixqkiZ f+I7tJ88dVJF7MwsBUtvXaM/bZdFkOyy3QI8gobK40IofFaO52n+dwNawS/7SGj+mWfF /ZyZaCsVt701KdA5lXjVb/i7L92S4W771gyhY= MIME-Version: 1.0 Received: by 10.204.15.205 with SMTP id l13mr3609339bka.99.1330509745836; Wed, 29 Feb 2012 02:02:25 -0800 (PST) Received: by 10.204.120.208 with HTTP; Wed, 29 Feb 2012 02:02:25 -0800 (PST) In-Reply-To: <4F4DDE5B.9020906@gmail.com> References: <4F4DDE5B.9020906@gmail.com> Date: Wed, 29 Feb 2012 18:02:25 +0800 Message-ID: Subject: Re: about setting r->headers_out From: Rui Hu To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=00151750e36cc5523204ba177008 X-Virus-Checked: Checked by ClamAV on apache.org --00151750e36cc5523204ba177008 Content-Type: text/plain; charset=ISO-8859-1 Thanks! I tried to hook "handler" and it works well. Rui Hu 2012/2/29 Sorin Manolache > 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 > -- Best regards, Rui Hu ---------------------------------------------------------------------------------------- State Key Laboratory of Networking & Switching Technology Beijing University of Posts and Telecommunications(BUPT) MSN: tchrbupt@gmail.com ----------------------------------------------------------------------------------------- --00151750e36cc5523204ba177008--