mach 2003/10/29 13:42:53
Modified: lib/Apache/AxKit Tag: axkit-pipeline-2 Pipeline.pm lib/Apache/AxKit/Pipeline Tag: axkit-pipeline-2 Cache.pm Transformer.pm t/conf Tag: axkit-pipeline-2 extra.last.conf.in Added: t/htdocs/pipeline/gzip Tag: axkit-pipeline-2 01.xml t/htdocs/style/pipeline/gzip Tag: axkit-pipeline-2 01.xsl t/pipeline Tag: axkit-pipeline-2 04gzip.t Log: Gzip tests and fixes. Revision Changes Path No revision No revision 1.1.2.5 +6 -0 xml-axkit/lib/Apache/AxKit/Attic/Pipeline.pm Index: Pipeline.pm =================================================================== RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Attic/Pipeline.pm,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- Pipeline.pm 27 Oct 2003 22:42:16 -0000 1.1.2.4 +++ Pipeline.pm 29 Oct 2003 21:42:53 -0000 1.1.2.5 @@ -61,6 +61,7 @@ if(@_) { if($self->{'upstream'}) { # Allow pipelines to be treated as one object + $self->{'upstream'}->upstream( shift ) } else { $self->{'upstream'} = shift; @@ -166,6 +167,11 @@ if (ref($r) eq 'AxKit::Apache') { bless $r, 'Apache'; tie *STDOUT, 'Apache', $r; + } + + if( $AxKit::Cfg->DoGzip() ) { + AxKit::Debug(4, "Gzipping output."); + ${$bytes} = Compress::Zlib::memGzip( ${$bytes} ); } AxKit::Debug(4, "delivering to browser"); No revision No revision 1.1.2.2 +5 -0 xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Cache.pm Index: Cache.pm =================================================================== RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Cache.pm,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- Cache.pm 20 Oct 2003 20:58:01 -0000 1.1.2.1 +++ Cache.pm 29 Oct 2003 21:42:53 -0000 1.1.2.2 @@ -243,6 +243,11 @@ tie *STDOUT, 'Apache', $r; } + if( $AxKit::Cfg->DoGzip() ) { + AxKit::Debug(4, "Gzipping output."); + ${$bytes} = Compress::Zlib::memGzip( ${$bytes} ); + } + AxKit::Debug(4, "delivering to browser"); $r->header_out('Content-Length' => length(${$bytes})); $r->send_http_header(); 1.1.2.2 +1 -7 xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Transformer.pm Index: Transformer.pm =================================================================== RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Pipeline/Attic/Transformer.pm,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- Transformer.pm 20 Oct 2003 20:58:01 -0000 1.1.2.1 +++ Transformer.pm 29 Oct 2003 21:42:53 -0000 1.1.2.2 @@ -40,13 +40,7 @@ $str = $transformer->( ${$str_ref} ); } - if($AxKit::Cfg->DoGzip()) { - # DoGzip does stuff to $r headers if it returns true - AxKit::Debug(4, "Transformer[$stage]: Gzipping output."); - $str = Compress::Zlib::memGzip( $str ) ; - } - - return $str; + return \$str; } sub stylesheet_exists{ 0; } No revision No revision 1.7.2.5 +9 -0 xml-axkit/t/conf/extra.last.conf.in Index: extra.last.conf.in =================================================================== RCS file: /home/cvs/xml-axkit/t/conf/extra.last.conf.in,v retrieving revision 1.7.2.4 retrieving revision 1.7.2.5 diff -u -r1.7.2.4 -r1.7.2.5 --- extra.last.conf.in 27 Oct 2003 22:42:16 -0000 1.7.2.4 +++ extra.last.conf.in 29 Oct 2003 21:42:53 -0000 1.7.2.5 @@ -138,6 +138,7 @@ <Location "/pipeline/cache/01.xml"> SetHandler axkit AxNoCache off + AxGzipOutput On AxCacheDir .cache PerlSetVar AxCacheDebugHeaders 1 AxResetProcessors @@ -182,3 +183,11 @@ AxAddProcessor application/xsp NULL AxResetProcessors </Location> + +<Location "/pipeline/gzip/01.xml"> + SetHandler axkit + AxResetProcessors + AxAddProcessor text/xsl /style/pipeline/gzip/01.xsl + AxGzipOutput On +</Location> + No revision No revision 1.1.2.1 +2 -0 xml-axkit/t/htdocs/pipeline/gzip/Attic/01.xml No revision No revision 1.1.2.1 +9 -0 xml-axkit/t/htdocs/style/pipeline/gzip/Attic/01.xsl No revision No revision 1.1.2.1 +38 -0 xml-axkit/t/pipeline/Attic/04gzip.t