System\Net\Http\Headers\AltSvcHeaderParser.cs (8)
109int tokenLength = HttpRuleParser.GetTokenLength(value, idx);
189int tokenLength = HttpRuleParser.GetTokenLength(value, startIndex);
303if (HttpRuleParser.GetQuotedStringLength(value, startIndex, out int quotedLength) != HttpParseResult.Parsed)
308Debug.Assert(value[startIndex] == '"' && value[startIndex + quotedLength - 1] == '"', $"{nameof(HttpRuleParser.GetQuotedStringLength)} should return {nameof(HttpParseResult.NotParsed)} if the opening/closing quotes are missing.");
396int tokenLength = HttpRuleParser.GetTokenLength(value, startIndex);
404if (HttpRuleParser.GetQuotedStringLength(value, startIndex, out int quotedLength) == HttpParseResult.Parsed)
459int tokenLength = HttpRuleParser.GetTokenLength(value, startIndex);
466if (HttpRuleParser.GetQuotedStringLength(value, startIndex, out int quotedLength) == HttpParseResult.Parsed)
System\Net\Http\Headers\AuthenticationHeaderValue.cs (9)
122if (string.IsNullOrEmpty(input) || (startIndex >= input.Length) || HttpRuleParser.ContainsNewLine(input, startIndex))
128int schemeLength = HttpRuleParser.GetTokenLength(input, startIndex);
150int whitespaceLength = HttpRuleParser.GetWhitespaceLength(input, current);
203if (HttpRuleParser.GetQuotedStringLength(input, current, out quotedStringLength) !=
214int whitespaceLength = HttpRuleParser.GetWhitespaceLength(input, current);
253int tokenLength = HttpRuleParser.GetTokenLength(input, current);
260current += HttpRuleParser.GetWhitespaceLength(input, current);
271current += HttpRuleParser.GetWhitespaceLength(input, current);
284current += HttpRuleParser.GetWhitespaceLength(input, current);
System\Net\Http\Headers\ContentRangeHeaderValue.cs (13)
169int unitLength = HttpRuleParser.GetTokenLength(input, startIndex);
178int separatorLength = HttpRuleParser.GetWhitespaceLength(input, current);
209current += HttpRuleParser.GetWhitespaceLength(input, current);
244lengthLength = HttpRuleParser.GetNumberLength(input, current, false);
246if ((lengthLength == 0) || (lengthLength > HttpRuleParser.MaxInt64Digits))
254current += HttpRuleParser.GetWhitespaceLength(input, current);
274fromLength = HttpRuleParser.GetNumberLength(input, current, false);
276if ((fromLength == 0) || (fromLength > HttpRuleParser.MaxInt64Digits))
282current += HttpRuleParser.GetWhitespaceLength(input, current);
292current += HttpRuleParser.GetWhitespaceLength(input, current);
301toLength = HttpRuleParser.GetNumberLength(input, current, false);
303if ((toLength == 0) || (toLength > HttpRuleParser.MaxInt64Digits))
311current += HttpRuleParser.GetWhitespaceLength(input, current);
System\Net\Http\Headers\NameValueHeaderValue.cs (12)
222int nameLength = HttpRuleParser.GetTokenLength(input, startIndex);
231current += HttpRuleParser.GetWhitespaceLength(input, current);
239current += HttpRuleParser.GetWhitespaceLength(input, current); // skip whitespace
244current += HttpRuleParser.GetWhitespaceLength(input, current);
259current += HttpRuleParser.GetWhitespaceLength(input, current); // skip whitespace
276int current = startIndex + HttpRuleParser.GetWhitespaceLength(input, startIndex);
290current += HttpRuleParser.GetWhitespaceLength(input, current);
300current += HttpRuleParser.GetWhitespaceLength(input, current);
332int valueLength = HttpRuleParser.GetTokenLength(input, startIndex);
337if (HttpRuleParser.GetQuotedStringLength(input, startIndex, out valueLength) != HttpParseResult.Parsed)
368HttpParseResult parseResult = HttpRuleParser.GetQuotedStringLength(value, 0, out int valueLength);
374else if (HttpRuleParser.ContainsNewLine(value))
System\Net\Http\Headers\ViaHeaderValue.cs (10)
160int receivedByLength = HttpRuleParser.GetHostLength(input, current, true);
169current += HttpRuleParser.GetWhitespaceLength(input, current);
175if (HttpRuleParser.GetCommentLength(input, current, out int commentLength) != HttpParseResult.Parsed)
183current += HttpRuleParser.GetWhitespaceLength(input, current);
201int protocolVersionOrNameLength = HttpRuleParser.GetTokenLength(input, current);
209int whitespaceLength = HttpRuleParser.GetWhitespaceLength(input, current);
223current += HttpRuleParser.GetWhitespaceLength(input, current);
225protocolVersionOrNameLength = HttpRuleParser.GetTokenLength(input, current);
235whitespaceLength = HttpRuleParser.GetWhitespaceLength(input, current);
262if (HttpRuleParser.GetHostLength(receivedBy, 0, true) != receivedBy.Length)
System\Net\Http\Headers\WarningHeaderValue.cs (8)
162if (HttpRuleParser.GetQuotedStringLength(input, current, out int textLength) != HttpParseResult.Parsed)
186int agentLength = HttpRuleParser.GetHostLength(input, current, true);
195int whitespaceLength = HttpRuleParser.GetWhitespaceLength(input, current);
210int codeLength = HttpRuleParser.GetNumberLength(input, current, false);
227int whitespaceLength = HttpRuleParser.GetWhitespaceLength(input, current);
244int whitespaceLength = HttpRuleParser.GetWhitespaceLength(input, current);
274current += HttpRuleParser.GetWhitespaceLength(input, current);
297if (HttpRuleParser.GetHostLength(agent, 0, true) != agent.Length)