On 1/29/03 at 4:48 PM, [EMAIL PROTECTED] (Matt Sergeant) wrote:
> On Wed, 29 Jan 2003, Bill McCabe wrote:
>
> > On 1/28/03 at 8:30 PM, [EMAIL PROTECTED] (Matt Sergeant) wrote:
> >
> > > On Tuesday, Jan 28, 2003, at 20:06 Europe/London, Bill McCabe wrote:
> > >
> > > > Hi All,
> > > >
> > > > I've put together an xpathscript setup that generates reports from
> > > > database
> > > > extracts. My xps file looks at GET args to determine whether to output
> > > > an html
> > > > file or a PDF (eg. ".../report.xml?ss=pdf"). Up until today I've kept
> > > > caching
> > > > off and everything has been fine. Now that I've turned it with
> > > > AxGzipOutput on
> > > > only returns the cached version and ignores the args. I realize this
> > > > is exactly
> > > > what I should have expected had I thought it through. Anyone know of a
> > > > workaround for this situation, or am I going to need to use identical
> > > > differently named xml files for different output styles so the cache
> > > > can keep
> > > > theem sorted out?
> > >
> > > http://axkit.org/wiki/view/AxKit/Apache::AxKit::Plugin::QueryStringCache
> > >
> > > Matt.
> > >
> >
> > When AxKit returns the cached PDF it defaults to the text/html content-type.
> How
> > can I remind it that the content-type should be application/pdf?
>
> It should know... Are you sure this isn't an IE bug?
>
No, I do all my development using Mozilla (1.1 on linux) as the client. I just
turned caching back on, and tested it with IE (v5) on NT and got the same result
- pdf displayed as html "%PDF-1.3...".
my ax dir is configed with:
Alias /ax "/usr/local/web-dev/PRS/htdocs/ax/"
<Directory /usr/local/web-dev/PRS/htdocs/ax>
SetHandler perl-script
PerlHandler AxKit
AxDebugLevel 3
AxAddPlugin Apache::AxKit::Plugin::QueryStringCache
AxGzipOutput On
AxAddStyleMap application/x-xpathscript
Apache::AxKit::Language::XPathScript
Deny from all
Allow from .....
</Directory>
and my .xps file sends out the generated pdf with:
my $pdffile = $pdf->get_buffer();
$r->headers_out->set('Content-Disposition' => "inline; filename=$outfilename");
$r->content_type( 'application/pdf' );
print $pdffile;
There are no errors in the error log.
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]