This repository was archived by the owner on Mar 19, 2019. It is now read-only.
This repository was archived by the owner on Mar 19, 2019. It is now read-only.
ArgumentNullException("chars") is thrown when iterating HeaderDictionary #381
Closed
Description
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.