private static int AdvanceCacheDirectiveIndex(int current, string headerValue) { // Skip until the next potential name current += HttpRuleParser.GetWhitespaceLength(headerValue, current); // Skip the value if present if (current < headerValue.Length && headerValue[current] == '=') { current++; // skip '=' current += NameValueHeaderValue.GetValueLength(headerValue, current); } // Find the next delimiter current = headerValue.IndexOf(',', current); if (current == -1) { // If no delimiter found, skip to the end return(headerValue.Length); } current++; // skip ',' current += HttpRuleParser.GetWhitespaceLength(headerValue, current); return(current); }