remove extra assert from WinHttp handler#93984
Conversation
|
Tagging subscribers to this area: @dotnet/ncl Issue Detailsit seems like the callback can be called multiple times - perhaps because of TLS 1.3. It seems like this is only problem with This was somewhat easy to reproduce on my Windows VM. After the change all tests are passing e.g. the Assert really seems unnecessary. fixes #93099
|
|
/backport to release/8.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/13499278819 |
it seems like the callback can be called multiple times - perhaps because of TLS 1.3.
With that, it is called and then it is set to null in
CreateResponseMessageruntime/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpResponseParser.cs
Line 67 in 9ad24ae
It seems like this is only problem with
Debugbuild. All the methods insideOnRequestSendingRequestcan handlenullRequestHandlewithout crashing. However the processing seems unnecessary so I simply removed the assert and return from the method under this condition.This was somewhat easy to reproduce on my Windows VM. After the change all tests are passing e.g. the Assert really seems unnecessary.
fixes #93099