Hi,

Am Dienstag 19 Oktober 2004 01:12 schrieb Stas Bekman:
> Boris Zentner wrote:
[...]
> > Older ones use ( $self, $request ) newer use ( $self, $request,
> > $response);
> >
> > This routine forward the redirect_ok call to the underlying
> > class(LWP::UserAgent, but maybe not always) if possible else, fallback
> > to RedirectOK.
>
> If I'm not mistaken David was the last who was working on this code.
> David, could you please comment on this code, commit if it's good, etc.?
>
> Boris, aren't you dropping the case where !$have_lwp?
>

No, in that case I return $RedirectOK. I think that at least the 

  return 0 if $request->method eq 'POST';

line is wrong, since I clearly have no chance to redirect a post request.

> > --- a/Apache-Test-1.14/lib/Apache/TestRequest.pm        Thu Sep 30
> > 05:32:13 2004
> > +++ b/Apache-Test-1.14/lib/Apache/TestRequest.pm        Mon Oct 18
> > 15:35:52 2004
> > @@ -199,8 +199,11 @@
> >  $RedirectOK = 1;
> >
> >  sub redirect_ok {
> > -    my($self, $request) = @_;
> > -    return 0 if $request->method eq 'POST';
> > +#    my($self, $request) = @_;
> > +    if ( $have_lwp ) {
> > +        my $s = $_[0]->can('SUPER::redirect_ok');
> > +        goto $s if $s;
> > +    }
> >      $RedirectOK;
> >  }
> >
> > Have a nice day.
> >
> > --
> > Boris

-- 
Boris

Reply via email to