Posted on 2007-03-29 23:37:45-07 by cpetercpan
mail notification unusable if web page compressed
Hi, if a server compresses data (e.g. with mod_gzip) then web pages are cached and notified as are (with version 0.126).
Direct Responses: 4720 | Write a response
Posted on 2007-03-30 10:22:13-07 by cpetercpan in response to 4717
Re: mail notification unusable if web page compressed
workaround (in webmon.pl):
my $mon = WWW::Monitor->new('MAIL_CALLBACK'=>\&notify,'CACHE'=>$cache); #Initializing ... $mon->add_header( 'Accept-Encoding' => 'identity' ); ## gzip workaround : "identity" means unenco +ded content
I think a better solution would be (in WWW::Monitor(::Task)) to accept gzip data and to ungzip it if encoded (before using Text::Diff).
Direct Responses: 4736 | Write a response
Posted on 2007-04-01 10:15:15-07 by yaron in response to 4720
Re: mail notification unusable if web page compressed
Thanks, This is a problem. In my opinion, Monitor should not perform any data manipulation. From that reason the use of Text::Diff is wrong. Here is my suggestion: WWW::Monitor::Task will not be depended at all on Text::Diff. The data will be cached in its original state ( in this case compressed). Task class will be equiped with methods thatr will enable the caller to indentify the data and uncompress it. In this way The module will be able to even other types of data. Is this acceptable? Yaron Kahanovitch
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.