Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 15305 invoked from network); 3 Nov 2009 20:44:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Nov 2009 20:44:47 -0000 Received: (qmail 7524 invoked by uid 500); 3 Nov 2009 20:44:44 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 7492 invoked by uid 500); 3 Nov 2009 20:44:44 -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 7483 invoked by uid 99); 3 Nov 2009 20:44:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 20:44:43 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mearns.b@gmail.com designates 209.85.218.221 as permitted sender) Received: from [209.85.218.221] (HELO mail-bw0-f221.google.com) (209.85.218.221) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 20:44:33 +0000 Received: by bwz21 with SMTP id 21so8010423bwz.24 for ; Tue, 03 Nov 2009 12:44:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=3cL11BAHRa6tBsmtiTUg16B2elvK4rhzlvWni0HGwTA=; b=xsSCIZtHZW8VHXIqJc1RJylB2gf6vn+XnjeVFhWgdrz5rX7twHirQj98IHxS17W6pQ EIg1Rki7MFkrGTpijipDrIZ9lt/iGyQq8f6U09bJP5Kbi20wz87c+jhKHrQse5tNiYn/ GvooUinxyQjkD5N9MKEBQQm1PgbXJgMU0H3BI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=YuCyfiFdKb6brsH0DK4crGbW+mGsnH9zwrDBM1QTks/QyYEls9TW9wVMLAcWZDv6P0 HebCglGpnyFYQr0gN0WlE1c+V2mN372lsdIOyEB1dhUoP57ObF0ci8AgG42KmegfjLhC xKMhlPQHid0oI9Si4xFNhUAiydBimBl/xiWD4= MIME-Version: 1.0 Received: by 10.204.150.81 with SMTP id x17mr501217bkv.73.1257281053599; Tue, 03 Nov 2009 12:44:13 -0800 (PST) In-Reply-To: <6a5aad1a0911031206xe2d72f2k777aa143228f7161@mail.gmail.com> References: <6a5aad1a0911031120n44e0f1a7r66daea6157024f91@mail.gmail.com> <20091103202610.63f2bdc7.rambo@id.uw.edu.pl> <4df3a1330911031132m6aa8c896pa01223811b537a49@mail.gmail.com> <6a5aad1a0911031206xe2d72f2k777aa143228f7161@mail.gmail.com> From: Brian Mearns Date: Tue, 3 Nov 2009 15:43:53 -0500 Message-ID: <4df3a1330911031243v69b224bw4f914abd36538eef@mail.gmail.com> To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] pdf report generation - content type text/html On Tue, Nov 3, 2009 at 3:06 PM, b k wrote: > Thanks!! Actually, it's a java based app on the WebSphere app server that > sends the response to Apache web server which in turn sends the response = to > the browser. I tested the reports directly on the App server which are > working fine. I suspect something is wrong in the apache config. I also > checked mime.types file which includes pdf entry. > > On Tue, Nov 3, 2009 at 2:32 PM, Brian Mearns wrote: >> >> On Tue, Nov 3, 2009 at 2:26 PM, Marcin 'Rambo' Roguski >> wrote: >> > On Tue, 3 Nov 2009 14:20:27 -0500 >> > b k wrote: >> > >> >> Hi all, >> >> PDF reports are not being generated on any browser. [...]Any help wou= ld >> >> be greatly >> >> appreciated!!!! >> > >> > Send Content-Type: application/pdf or application/octet-stream from yo= ur >> > PDF generator >> > text/html is just plain wrong. >> > >> > -- >> > Maslow's Maxim: >> > =A0 =A0 =A0 =A0If the only tool you have is a hammer, you treat everyt= hing like >> > =A0 =A0 =A0 =A0a nail. >> > >> >> Well what's generating the PDF's? If they're coming from a file, you >> need to configure Apache to correctly detect the mime type (as with >> mod_mime: http://httpd.apache.org/docs/2.2/mod/mod_mime.html). Or if >> they're all accessed through a particular root URL (like >> /reports/pdf/), you can use the tag and ForceType: >> http://httpd.apache.org/docs/2.2/mod/core.html#forcetype. >> >> If it's being generated by a server side script, you can try the above >> method, or better, just get your script to generate the >> correct Content-Type header. If you're using PHP, the default mime >> type if you don't say otherwise is usually text/html, as you found, >> but you can use the header() function to send the CT header like: >> header("Content-Type: application/pdf"). >> >> -Brian >> >> -- >> Feel free to contact me using PGP Encryption: >> Key Id: 0x3AA70848 >> Available from: http://keys.gnupg.net It sounds like you're saying you get the correct content-type header if you communicate directly with the app server, and that Apache is blowing it away? That's quite odd, but you might still try the tag or similar to match the URL's the reports are accessed by, and then use ForceType. I'm not sure if Apache will replace an existing Content-Type header in this case, but it's worth a try. -Brian --=20 Feel free to contact me using PGP Encryption: Key Id: 0x3AA70848 Available from: http://keys.gnupg.net --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org