On Thu, 3 Oct 2002, Paul Simon wrote: > > How do HTTP headers work under Registery::ModPerl? > set up: windows2000 apache2.0.42 mod_perl/1.99_08-dev Perl/v5.8.0 > > I had to comment out the following in the CGI script: > > #print "Expires: " . time2str( time() + 432000 ) . "\n"; > #print "Content-type: text/html\n\n"; > > because it would print out as content to the browser?? > > This is in the conf file: > > Alias /standards/ "C:/Apache2/application/standards2/" > <Location "/standards/"> > SetHandler perl-script > PerlResponseHandler ModPerl::Registry > #PerlOptions +ParseHeaders > Options +ExecCGI > </Location> > > If somebody could point me in the right direction -> > > Thanks.
If you send the headers yourself, as, eg, print "Content-type: text/html\n\n"; in the script, then you should have PerlOptions +ParseHeaders in the relevant section. If you don't send the header yourself, Apache will send one for you, based on, in particular, the DefaultType setting. In this case you shouldn't have PerlOptions +ParseHeaders in that section. As you found, other combinations can lead to a double set of headers sent, resulting in one of them appearing in the browser. -- best regards, randy kobes