You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 19, 2019. It is now read-only.
Iterating over Request.Headers throws ArgumentNullException in case the web hosting uses WebListener/HttpSysListener and the request contains a header with empty value, e.g.
GET /api/values HTTP/1.1
If-None-Match:
It fails when calling UTF8Encoding.GetChars(byte* bytes, int byteCount, char* chars, int charCount) because chars point to IntPtr.Zero.
In case of Kestrel, all is fine.
The text was updated successfully, but these errors were encountered:
at System.Text.UTF8Encoding.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount)
at Microsoft.Net.Http.Server.HeaderEncoding.GetString(SByte* pBytes, Int32 byteCount)
at Microsoft.Net.Http.Server.NativeRequestContext.GetKnownHeader(HttpSysRequestHeader header)
at Microsoft.Net.Http.Server.RequestHeaders.get_IfNoneMatch()
at Microsoft.Net.Http.Server.RequestHeaders.d__201.MoveNext()
at System.Linq.Enumerable.d__58`1.MoveNext()
We have a clients which send us such payload. We migrated from OWIN to ASPNETCORE and we have this regression. We have a nasty hack implemented using reflection (class Microsoft.Net.Http.Server.HeaderEncoding, field Encoding) but we want to get rid of this hack.
Iterating over Request.Headers throws ArgumentNullException in case the web hosting uses WebListener/HttpSysListener and the request contains a header with empty value, e.g.
GET /api/values HTTP/1.1
If-None-Match:
It fails when calling UTF8Encoding.GetChars(byte* bytes, int byteCount, char* chars, int charCount) because chars point to IntPtr.Zero.
In case of Kestrel, all is fine.
The text was updated successfully, but these errors were encountered: