internal static void UpdateProxyHeaderFieldsWithUIHeadersParameters() { Parameters TempHolder = new Parameters(); if (IronProxy.CurrentSession.Request.Headers.Has("Host")) { TempHolder.Set("Host", IronProxy.CurrentSession.Request.Headers.Get("Host")); } if (IronProxy.CurrentSession.Request.Headers.Has("Cookie")) { TempHolder.Set("Cookie", IronProxy.CurrentSession.Request.Headers.Get("Cookie")); } IronProxy.CurrentSession.Request.Headers.RemoveAll(); foreach (DataGridViewRow Row in UI.ProxyRequestParametersHeadersGrid.Rows) { IronProxy.CurrentSession.Request.Headers.Add(Row.Cells[0].Value.ToString(), Row.Cells[1].Value.ToString()); } foreach (string Name in TempHolder.GetNames()) { IronProxy.CurrentSession.Request.Headers.Set(Name, TempHolder.Get(Name)); } FillProxyRequestHeaderFields(IronProxy.CurrentSession.Request); }
internal static void UpdateMTHeaderFieldsWithUIHeadersParameters() { if (ManualTesting.CurrentRequest == null) return; Parameters TempHolder = new Parameters(); if (ManualTesting.CurrentRequest.Headers.Has("Host")) { TempHolder.Set("Host", ManualTesting.CurrentRequest.Headers.Get("Host")); } if (ManualTesting.CurrentRequest.Headers.Has("Cookie")) { TempHolder.Set("Cookie", ManualTesting.CurrentRequest.Headers.Get("Cookie")); } ManualTesting.CurrentRequest.Headers.RemoveAll(); foreach (DataGridViewRow Row in UI.MTRequestParametersHeadersGrid.Rows) { ManualTesting.CurrentRequest.Headers.Add(Row.Cells[0].Value.ToString(), Row.Cells[1].Value.ToString()); } foreach (string Name in TempHolder.GetNames()) { ManualTesting.CurrentRequest.Headers.Set(Name, TempHolder.Get(Name)); } FillMTRequestHeaderFields(ManualTesting.CurrentRequest); }