Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Sometimes we get the following error logged:
IndexOutOfRangeException: Index was outside the bounds of the array.
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.ExtraFeatureSet(Type key, Object value)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
Looking at the code there, I can't find anything that would cause this error if the code there is not accessed concurrently. Is it possible that, if a connection is aborted while for example the ResponseCompressionMiddleware is being executed, that this ExtraFeatureSet might get executed concurrently?
Expected Behavior
No exception to occur.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
8.0.2
Anything else?
No response