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]

Reply via email to