Exemple #1
0
        internal HttpTrailerField(byte[] fieldValue)
            : base(FieldName, fieldValue)
        {
            string fieldValueString = HttpRegex.GetString(fieldValue);
            Match  match            = _regex.Match(fieldValueString);

            if (!match.Success)
            {
                return;
            }

            SetFieldNames(match.GroupCapturesValues(FieldNameGroupName));
        }
Exemple #2
0
        internal HttpTransferEncodingField(byte[] fieldValue)
            : base(FieldName, fieldValue)
        {
            string fieldValueString = HttpRegex.GetString(fieldValue);
            Match  match            = _regex.Match(fieldValueString);

            if (!match.Success)
            {
                return;
            }

            SetTransferCodings(match.GroupCapturesValues(RegexTransferCodingGroupName).ToArray());
        }
Exemple #3
0
        internal HttpContentTypeField(byte[] fieldValue)
            : base(FieldName, fieldValue)
        {
            string fieldValueString = HttpRegex.GetString(fieldValue);
            Match match = _regex.Match(fieldValueString);
            if (!match.Success)
                return;

            MediaType = match.Groups[MediaTypeGroupName].Captures.Cast<Capture>().First().Value;
            MediaSubtype = match.Groups[MediaSubTypeGroupName].Captures.Cast<Capture>().First().Value;
            Parameters = new HttpFieldParameters(match.GroupCapturesValues(HttpRegex.ParameterNameGroupName),
                                                 match.GroupCapturesValues(HttpRegex.ParameterValueGroupName));
        }