Thread

Posted on Fri Mar 30 02:37:45 2007 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 Fri Mar 30 13:22:13 2007 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 Sun Apr 1 13:15:15 2007 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
Write a response