void HandleNtlmAuth (WebAsyncResult r)
{
WebConnectionStream wce = webResponse.GetResponseStream () as WebConnectionStream;
if (wce != null) {
WebConnection cnc = wce.Connection;
cnc.PriorityRequest = this;
bool isProxy = (proxy != null && !proxy.IsBypassed (actualUri));
ICredentials creds = (!isProxy) ? credentials : proxy.Credentials;
if (creds != null) {
cnc.NtlmCredential = creds.GetCredential (requestUri, "NTLM");
cnc.UnsafeAuthenticatedConnectionSharing = unsafe_auth_blah;
}
}
r.Reset ();
finished_reading = false;
haveResponse = false;
webResponse.ReadAll ();
webResponse = null;
}