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 7B0759A7F for ; Thu, 10 May 2012 11:20:01 +0000 (UTC) Received: (qmail 11609 invoked by uid 500); 10 May 2012 11:20:01 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 11581 invoked by uid 500); 10 May 2012 11:20:01 -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 11562 invoked by uid 99); 10 May 2012 11:20:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 11:20:00 +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 (athena.apache.org: domain of juliocarlos@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qc0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 May 2012 11:19:55 +0000 Received: by qcsc20 with SMTP id c20so1304616qcs.18 for ; Thu, 10 May 2012 04:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=0XqdR/XetiZkDhuXLHrM+17YUoiiQK/SY9VurIpHvBA=; b=dlNtCXB3MHx8fApUnpCG5gyz2ERP7TvWM3yxsgR4WWy5wytBjbqrim8Ay5ZIFg85jp WJMqYWISvIN2WBFXpUWgBc9TcPiRCpjEW+1sd6x7ii2JfCJ8rmCrVMjJCC5YWxgrAbz1 IMivbi8gRE9T3ci/scXUcy9YhUYCW8RYW/R3sOwnjmU4//lfMvLGuOKy8Vdxd0v1X7VB w/C0DIQevaGlh0BfuVs4uP6lPWxFCiNGhrBASPj2sQGQFTsZoxTqCT8GWupiJ/2XTO71 nby99L0zz7TMlyG8ZuGDIerl509L36b4YycNWcycM7RNXoa4RxS1xd+p+rNeF1lP/swO ONkA== Received: by 10.224.41.200 with SMTP id p8mr10961324qae.13.1336648774852; Thu, 10 May 2012 04:19:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.137.203 with HTTP; Thu, 10 May 2012 04:19:14 -0700 (PDT) In-Reply-To: <4FAB9A46.8060307@cord.dk> References: <4FAB9A46.8060307@cord.dk> From: Julio Carlos Barrera Juez Date: Thu, 10 May 2012 13:19:14 +0200 Message-ID: Subject: Re: about setting r->headers_out To: modules-dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org It worked for me! Thank you very much! I don't know why, but I was thinking this method changes the request "Content-Type", not the response one (it has no sense at all, sorry). Thank you very much Daniel! You solved my issue in 5 secs! Regards, Juilo. On 10 May 2012 12:36, Daniel Gruno wrote: > On 10-05-2012 12:25, Julio Carlos Barrera Juez wrote: >> Hi! >> >> I have the same problem than you, Rui Hu. I have an output filter that >> changes the body of the response, but then "content-type" header is >> changed to "text/plain", and I want to maintain the original >> "text/html". >> >> I have tried to use: >> >> apr_table_set(r->headers_out, "Content-Type", "text/html"); >> >> but it doesn't work. >> >> Can you show me what is your solution "hook handler"? I have only an >> input filter and an output filter in my module. I only change the >> request_rec filename to use other file on disk. > > Have you tried using ap_set_content_type(r, "text/html") instead? > I noticed that in its description, it says: > > "This function must be called to set r->content_type in order for the > AddOutputFilterByType directive to work correctly.", so it may be > related to your problem. > > With regards, > Daniel.