// Token: 0x060004E9 RID: 1257 RVA: 0x0001B2AC File Offset: 0x000194AC private static string GetBackendFqdnFromE4eCookie(HttpRequest request, RequestDetailsLogger logger) { HttpCookie httpCookie = request.Cookies["X-E4eBackEnd"]; if (httpCookie == null) { return(null); } string value = httpCookie.Value; if (string.IsNullOrEmpty(value)) { logger.AppendGenericError("E4eBeCookieNullOrEmpty", "The E4E backend cookie hint was found but is null or empty."); return(null); } string[] array = httpCookie.Value.Split(new char[] { '~' }); if (array.Length != 2) { logger.AppendGenericError("E4eBeCookieBadValue", string.Format("The E4E backend cookie hint was found but does not have expected value. Actual value [{0}]", value)); return(null); } string value2 = array[0]; string result = array[1]; string itemIdFromCookie = E4eProxyRequestHandler.GetItemIdFromCookie(request); if (string.IsNullOrEmpty(itemIdFromCookie) || !itemIdFromCookie.Equals(value2, StringComparison.OrdinalIgnoreCase)) { logger.AppendGenericInfo("E4eBeCookieStale", string.Format("The E4E backend cookie hint was found but does not match current item id. Cookie value [{0}], current item ID [{1}]", value, itemIdFromCookie)); return(null); } return(result); }
// Token: 0x060004DE RID: 1246 RVA: 0x0001AE80 File Offset: 0x00019080 protected override void CopySupplementalCookiesToClientResponse() { this.UpdateBackoffCache(); if (!string.IsNullOrEmpty(this.senderEmailAddress)) { HttpCookie httpCookie = new HttpCookie("X-SenderEmailAddress", this.senderEmailAddress); httpCookie.HttpOnly = true; httpCookie.Secure = base.ClientRequest.IsSecureConnection; base.ClientResponse.Cookies.Add(httpCookie); } if (!string.IsNullOrEmpty(this.senderOrganization)) { HttpCookie httpCookie2 = new HttpCookie("X-SenderOrganization", this.senderOrganization); httpCookie2.HttpOnly = true; httpCookie2.Secure = base.ClientRequest.IsSecureConnection; base.ClientResponse.Cookies.Add(httpCookie2); } if (!string.IsNullOrWhiteSpace(this.routingEmailAddress)) { HttpCookie httpCookie3 = new HttpCookie("X-RoutingEmailAddress", this.routingEmailAddress); httpCookie3.HttpOnly = true; httpCookie3.Secure = base.ClientRequest.IsSecureConnection; base.ClientResponse.Cookies.Add(httpCookie3); HttpCookie httpCookie4 = new HttpCookie("DefaultAnchorMailbox", this.routingEmailAddress); httpCookie4.HttpOnly = true; httpCookie4.Secure = base.ClientRequest.IsSecureConnection; base.ClientResponse.Cookies.Add(httpCookie4); } if (base.AnchoredRoutingTarget != null && E4eProxyRequestHandler.IsE4ePostOrRetrievePayloadRequest(base.ClientRequest) && this.IsBackEndCookieAndHeaderFlightEnabled()) { string itemIdFromCookie = E4eProxyRequestHandler.GetItemIdFromCookie(base.ServerResponse); if (itemIdFromCookie != null) { string fqdn = base.AnchoredRoutingTarget.BackEndServer.Fqdn; string value = string.Format("{0}{1}{2}", itemIdFromCookie, '~', fqdn); HttpCookie httpCookie5 = new HttpCookie("X-E4eBackEnd", value); httpCookie5.HttpOnly = true; httpCookie5.Secure = base.ClientRequest.IsSecureConnection; base.ClientResponse.Cookies.Add(httpCookie5); } } base.CopySupplementalCookiesToClientResponse(); }