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----- > > > > >