> I think you're looking for the 'Content-disposition' header here.  By
> setting it to inline, it suggests to the browser to view it inline,
> instead of prompting to save it.

I've had success using the following header:

Content-Type: application/octetstream\n
Content-Disposition: attachment; filename=$filename\n\n

> The problem with the above CGI::App behaviour not being documented is that
> it can dissapear.  I really feel that there are cases where it's necessary
> to send stuff to the browser from within the run_mode, and I feel yours is
> a valid one.  I hope Jesse will leave the functionality in there, or
> perhaps even make it easier by making an accessor method for it :-)

You should be able to use the argument of 'none' to the CGIApp header_type()
method.

e.g.   $self->header_type('none');

This functionality was added to CGIApp v3.1 on June 2nd. Something along the
lines of the following should do the trick:

-------------------
my $filename= 'the_pdf_file.pdf";
my $output = get_pdf_contents();
my $header= "Content-Type: application/octetstream\n";
     $header .= "Content-Disposition: attachment; filename=$filename\n\n";

$self->header_type('none');
return $header.$output;
---------------


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to