huc.setRequestProperty("Redirect", "false");
// secure the connection with the credentials for our session
// (we can only do this for an http connection)
CredentialManager cm = session.getSessionManager().getCredentialManager();
cm.secureURLConnection(huc);
if (huc.getResponseCode() != HttpURLConnection.HTTP_OK) {
logger.warning("Connection to " + url + " returns " +
huc.getResponseCode() + " : " +
huc.getResponseMessage());