You're partly right. The solution in the link was for CommonsHttpSolrServer,
it does work for HttpSolrServer, but the principle is the same.
Actually, I found solution for the new HttpClient here:
http://stackoverflow.com/questions/2014700/preemptive-basic-authentication-with-apache-httpclient-4/1
Villam,
this is a question for httpclient, I think you want to enable preemptive
authentication so as to avoid the need to repeat the query after the
"unauthorized" response is sent.
http://hc.apache.org/httpclient-3.x/authentication.html#Preemptive_Authentication
paul
Le 8 août 2012