Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Sending non-html files to a browser through a script

by TheoPetersen (Priest)
on Aug 15, 2001 at 17:55 UTC ( #105044=note: print w/ replies, xml ) Need Help??


in reply to Sending non-html files to a browser through a script

This should just be a matter of setting the right content header and sending the bytes along. Make sure your script hasn't sent any other content type headers.

my $pdf = slurp("file.pdf"); # Contains the whole PDF file print "Content-type: application/pdf\n\n$pdf";


Comment on Re: Sending non-html files to a browser through a script
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://105044]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2015-07-30 01:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls