[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    Re: [Mason] using Apache::Compress with Mason?
From:       "Ken Williams" <ken () forum ! swarthmore ! edu>
Date:       2000-11-22 3:31:08
[Download RAW message or body]

cunctator@apartia.ch (Louis-David Mitterrand) wrote:
>I'm trying to get Apache::Compress and Mason to play well together,
>without success. In httpd.conf I have:
>
>PerlModule Apache::Filter
><Files *.md>
>	PerlSetVar Filter on
>	PerlHandler HTML::Mason Apache::Compress
></Files>
>
>but the output is still not compressed, the content header doesn't
>appear as "gzip". My lack of understanding of the the Filter model must
>be part of the problem.

Louis-David and I figured out off-line that HTML::Mason did not fully
support the Apache::Filter model.  The following patch gives partial
support. Line numbers in the patch may not match exactly, since this is
against the latest cvs version.  Might want to apply it by hand, it's at
the beginning of the handle_request() method.

----------------------------------------------------------------
--- ApacheHandler.pm    2000/11/22 03:23:09     1.72
+++ ApacheHandler.pm    2000/11/22 03:24:18
@@ -285,6 +285,10 @@
     my $interp = $self->interp;
     $self->{request_number}++;
 
+    if (lc($apreq->dir_config('Filter')) eq 'on') {
+       $apreq = $apreq->filter_register;
+    }
+
     #
     # Construct (and truncate if necessary) the request to log at start
     #
----------------------------------------------------------------

CVS log for this patch is:

Added a bit of code that improves compatibility with Apache::Filter.
Mason can now be used as a "pre-filter", i.e. configurations like the
following will work:

  PerlHandler HTML::Mason Apache::Compress

The following will still not work, however:

  PerlHandler Blah::GenerateComponentCode HTML::Mason

Full compliance with Apache::Filter is expected in a future release.


  -------------------                            -------------------
  Ken Williams                             Last Bastion of Euclidity
  ken@forum.swarthmore.edu                            The Math Forum
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/mason-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic