Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Print to Browser Headers Not Working

by aitap (Deacon)
on Feb 27, 2013 at 15:56 UTC ( #1020916=note: print w/replies, xml ) Need Help??

in reply to Print to Browser Headers Not Working

What HTTP server do you run with this Perl script? This looks like a server setup problem. (more info: Common Gateway Interface, CGI)
Sorry if my advice was wrong.
  • Comment on Re: Print to Browser Headers Not Working

Replies are listed 'Best First'.
Re^2: Print to Browser Headers Not Working
by tobyink (Abbot) on Feb 27, 2013 at 17:04 UTC

    In particular I suspect the OP isn't accessing the script through an HTTP server at all, but perhaps saving the script output to a file and opening it.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re^2: Print to Browser Headers Not Working
by Anonymous Monk on Feb 27, 2013 at 16:27 UTC
Re^2: Print to Browser Headers Not Working
by Loops303 (Novice) on Feb 27, 2013 at 17:12 UTC

    I'm a newb so please forgive me. I'm running the apache server that comes with OS X.

    Since I posted this question, I found a PHP script that does a download (example that comes with files, etc.) and it worked through the browser. It seems that perl is at issue, and all the headers are just not working.

    And I tried the content disposition and content type together, and individually, and the same result happens: it prints the output to the browser.

    Any tips on how to configure the server?

    Thank you.

      What aitap said sounds like it might be right to me. Webservers can be (Apache often is?) set up to send their own headers and since headers can only go once your CGI headers are printed as content.

        Thanks Everyone! The links you sent helped me figure it out --- needed to add

        PerlSendHeader On

        To the .conf file

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020916]
and the leaves swirl about...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2017-12-15 16:12 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (438 votes). Check out past polls.