AddKnownHeaders() 정적인 개인적인 메소드

static private AddKnownHeaders ( HashSet headerSet ) : void
headerSet HashSet
리턴 void
예제 #1
0
        private static HashSet <string> CreateInvalidHeaders()
        {
            var invalidHeaders = new HashSet <string>(StringComparer.OrdinalIgnoreCase);

            HttpRequestHeaders.AddKnownHeaders(invalidHeaders);
            HttpResponseHeaders.AddKnownHeaders(invalidHeaders);
            HttpGeneralHeaders.AddKnownHeaders(invalidHeaders);

            return(invalidHeaders);
        }
예제 #2
0
        static HttpContentHeaders()
        {
            parserStore = new Dictionary <string, HttpHeaderParser>(HeaderUtilities.CaseInsensitiveStringComparer);

            parserStore.Add(HttpKnownHeaderNames.Allow, GenericHeaderParser.TokenListParser);
            parserStore.Add(HttpKnownHeaderNames.ContentEncoding, GenericHeaderParser.TokenListParser);
            parserStore.Add(HttpKnownHeaderNames.ContentLanguage, GenericHeaderParser.TokenListParser);
            parserStore.Add(HttpKnownHeaderNames.ContentLength, Int64NumberHeaderParser.Parser);
            parserStore.Add(HttpKnownHeaderNames.ContentLocation, UriHeaderParser.RelativeOrAbsoluteUriParser);
            parserStore.Add(HttpKnownHeaderNames.ContentMD5, ByteArrayHeaderParser.Parser);
            parserStore.Add(HttpKnownHeaderNames.ContentRange, GenericHeaderParser.ContentRangeParser);
            parserStore.Add(HttpKnownHeaderNames.ContentType, MediaTypeHeaderParser.SingleValueParser);
            parserStore.Add(HttpKnownHeaderNames.Expires, DateHeaderParser.Parser);
            parserStore.Add(HttpKnownHeaderNames.LastModified, DateHeaderParser.Parser);

            invalidHeaders = new HashSet <string>(HeaderUtilities.CaseInsensitiveStringComparer);
            HttpRequestHeaders.AddKnownHeaders(invalidHeaders);
            HttpResponseHeaders.AddKnownHeaders(invalidHeaders);
            HttpGeneralHeaders.AddKnownHeaders(invalidHeaders);
        }