}
Type1Message type1 = (Type1Message) attemptNegotiation(response);
if (type1 == null) return; // no NTLM
int attempt = 0;
while (attempt < MAX_REDIRECTS) {
connection.setRequestProperty(authProperty, method + ' ' + Base64Encoder.encode(type1.toByteArray()));
connection.connect(); // send type 1
response = parseResponseCode();
if (response != HTTP_UNAUTHORIZED && response != HTTP_PROXY_AUTH) {
return;
}