develooper Front page | perl.libwww | Postings from May 2014

NTLM Proxy Authentication

Tim Hoke
May 21, 2014 21:19
NTLM Proxy Authentication
Message ID:
Hello Everyone,

I'm trying to take v6.06 of LWP (and the corresponding v6.06 of
LWP::Protocol::https) and connect to an https endpoint through an NTLM
Authenticated http proxy.  I've managed to make the CONNECT method work for
basic authentication via pull request 56 (, but I'm not able to
get NTLM authentication working.

I've tried bringing in benningm's proxy auth pull request ( and I can make it NTLM
authentication work if I've got an http endpoint, just not to an https
endpoint.  I suspect it's because of the CONNECT method required for
proxying https connections via http.

FWIW, I've also made a modification to LWP::UserAgent:
$ diff -u
--- 2014-04-29 12:15:20.000000000 -0500
+++ 2014-05-20 14:51:48.595255000 -0500
@@ -618,7 +618,7 @@
 sub get_basic_credentials
     my($self, $realm, $uri, $proxy) = @_;
-    return if $proxy;
+    return $self->credentials($uri->host_port) if $proxy;
     return $self->credentials($uri->host_port, $realm);

Does anyone have any pointers on how I might resolve this?

-Tim Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About