I'd hazard a guess that,
somewhere in the code,
some snippet is calling Apache::Compress->handler (as a class method)
which means that the string "Apache::Compress" is the first argument,
not the Apache::Request object you expect.

Try...

sub handler {
   my $r = shift;
print STDERR "r is a " . (ref $r) . " and caller is a " . (join "
",caller()) . "\n"

-----Original Message-----
From: Dirk Lutzebaeck [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 11, 2002 3:27 AM
To: [EMAIL PROTECTED]
Cc: Ken Williams; Sven Geisler
Subject: Can't locate object method "header_in" via package
"Apache::Compress"



Hi,

I get the following error sporadically on modperl 1.27 and apache
1.3.26 and Apache::Compress 1.003 either under RH7.x or Solaris 7:

Can't locate object method "header_in" via package "Apache::Compress"
(perhaps you forgot to load "Apache::Compress"?) at
/u1/lib/perl5/site_perl/5.6.1/Apache/Compress.pm line 14.

This is the handler from Apache::Compress.pm:

use strict;
use Compress::Zlib 1.0;
use Apache::File;
use Apache::Constants qw(:common);
use vars qw($VERSION);

sub handler {
  my $r = shift;

  my $can_gzip = $r->header_in('Accept-Encoding') =~ /gzip/;     # <----
line 14
  my $filter   = lc $r->dir_config('Filter') eq 'on';
  #warn "can_gzip=$can_gzip, filter=$filter";
  return DECLINED unless $can_gzip or $filter;

...

}

I have observed this more often on our solaris platform than on linux.

Any ideas?

Dirk

------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the designated 
recipient(s) named above.  If you are not the intended recipient of this message you 
are hereby notified that any review, dissemination, distribution or copying of this 
message is strictly prohibited.  This communication is for information purposes only 
and should not be regarded as an offer to sell or as a solicitation of an offer to buy 
any financial product, an official confirmation of any transaction, or as an official 
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or 
error-free.  Therefore, we do not represent that this information is complete or 
accurate and it should not be relied upon as such.  All information is subject to 
change without notice.


Reply via email to