Re: Deflate problem

Fred Moyer <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Please cc the list on your responses so that others can help answer in
the event this scratch off lottery ticket here next to me has a big
prize and I take off on vacation ;)

For what it is worth, it looks like your code example contained a
response handler and output filter in the same subroutine.  You
probably want to revisit the filter documentation on perl.apache.org.
For instance, you set a content length header from $f; I don't know
too many filters that know ahead of time what the length of the
response will be until it is filtered.

On Thu, May 19, 2011 at 11:23 AM, Idel Fuschini <[email protected]> wrote:
> yes the result is the same.
>
> On 19 May 2011 19:52, Fred Moyer <[email protected]> wrote:
>>
>> Have you tried mod_deflate?
>>
>> On Sat, May 7, 2011 at 3:30 AM, Idel Fuschini <[email protected]>
>> wrote:
>> > Hi people,
>> > I've got this problem with DEFLATE.
>> > This is my code example :
>> >   use strict;
>> >   use warnings;
>> >   use Apache2::Filter ();
>> >   use Apache2::RequestRec ();
>> >   use APR::Table ();
>> >   use Cache::FileBackend;
>> >   use Apache2::Const -compile => qw(OK);
>> >   use constant BUFF_LEN => 1024;
>> >   use vars qw($VERSION);
>> >   sub handler {
>> >       unless ($f->ctx) {
>> >           $f->r->headers_out->unset('Content-Length');
>> >           $f->ctx(1);
>> >       }
>> >
>> >       my $Hash=$f->r->subprocess_env();
>> >       my $html_page="<b>hello</b>";
>> >       my $content_type="text/html";
>> >       my $len_bytes=length $html_page;
>> >       $f->r->headers_out->set("Content-Length"=>$len_bytes);
>> >       $f->r->headers_out->set("Last-Modified" => time());
>> >       $f->r->content_type($content_type);
>> >       $f->print($html_page);
>> >       return Apache2::Const::OK;
>> >   }
>> > This is my configuration on httpd.conf;
>> > <Location /WSDeflate/*>
>> >    PerlSetOutputFilter DEFLATE
>> >    PerlSetOutputFilter INCLUDES
>> >    SetHandler modperl
>> >    PerlOutputFilterHandler Apache2::AMFWebService
>> >    Allow from all
>> > </Location>
>> > I don't have any response on my browser, why ?
>> > Thanks
>> > Idel
>> > =====================
>> > Mobile: +39 349 442 2668
>> > E-Mail: [email protected]
>> > Web Site: http://www.idelfuschini.it
>> > OpenSource Project: Apache Mobile Filter -
>> > http://www.idelfuschini.it/apache-mobile-filter-v2x.html
>> > Test Page:  http://www.apachemobilefilter.org/test/php_test.php
>> > Mobile Test Page:  http://www.apachemobilefilter.org
>> > ------
>> > La presente comunicazione ed i suoi allegati e' destinata esclusivamente
>> > ai destinatari. Qualsiasi suo utilizzo, comunicazione o diffusione non
>> > autorizzata
>> > e' proibita. Se ha ricevuto questa comunicazione per errore, la
>> > preghiamo di
>> > darne
>> > immediata comunicazione al mittente e di cancellare tutte le
>> > informazioni
>> > erroneamente acquisite. (Rif. D.Lgs. 196/2003). Grazie
>> >
>> > This message and its attachments are intended only for use by the
>> > addressees. Any use,
>> > re-transmission or dissemination not authorized of it is prohibited. If
>> > you
>> > received
>> > this e-mail in error, please inform the sender immediately and delete
>> > all
>> > the material.
>> > (Rif. D.Lgs. 196/2003). Thank you.
>> >
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.