78 references to HttpRuleParser
Microsoft.Net.Http.Headers (78)
CacheControlHeaderValue.cs (1)
742var tokenLength = HttpRuleParser.GetTokenLength(valueString, current);
ContentDispositionHeaderValue.cs (4)
294current = current + HttpRuleParser.GetWhitespaceLength(input, current); 323var typeLength = HttpRuleParser.GetTokenLength(input, startIndex); 364if (HttpRuleParser.TryStringToDate(dateString, out date)) 483else if (!needsQuotes && HttpRuleParser.GetTokenLength(result, 0) != result.Length)
ContentRangeHeaderValue.cs (13)
239var unitLength = HttpRuleParser.GetTokenLength(input, startIndex); 248var separatorLength = HttpRuleParser.GetWhitespaceLength(input, current); 276current = current + HttpRuleParser.GetWhitespaceLength(input, current); 310lengthLength = HttpRuleParser.GetNumberLength(input, current, false); 312if ((lengthLength == 0) || (lengthLength > HttpRuleParser.MaxInt64Digits)) 320current = current + HttpRuleParser.GetWhitespaceLength(input, current); 339fromLength = HttpRuleParser.GetNumberLength(input, current, false); 341if ((fromLength == 0) || (fromLength > HttpRuleParser.MaxInt64Digits)) 347current = current + HttpRuleParser.GetWhitespaceLength(input, current); 357current = current + HttpRuleParser.GetWhitespaceLength(input, current); 366toLength = HttpRuleParser.GetNumberLength(input, current, false); 368if ((toLength == 0) || (toLength > HttpRuleParser.MaxInt64Digits)) 376current = current + HttpRuleParser.GetWhitespaceLength(input, current);
CookieHeaderValue.cs (1)
172if (HttpRuleParser.GetTokenLength(name, 0) != name.Length)
EntityTagHeaderValue.cs (4)
60else if ((HttpRuleParser.GetQuotedStringLength(tag, 0, out var length) != HttpParseResult.Parsed) || 245current = current + HttpRuleParser.GetWhitespaceLength(input, current); 249if (HttpRuleParser.GetQuotedStringLength(input, current, out var tagLength) != HttpParseResult.Parsed) 271current = current + HttpRuleParser.GetWhitespaceLength(input, current);
HeaderUtilities.cs (14)
78if (HttpRuleParser.GetTokenLength(value, 0) != value.Length) 159var current = startIndex + HttpRuleParser.GetWhitespaceLength(input, startIndex); 170current = current + HttpRuleParser.GetWhitespaceLength(input, current); 177current = current + HttpRuleParser.GetWhitespaceLength(input, current); 187current += HttpRuleParser.GetWhitespaceLength(headerValue, current); 206current += HttpRuleParser.GetWhitespaceLength(headerValue, current); 245var current = HttpRuleParser.GetWhitespaceLength(segment, 0); 251var tokenLength = HttpRuleParser.GetTokenLength(headerValues[i], current); 301var current = HttpRuleParser.GetWhitespaceLength(segment, 0); 307var tokenLength = HttpRuleParser.GetTokenLength(segment, current); 332startIndex += HttpRuleParser.GetWhitespaceLength(headerValue, startIndex); 343startIndex += HttpRuleParser.GetWhitespaceLength(headerValue, startIndex); 346if (TryParseNonNegativeInt64(new StringSegment(headerValue, startIndex, HttpRuleParser.GetNumberLength(headerValue, startIndex, false)), out result)) 551return HttpRuleParser.TryStringToDate(input, out result);
MediaTypeHeaderValue.cs (5)
580current = current + HttpRuleParser.GetWhitespaceLength(input, current); 612var typeLength = HttpRuleParser.GetTokenLength(input, startIndex); 620current = current + HttpRuleParser.GetWhitespaceLength(input, current); 628current = current + HttpRuleParser.GetWhitespaceLength(input, current); 631var subtypeLength = HttpRuleParser.GetTokenLength(input, current);
NameValueHeaderValue.cs (10)
349var nameLength = HttpRuleParser.GetTokenLength(input, startIndex); 358current = current + HttpRuleParser.GetWhitespaceLength(input, current); 366current = current + HttpRuleParser.GetWhitespaceLength(input, current); // skip whitespaces 371current = current + HttpRuleParser.GetWhitespaceLength(input, current); 382current = current + HttpRuleParser.GetWhitespaceLength(input, current); // skip whitespaces 401var current = startIndex + HttpRuleParser.GetWhitespaceLength(input, startIndex); 414current = current + HttpRuleParser.GetWhitespaceLength(input, current); 424current = current + HttpRuleParser.GetWhitespaceLength(input, current); 461var valueLength = HttpRuleParser.GetTokenLength(input, startIndex); 466if (HttpRuleParser.GetQuotedStringLength(input, startIndex, out valueLength) != HttpParseResult.Parsed)
RangeConditionHeaderValue.cs (1)
177if (!HttpRuleParser.TryStringToDate(input.Subsegment(current), out date))
RangeHeaderValue.cs (3)
164var unitLength = HttpRuleParser.GetTokenLength(input, startIndex); 174current = current + HttpRuleParser.GetWhitespaceLength(input, current); 182current = current + HttpRuleParser.GetWhitespaceLength(input, current);
RangeItemHeaderValue.cs (7)
172var fromLength = HttpRuleParser.GetNumberLength(input, current, false); 174if (fromLength > HttpRuleParser.MaxInt64Digits) 180current = current + HttpRuleParser.GetWhitespaceLength(input, current); 190current = current + HttpRuleParser.GetWhitespaceLength(input, current); 198toLength = HttpRuleParser.GetNumberLength(input, current, false); 200if (toLength > HttpRuleParser.MaxInt64Digits) 206current = current + HttpRuleParser.GetWhitespaceLength(input, current);
SetCookieHeaderValue.cs (5)
492var itemLength = HttpRuleParser.GetTokenLength(input, offset); 525offset += HttpRuleParser.GetWhitespaceLength(input, offset); 528itemLength = HttpRuleParser.GetTokenLength(input, offset); 548if (!HttpRuleParser.TryStringToDate(dateString, out expirationDate)) 571itemLength = HttpRuleParser.GetNumberLength(input, offset, allowDecimal: false);
src\Http\Shared\CookieHeaderParserShared.cs (4)
113var current = startIndex + HttpRuleParser.GetWhitespaceLength(input, startIndex); 124current = current + HttpRuleParser.GetWhitespaceLength(input, current); 132current = current + HttpRuleParser.GetWhitespaceLength(input, current); 157var itemLength = HttpRuleParser.GetTokenLength(input, offset);
StringWithQualityHeaderValue.cs (6)
197var valueLength = HttpRuleParser.GetTokenLength(input, startIndex); 207current = current + HttpRuleParser.GetWhitespaceLength(input, current); 216current = current + HttpRuleParser.GetWhitespaceLength(input, current); 239current = current + HttpRuleParser.GetWhitespaceLength(input, current); 248current = current + HttpRuleParser.GetWhitespaceLength(input, current); 263current = current + HttpRuleParser.GetWhitespaceLength(input, current);