Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 38760 invoked from network); 15 Jul 2003 01:54:06 -0000 Received: from unknown (HELO bigcow.intraephox.ephox.com) (202.138.204.102) by daedalus.apache.org with SMTP; 15 Jul 2003 01:54:06 -0000 Received: by bigcow.intraephox.ephox.com with Internet Mail Service (5.5.2653.19) id <36WCLVBX>; Tue, 15 Jul 2003 11:54:29 +1000 Message-ID: <8D585857D762F741A47C1E1597FEAD3003B662@bigcow.intraephox.ephox.com> From: Adrian Sutton To: 'Jakarta Commons Users List' Subject: RE: HTTPClient basic authentication against LinkSys router Date: Tue, 15 Jul 2003 11:54:28 +1000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N The "192.168.1.1" part for some reason isn't matching the server name correctly - I don't know why. To find out why, I'll need a debug log with wire trace on and debug = level set. See http://jakarta.apache.org/commons/httpclient/logging.html for instructions. It's very unlikely to be an incompatibility with the Linksys router by = the looks of it - rather something screwy going on with what hostname is = being used. The wire log should reveal all. :) Regards, Adrian Sutton, Software Engineer Ephox Corporation www.ephox.com=20 -----Original Message----- From: Brad Clarke [mailto:bgclarke16@hotmail.com] Sent: Tuesday, 15 July 2003 11:50 AM To: commons-user@jakarta.apache.org Subject: HTTPClient basic authentication against LinkSys router I am migrating some code that was originally using Ronald Tschal=E4r HTTPClient code to the Apache commons HTTPClient (beta 2). I have used the BasicAuthenticatonExample as the basis for my test. The problem I am having is that if I use: client.getState().setCredentials("192.168.1.1", "Linksys BEFSR41/BEFSR11/BEFSRU31", new UsernamePasswordCredentials("user", "password")); GetMethod get =3D new = GetMethod("http://192.168.1.1/Status.htm"); get.setDoAuthentication( true ); I get a 401 error. If I use the deprecated format: client.getState().setCredentials("Linksys BEFSR41/BEFSR11/BEFSRU31", new UsernamePasswordCredentials("user", "password")); GetMethod get =3D new = GetMethod("http://192.168.1.1/Status.htm"); get.setDoAuthentication( true ); It works fine. I've tried different forms of "192.168.1.1" in the setCredentials, but nothing seems to work. The LinkSys router does not have a true http server onboard, so I = wonder if that could be part of the problem. Any ideas? Thanks...Brad --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org