if( user != null && user.length() > 0 ) {
client.getCredentialsProvider().setCredentials( AuthScope.ANY, new UsernamePasswordCredentials( user, password ) );
// All this bollocks is just for pre-emptive authentication. It used to be a boolean...
BasicHttpContext localcontext = new BasicHttpContext();
BasicScheme basicAuth = new BasicScheme();
localcontext.setAttribute( "preemptive-auth", basicAuth );
client.addRequestInterceptor( new PreemptiveAuth(), 0 );
}
URI url = URI.create( sUrl );
HttpPut p = new HttpPut( url );