This is irritating - LWP does not separate handling of authentication
from handling of redirects.
The default in rest::client is set to not follow because it is often desirable to see redirect status codes when working with a resource -
you often want to update your client state as a result.
I didn't realize that simple_request() did not handle any authentication
scheme, and I don't see a way to get it request() to handle
authentication without handling simple redirects.
hmm,
-m
On Thu Feb 17 00:47:36 2011, MCRAWFOR wrote:
Show quoted text> Thanks, I'll take a look soon.
>
> On Wed Feb 16 22:37:33 2011, JEFFERY wrote:
> > If you don't set Follow to true then the module uses
LWP::UserAgent's
Show quoted text> > simple_request method. This means authentication does not work. The
> > culprit is this line
> >
> > my $res = $self->getFollow ? $ua->request($req) : $ua-
> >simple_request($req);
> >
> > Attempts to use authentication without setting Follow to true fail
as
Show quoted text> > the server rejects the requests. Yet the authentication details have
> > been set correctly in the useragent. There is no indication as to
what
Show quoted text> > the real failure is.
>