// Token: 0x060011F7 RID: 4599 RVA: 0x0006CE70 File Offset: 0x0006B070 private void CopyProxyResponse(HttpWebResponse response) { this.copyProxyAttempts++; this.proxyResponse = response; this.proxyResponseStream = this.proxyResponse.GetResponseStream(); bool flag = false; for (int i = 0; i < this.proxyResponse.Headers.Count; i++) { string text = this.proxyResponse.Headers.Keys[i]; if (ProxyUtilities.ShouldCopyProxyResponseHeader(text)) { this.OriginalResponse.AddHeader(text, this.proxyResponse.Headers[text]); } if (string.Compare(text, "mailboxCrossSiteFailover", true, CultureInfo.InvariantCulture) == 0) { flag = true; Utilities.DeleteCookie(this.OriginalResponse, UserContextCookie.GetUserContextCookie(base.OwaContext).CookieName); } } if (!flag && Globals.OwaVDirType == OWAVDirType.OWA) { ProxyUtilities.UpdateProxyUserContextIdFromResponse(this.proxyResponse, base.OwaContext.UserContext); } ProxyUtilities.UpdateProxyClientDataCollectingCookieFromResponse(this.proxyResponse, this.OriginalResponse); this.OriginalResponse.StatusCode = (int)this.proxyResponse.StatusCode; this.OriginalResponse.ContentType = this.proxyResponse.ContentType; if ("chunked".Equals(this.proxyResponse.Headers["Transfer-Encoding"], StringComparison.OrdinalIgnoreCase)) { this.OriginalResponse.BufferOutput = false; } this.proxyStreamCopy = new ProxyStreamCopy(this.proxyResponseStream, this.OriginalResponseStream, StreamCopyMode.AsyncReadSyncWrite); this.proxyStreamCopy.BeginCopy(new AsyncCallback(this.CopyProxyResponseStreamCallback), this); }
// Token: 0x0600120F RID: 4623 RVA: 0x0006DBB4 File Offset: 0x0006BDB4 private void GetResponseCallback(IAsyncResult asyncResult) { lock (this) { if (!this.requestTimedOut) { try { if (this.timeoutWaitHandle != null) { this.timeoutWaitHandle.Unregister(null); this.timeoutWaitHandle = null; } this.proxyResponse = ProxyUtilities.EndGetResponse(this.proxyRequest, asyncResult, this.requestClock); ProxyUtilities.UpdateProxyUserContextIdFromResponse(this.proxyResponse, this.owaContext.UserContext); } catch (Exception exception) { this.asyncResult.CompleteRequest(false, exception); return; } this.asyncResult.CompleteRequest(false); } } }