private static HttpHeaderInfo getHeaderInfo(string name) { HttpHeaderInfo info2; using (Dictionary <string, HttpHeaderInfo> .ValueCollection.Enumerator enumerator = _headers.Values.GetEnumerator()) { while (true) { if (enumerator.MoveNext()) { HttpHeaderInfo current = enumerator.Current; if (!current.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)) { continue; } info2 = current; } else { return(null); } break; } } return(info2); }
internal static bool IsMultiValue(string headerName, bool response) { bool flag; if ((headerName == null ? false : headerName.Length != 0)) { HttpHeaderInfo headerInfo = WebHeaderCollection.getHeaderInfo(headerName); flag = (headerInfo == null ? false : headerInfo.IsMultiValue(response)); } else { flag = false; } return(flag); }
private static HttpHeaderType checkHeaderType(string name) { HttpHeaderType httpHeaderType; HttpHeaderInfo headerInfo = WebHeaderCollection.getHeaderInfo(name); if (headerInfo == null) { httpHeaderType = HttpHeaderType.Unspecified; } else if (!headerInfo.IsRequest || headerInfo.IsResponse) { httpHeaderType = (headerInfo.IsRequest || !headerInfo.IsResponse ? HttpHeaderType.Unspecified : HttpHeaderType.Response); } else { httpHeaderType = HttpHeaderType.Request; } return(httpHeaderType); }
static bool TryGetHeaderInfo(string name, out HttpHeaderInfo info) { info = GetHeaderInfo (name); return info != null; }
private static HttpHeaderType checkHeaderType(string name) { HttpHeaderInfo headerInfo = getHeaderInfo(name); return((headerInfo != null) ? ((headerInfo.IsRequest && !headerInfo.IsResponse) ? HttpHeaderType.Request : ((!headerInfo.IsRequest && headerInfo.IsResponse) ? HttpHeaderType.Response : HttpHeaderType.Unspecified)) : HttpHeaderType.Unspecified); }
private static bool isRestricted(string name, bool response) { HttpHeaderInfo headerInfo = WebHeaderCollection.getHeaderInfo(name); return(headerInfo == null ? false : headerInfo.IsRestricted(response)); }
static bool TryGetHeaderInfo(string name, out HttpHeaderInfo info) { info = GetHeaderInfo (name); return info.IsNull () ? false : true; }
private static HttpHeaderType checkHeaderType(string name) { HttpHeaderInfo info = getHeaderInfo(name); return((info != null) ? ((!info.IsRequest || info.IsResponse) ? ((info.IsRequest || !info.IsResponse) ? HttpHeaderType.Unspecified : HttpHeaderType.Response) : HttpHeaderType.Request) : HttpHeaderType.Unspecified); }
private static bool TryGetHeaderInfo(string name, out HttpHeaderInfo info) { info = WebHeaderCollection.GetHeaderInfo(name); return(info != null); }