This bug occurs in .NET FX (tested .NET Framework 4.5.2 and 4.7). It only occurs when Fiddler is running as well.
The reproducer is a simple GET request with the cache policy enabled:
var httpClient = new HttpClient(new WebRequestHandler() { CachePolicy = new RequestCachePolicy(RequestCacheLevel.Default) });
var address = "http://coastwatch.pfeg.noaa.gov/erddap/wms/jplAmsreSstMon_LonPM180/request?VERSION=1.3.0&SERVICE=WMS&REQUEST=GetCapabilities";
var str = await httpClient.GetStringAsync(new Uri(address));
This request will fail with a HttpRequestException, but if you look at the inner exceptions, what's really happening is a NullReferenceException in HttpWebRequest.CheckCacheUpdateOnResponse():

It doesn't seem to happen with all URLs. The above URL has an attachment in the response, which I suspect is related.
/CC @fragmer
Does it happen on .NET Core as well?
If not, we will have to move the bug - we do not track Desktop issues on GH
cc @davidsh
No idea. I don't think that API is in .NET Core. @terrajobst asked me to log it here.
Just to confirm... I don't see the members that the stack trace points to in CoreFX: https://github.com/dotnet/corefx/blob/e3f74deb999571d3f34a6b2b8011caebcf06dbfc/src/System.Net.Requests/src/System/Net/HttpWebRequest.cs
Does it happen on .NET Core as well?
If not, we will have to move the bug - we do not track Desktop issues on GH
cc @davidsh
cc: @terrajobst
.NET Framework bugs should NOT be reported to this repo. Instead, they should be reported on developercommunity.visualstudio.com.
Here is an example bug that was originally opened in GitHub but moved:
https://developercommunity.visualstudio.com/content/problem/154698/deadlock-between-httpclienthandler-and-httpwebrequ.html
We suggest customers use the developercommunity.visualstudio.com portal to report issues with .NET Framework. Doing so will allow the right product group people to get involved, get an internal .NET Framework bug generated, and provide a channel for posting repro code and/or additional information back to the product team as well as report back status to the person opening the bug.
We have moved the bug here so that it will be logged as a bug in .NET Framework.
https://developercommunity.visualstudio.com/content/problem/163070/making-a-web-request-with-cachepolicy-and-fiddler.html
You will be able to track status from there.
FYI:
The fix is part of .NET 4.8 EAP:
https://github.com/Microsoft/dotnet-framework-early-access/blob/master/release-notes/NET48/dotnet-48-changes.md#networking
@karelz Thanks for the update. That's great news.