I am following up to my previous email...

If I look at the access_log inside Apache, I get the following:

1) When the filter is setup
38.118.10.237 - - [14/Nov/2006:18:57:17 -0500] "GET 
/snflwr_doc_html/asut0002.htm HTTP/1.1" 200 -

2) When I remove the filter (is remove the Perl Module)

38.118.10.237 - - [14/Nov/2006:18:58:17 -0500] "GET 
/snflwr_doc_html/asut0002.htm HTTP/1.1" 200 5573 

The difference I see is in the number of bytes transferred from the server to 
the client. There are NO bytes transferred in case 1. I would appreciate if 
anyone could provide a solution/comment.

This is the perl module code and is deployed on Windows 2000/Oracle 9iAS/Apache 
1.3/Mod_perl 1.  

package Apache::Proxy;

use strict;
use mod_perl 1.17;
use Apache::Constants qw(OK); 

sub handler{
    my $r = shift;
    return OK;
}

1;
__END__



Thanks
Sumit


> -----Original Message-----
> From: Sumit Shah 
> Sent: Tuesday, November 14, 2006 5:56 PM
> To: Sumit Shah; [EMAIL PROTECTED]
> Cc: Dondi M. Stroma; modperl@perl.apache.org
> Subject: RE: Mod_perl and HTTP IO issue
> 
> 
> Hello,
> 
> I have installed the following module inside Apache 1.3 using 
> modperl 1 under Oracle 9i Application Server. 
> 
> package Apache::Proxy;
> use mod_perl ();
> $VERSION = '1.01';
> 
> sub handler{
> 
> }
> 
> 1;
> __END__
> 
> 
> I have set the following directive:
> 
> <FilesMatch "\.(cgi|html|htm|jpeg|jpg|jsp)$">
>              SetHandler  perl-script
>              PerlHandler Apache::Proxy
> </FilesMatch>
> 
> If I try to launch a .htm file. It does not return the page 
> (returns 404). If I remove the filter, it returns the page. 
> 
> If I add a 'return OK' statement within the subroutine, it 
> still fails. I donot know what I am doing wrong. 
> 
> I would highly appreciaet any suggestions. 
> 
> Thanks
> Sumit
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From: Sumit Shah
> > Sent: Monday, November 13, 2006 3:59 PM
> > To: [EMAIL PROTECTED]
> > Cc: Dondi M. Stroma; modperl@perl.apache.org
> > Subject: RE: Mod_perl and HTTP IO issue
> > 
> > Hello,
> > 
> > I tried doing what you suggested, but it does not compare it.  
> > 
> > I am kinda lost now :((. Can't seem to understand the 
> behaviour. Not 
> > sure if Apache is the one responsible or Perl.
> > 
> > Thanks
> > Sumit
> > 
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Saturday, November 11, 2006 12:25 AM
> > > To: Sumit Shah
> > > Cc: Dondi M. Stroma; modperl@perl.apache.org
> > > Subject: Re: Mod_perl and HTTP IO issue
> > > 
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > > 
> > > On Wed, Nov 08, 2006 at 09:04:36PM -0500, Sumit Shah wrote:
> > > > Thanks for pointing that out. Really silly of me. 
> > > > 
> > > > After correcting it, it seems that $result does not equate
> > > to 'INVALID'
> > > > even though the server returned INVALID. I can see that
> > if I output
> > > > the value as:
> > > > 
> > > > $r->send_http_header('text/plain');
> > > > print "This is the value for result------:$result\n";
> > > > 
> > > > 
> > > > Does the socket NOT return a string? 
> > > > 
> > > > #READ THE RESPONSE BODY
> > > >         while (defined($content = <SOCK>)) {
> > >                                   ^^^^^^^
> > > 
> > > This will read up to line separator...
> > > 
> > > >                 $result = $result . $content;
> > > >         }      
> > > > 
> > > >         if($result eq 'INVALID'){
> > > >                 #do something...
> > > >         }
> > > 
> > > So, if your line separator is, let me guess, "\n", $result might 
> > > contain now "INVALID\n". You might fare better either chomp()ing 
> > > $result or comparing ``if($result =~ /^INVALID/)''.
> > > 
> > > But I am guessing wildly.
> > > 
> > > Regards
> > > - -- tomás
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.1 (GNU/Linux)
> > > 
> > > iD8DBQFFVV7BBcgs9XrR2kYRAtAlAJ49JXpXVdgtSdngoG0qbGG2swt9IwCaA1g5
> > > oLxD7Sy1hYiXF0I7bE2SEbM=
> > > =/A4S
> > > -----END PGP SIGNATURE-----
> > > 
> > > 
> > 
> 

Reply via email to