Tom Schindl wrote:
Hi,

why are you not using the header functions provided by mod_perl, the
problem you're having is described here:

http://perl.apache.org/docs/2.0/user/coding/coding.html#Generating_HTTP_Response_Headers


Things used here: http://perl.apache.org/docs/2.0/api/APR/Table.html#C_set_ http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html#C_headers_out_

-----------------------------8<-----------------------------
my $r = Apache->request;
$r->content_type("text/html");

$r->headers_out->set("Expires", "Mon, 26 Jul 1997 05:00:00 GMT");
$r->headers_out->set("Last-Modified", gmtime(time) . " GMT");
$r->headers_out->set("Cache-Control", "no-cache");
$r->headers_out->set("Cache-Control", "post-check=0, pre-check=0");
$r->headers_out->set("Pragma", "no-cache");
$r->headers_out->set("Character-Set", "windows-1251");
$r->headers_out->set("Content-Type", "text/html;charset=windows-1251");

The very first URL, that you've quoted Tom, mentions that for certain headers you ought to use special Apache methods. Which is the case for content_type, no_cache and a few others. Apache does more things than just setting those headers. Your suggestion may work in a simple case, but not in a more complex setup.


The only time when you want to use your own headers for everything is when you send non-parsed headers responses, which are also mentioned in that section.

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to