in reply to Forcing LWP authentication

As I understand RFC2616 and RFC2617, the client authentication must be challenged by the server - via sending a 401. That makes sense, since the client must not deal out authentication tokens to servers which don't request them. Also, the authentication mechanism supported by the server isn't known beforehand.

But if you know realm and authentication mechanism, you could try to add an appropriate "Authorization:" header directly to the HTTP::Headers structure of the LWP object; don't know whether that works (i.e. whether LWP ignores that header line on the initial request and behaves standard anyways), but it could be worth a try.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}