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