private void DoWithCheckingState(Action <string, string> act, string name, string value, bool setState) { HttpHeaderType httpHeaderType = WebHeaderCollection.CheckHeaderType(name); if (httpHeaderType == HttpHeaderType.Request) { this.DoWithCheckingState(act, name, value, false, setState); } else if (httpHeaderType == HttpHeaderType.Response) { this.DoWithCheckingState(act, name, value, true, setState); } else { act(name, value); } }