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
Don't crash on captive networks that intercept SSL
Some captive WiFi networks intercept SSL traffic using an untrusted
certificate. This causes HttpWebRequest.EndGetRequestStream to throw a
TrustFailure WebException with the following message:
The underlying connection was closed: Could not establish trust
relationship for the SSL/TLS secure channel.
Http.RequestStreamCallback was ignoring this exception, which caused us
to call HttpWebRequest.BeginGetResponse even though we hadn't written
the request body to the request stream. This caused a
ProtocolViolationException to be thrown and was the cause of the crash.
We now handle all kinds of exceptions (and still special-case
RequestCanceled exceptions). I made a similar change in
Http.ResponseCallback even though I didn't personally run into a bug
there.
0 commit comments