You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Ben Cottrell <be...@stockmaster.com> on 2000/10/02 21:38:19 UTC

Re: Question on Apache::Compress

On Mon, 2 Oct 2000 15:28:09 -0400 (EDT), kevin montuori wrote:
>   bc> Static .html files aren't compressed at all (but do come through
>   bc> as text/html).
>       
>       do you have 
> 
>         SetHandler perl-script
> 
>       in there somewhere?

Kevin,

This fixes static html completely! It's compressed, and also comes
through as text/html. Thanks very much!!

perl scripts are still coming through as compressed (which is good)
text/plain (which is bad). Umm. Who has control over the content-type?
I thought the perl script itself did (i.e. print "Content-Type: text/html\n\n")
but I can't find that anywhere in our perl code (I'm not the one who writes
the scripts, so I don't know the code... I'm just responsible for apache).
Is there any other possible way the content type would have been getting
set, previously, that might be broken with the addition of Apache::Compress?

Thanks again :-)

	~Ben

Re: Question on Apache::Compress

Posted by kevin montuori <mo...@arrakisplanet.com>.
>>> Ben Cottrell writes:

  bc> This fixes static html completely! It's compressed, and also
  bc> comes through as text/html. Thanks very much!!
  
      no problem.  i've been doing a lot of this myself lately.


  bc> perl scripts are still coming through as compressed (which is
  bc> good) text/plain (which is bad). Umm. Who has control over the
  bc> content-type?  

      the script; however, if you're compressing everything your
      script sends to STDOUT, you're compressing your headers too.
      (the first thing on your browser's screen is most likely
      Content-type: text/html.)  instead have your developers do
      something like:

        my $r = shift;
        $r->content_type('text/html');
  

      just as a by the way, i've been having a small problem with this 
      configuration (see the mail i sent to the list earlier today).  

      cheers,
      k.

-- 
kevin montuori

support independent booksellers -- http://www.booksense.com