BTW
No only is that internet redirectionb, but it is also
INTERNAL redirection.... it's been a long day.
Ruben
> Greeting
>
> I have a programing doing interent redirect after
> reading a cookie and doing some authentication.
>
> I return the OK constant after the redirection, but it
> seems that a bunch of other calls are being made
> to the server.
>
> Specifically,
>
> if you use your browser to call
>
> http://www.mysite.com/home/
> it calles a module and the module redirects to
>
> http://www.mysite.com/home/restricted/index.html
>
> then I return OK.
>
> However
>
> http://www.mysite.com/home/restricted/ is controlled
> by a perl module which authenticates.
>
> After this module finished, I expected to be done
> for everything that's a text/html type file.
>
> It does some form parsing and returns ok like this:
>
> print STDERR "CHOOSE3: FileHandle $fh : Line 48\n";
>
> print STDERR "CHOOSE3: FileHandle $fh : Line 48\n";
>
> $r->send_http_header;
> my $data;
> while($data = <$fh>){
> if($data =~ /<!--\s*#(\w+?)\svirtual=\"(.*?)\"\s*-->/){
> $data =~
>s/<!--\s*#(\w+?)\svirtual=\"(.*?)\"\s*-->/&include_file($r,$2)/ges;
> print STDERR "GOT $1 $2\n";
> }
> $r->print($data);
> }
> print STDERR "MUST STOP HERE Line 59\n";
> return OK;
> }
> print STDERR "MUST NOT BE HERE Line 62\n";
> return OK;
> }
>
> It seems to end, and then I get a bunch of calls from the original URL
> which was called for more files, even index.html again.
>
> Ideally, after return OK, it is finished retreiving files. I'm thinking of
> using Apache exit.
>
> I can't seem to get it to stop cold at this line (Line 59).
>
> It's like the module stops, and then the redirecting lines in the previous
> module just keeps calling things and ignorns it's return stop command.
>
>
> print STDERR "LINE 72\n";
> if($status[0] eq 'AUTH' and $obj->site eq 'restricted'){
> $r->internal_redirect("http://$server/restricted/index.html");
> print STDERR "THIS SHOULD NOT BE REACHED LINE 77\n";
> return OK;
> print STDERR "THIS SHOULD NOT BE REACHED LINE 79\n";
> }
> print STDERR "LINE 80\n";
>
>
> 79 is not called, but a bunch of calls are made in the logs
> with the referer from http:/www.mysite.com/ into the restricted
> directory.
>
> I've done a hack to decline the processing of these calls, but it seems
> they shouldn't be being created in the first place.
>
>
> Ruben
>