aspnet/HttpAbstractions

ParsingHelpers.GetHeaderSplit - Check if values is empty before parsing

snakefoot opened this issue · 1 comments

Not calling GetHeaderSplitImplementation will skip the allocation of a yield-state-machine:

public static StringValues GetHeaderSplit(IHeaderDictionary headers, string key)
{
var values = GetHeaderUnmodified(headers, key);
return new StringValues(GetHeaderSplitImplementation(values).ToArray());
}