if ($result ="INVALID"){
Is that a single equal sign? Should be double equal sign. Actually it should be eq because it's a string.

if ($result eq 'INVALID') {

----- Original Message ----- From: "Sumit Shah" <[EMAIL PROTECTED]>
To: "Sumit Shah" <[EMAIL PROTECTED]>; <modperl@perl.apache.org>
Sent: Wednesday, November 08, 2006 8:37 PM
Subject: RE: Mod_perl and HTTP IO issue


All,

I was able to figure out the issue below. However, I am now facing an
issue where if the response is 'VALID' it is not fetching the requested
page as could be implied by the return statement. Also, sometimes I
observed that even if the response is VALID, it still redirects to
GOOGLE.

#Check the status
 if ($result ="INVALID"){
 my $url1 = 'http://www.google.com';
 $r->content_type('text/html');
 $r->headers_out->set('Location' => $url1);
 $r->status(Apache::Constants::REDIRECT);
        return Apache::Constants::REDIRECT;
        }
 return;

I would appreciate if you could point me to what I am doing wrong.

Thanks
Sumit


Reply via email to