I set the PerlSendHeader to 'off' in my httpd.conf configuration but i am still getting a content-type header printed out by apache. Under mod_perl this test script outputs to my browser the following:
Content-type:image/gif
Here's my test.cgi script which is inside my mod_perl directory (/home/httpd/perl/).
#!/usr/bin/perl -w use strict; if ($ENV{'MOD_PERL'}){ print "Content-type:image/gif\n\n"; #my image output will go here }else{ print "Content-type:text/html\n\n"; print "MOD_PERL is off"; } exit;
And here's my httpd.conf settings.
<IfModule mod_perl.c> Alias /perl/ /home/httpd/perl/ <Location /perl> SetHandler perl-script PerlHandler Apache::Registry Options +ExecCGI PerlSendHeader off </Location> </IfModule>
I restarted apache and did a killall -HUP apache. As you can see by the output of the script, mod_perl is working. I'm running mod_perl/1.23. Anybody have any ideas on how i can fix this? I'd like to be able to output more than just text/html files with mod_perl.

thanks monks,
james

p.s. i tried "PerlSendHeader off" and "PerlSendHeader Off"


In reply to mod_perl Content Header Output with PerlSendHeader off by true
in thread Mod Perl Content Header Output by Sarq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.