commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ozgur Balsoy <bal...@grids.ucs.indiana.edu>
Subject HttpClient.startSession(URL, Credentials) problem
Date Sun, 26 May 2002 02:16:21 GMT
Hi guys,
I am having this problem when I use HttpClient.startSession(URL, 
Credentials) method.

I want to fetch a URL with user/pwd information. I create an HttpClient 
object, a UsernamePasswordCredentials object, and start the session 
using the above method. It gives me a NullPointerException because in 
this method, the credentials for the client's state is set to (null,creds)
public void startSession(URL url, Credentials creds) {
        getState().setCredentials(null,creds);
        startSession(url);
    }

However, in HttpState.setCredentials(String, Credentials) , the first 
parameter is a key for a map object. So, this is an unpreventable 
Exception, and I think it is a bug.

I'm using 2.0a1. The code snippet above is from the latest CVS.
Please reply your better solutions if any to my e-mail address. I am not 
subscribed to the list.

Thanks,
Ozgur Balsoy


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message