Re: Apache::Compress and Apache::Filter

2001-04-06 Thread Dirk Lutzebaeck

Ken Williams writes:
  Hi JR,
  
  I've been avoiding this bug to my peril.  Does the following patch fix it?
  
  =
  --- Filter.pm   2000/12/20 03:43:44 1.16
  +++ Filter.pm   2001/04/06 05:05:24
  @@ -120,8 +120,8 @@
   
   sub send_fd {
 my $self = shift;
  -  if ($self-is_last_filter) {
  +  if ($self-is_last_filter and !Universal::isa($_[0], ref $self)) {
   $self-SUPER::send_fd(@_);
 } else {
   my $fd = shift;
  =
  
  The bug occurs when the client doesn't support gzip, and you're using
  Apache::Filter, and Apache::Compress is the final filter in the chain.

Ken, would you mind to put a new version onto cpan if it works. I had
the problem myself sometime ago but hadn't fixed it the way you
proposed but patched Apache::Compress not to use send_fd but using a
while loop.

Dirk



Re: Apache::Compress and Apache::Filter

2001-04-06 Thread JR Mayberry

I hack/fixed it by taking out the check to see if its the last module in a
chain..

For me, that is always a safe assumption..

Let me know if theres ever a real fix..


- Original Message -
From: "Ken Williams" [EMAIL PROTECTED]
To: "JR Mayberry" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, April 06, 2001 1:10 AM
Subject: Re: Apache::Compress and Apache::Filter


 Hi JR,

 I've been avoiding this bug to my peril.  Does the following patch fix it?

 =
 --- Filter.pm   2000/12/20 03:43:44 1.16
 +++ Filter.pm   2001/04/06 05:05:24
 @@ -120,8 +120,8 @@

  sub send_fd {
my $self = shift;
 -  if ($self-is_last_filter) {
 +  if ($self-is_last_filter and !Universal::isa($_[0], ref $self)) {
  $self-SUPER::send_fd(@_);
} else {
  my $fd = shift;
 =

 The bug occurs when the client doesn't support gzip, and you're using
 Apache::Filter, and Apache::Compress is the final filter in the chain.


 [EMAIL PROTECTED] (JR Mayberry) wrote:
 Does anyone know anything about the above combo, and getting an error
 message:
 Bad filehandle at Filter.pm line 123
 
 when using a client that doesnt support gzip..(specifically 'ab', apache
 bench)


   ------
   Ken Williams Last Bastion of Euclidity
   [EMAIL PROTECTED]The Math Forum




Re: Apache::Compress and Apache::Filter

2001-04-06 Thread Ken Williams

Yeah, looks like I need to look at this problem for real.  Your fix
should be fine - in fact, it'll work in all cases, it's just not as fast
as possible if a real send_fd can be done.

I'll get something working soon and release it.


[EMAIL PROTECTED] (JR Mayberry) wrote:
I hack/fixed it by taking out the check to see if its the last module in a
chain..

For me, that is always a safe assumption..

Let me know if theres ever a real fix..


- Original Message -
From: "Ken Williams" [EMAIL PROTECTED]
To: "JR Mayberry" [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, April 06, 2001 1:10 AM
Subject: Re: Apache::Compress and Apache::Filter


 Hi JR,

 I've been avoiding this bug to my peril.  Does the following patch fix it?

 =
 --- Filter.pm   2000/12/20 03:43:44 1.16
 +++ Filter.pm   2001/04/06 05:05:24
 @@ -120,8 +120,8 @@

  sub send_fd {
my $self = shift;
 -  if ($self-is_last_filter) {
 +  if ($self-is_last_filter and !Universal::isa($_[0], ref $self)) {
  $self-SUPER::send_fd(@_);
} else {
  my $fd = shift;
 =

 The bug occurs when the client doesn't support gzip, and you're using
 Apache::Filter, and Apache::Compress is the final filter in the chain.


 [EMAIL PROTECTED] (JR Mayberry) wrote:
 Does anyone know anything about the above combo, and getting an error
 message:
 Bad filehandle at Filter.pm line 123
 
 when using a client that doesnt support gzip..(specifically 'ab', apache
 bench)


   ------
   Ken Williams Last Bastion of Euclidity
   [EMAIL PROTECTED]The Math Forum



  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Apache::Compress and Apache::Filter

2001-04-05 Thread JR Mayberry

Does anyone know anything about the above combo, and getting an error
message:
Bad filehandle at Filter.pm line 123

when using a client that doesnt support gzip..(specifically 'ab', apache
bench)

I may be something wrong but its only breaking when a client doesnt support
gzip

thanks





Re: Apache::Compress and Apache::Filter

2001-04-05 Thread Ken Williams

Hi JR,

I've been avoiding this bug to my peril.  Does the following patch fix it?

=
--- Filter.pm   2000/12/20 03:43:44 1.16
+++ Filter.pm   2001/04/06 05:05:24
@@ -120,8 +120,8 @@
 
 sub send_fd {
   my $self = shift;
-  if ($self-is_last_filter) {
+  if ($self-is_last_filter and !Universal::isa($_[0], ref $self)) {
 $self-SUPER::send_fd(@_);
   } else {
 my $fd = shift;
=

The bug occurs when the client doesn't support gzip, and you're using
Apache::Filter, and Apache::Compress is the final filter in the chain.


[EMAIL PROTECTED] (JR Mayberry) wrote:
Does anyone know anything about the above combo, and getting an error
message:
Bad filehandle at Filter.pm line 123

when using a client that doesnt support gzip..(specifically 'ab', apache
bench)


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum