Skip to content

Commit

Permalink
Remove workaround for fixed Roslyn bug in HttpHeaders (#110790)
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaZupan authored Dec 18, 2024
1 parent d7e85d9 commit 7508993
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ public IEnumerator<KeyValuePair<string, IEnumerable<string>>> GetEnumerator() =>

private IEnumerator<KeyValuePair<string, IEnumerable<string>>> GetEnumeratorCore()
{
Debug.Assert(_headerStore is not null);

HeaderEntry[]? entries = GetEntriesArray();
Debug.Assert(_count != 0 && entries is not null, "Caller should have validated the collection is not empty");

Expand All @@ -347,14 +349,11 @@ private IEnumerator<KeyValuePair<string, IEnumerable<string>>> GetEnumeratorCore
// during enumeration so that we can parse the raw value in order to a) return
// the correct set of parsed values, and b) update the instance for subsequent enumerations
// to reflect that parsing.

#nullable disable // https://github.com/dotnet/roslyn/issues/73928
ref object storeValueRef = ref EntriesAreLiveView
? ref entries[i].Value
: ref CollectionsMarshal.GetValueRefOrNullRef((Dictionary<HeaderDescriptor, object>)_headerStore, entry.Key);

info = ReplaceWithHeaderStoreItemInfo(ref storeValueRef, entry.Value);
#nullable restore
}

// Make sure we parse all raw values before returning the result. Note that this has to be
Expand Down

0 comments on commit 7508993

Please sign in to comment.