Reading form with invalid content throws NullReferenceException #36987
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
investigate
Milestone
Describe the bug
While working on some error handling cases for a PR, I needed to make
HttpRequest.ReadFormAsync()
throw anInvalidDataException
. In the process of creating a test case that did that, I found that posting an invalid form to the web application would cause aNullReferenceException
to be thrown on the server when the form was read.I can't replicate this with
5.0.10
,6.0.100-rc.1.21463.6
, or withrelease/6.0
, but I can inmain
as of 406515e for v7.To Reproduce
Add the test application endpoint and corresponding test from 91a43d6 to the repo, and then run the test.
Exceptions (if any)
Further technical details
main
@ 406515eThe text was updated successfully, but these errors were encountered: