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 -----Original Message----- From: Brad Clarke [mailto:[EMAIL PROTECTED] Sent: Tuesday, 15 July 2003 11:50 AM To: [EMAIL PROTECTED] Subject: HTTPClient basic authentication against LinkSys router I am migrating some code that was originally using Ronald Tschal�r 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 = 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 = 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
