We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5033a6f commit 484dfffCopy full SHA for 484dfff
1 file changed
src/Skybrud.Essentials.Http/HttpRequest.cs
@@ -435,6 +435,14 @@ public virtual IHttpResponse GetResponse(Action<HttpWebRequest> callback) {
435
436
#endif
437
438
+ } catch (AggregateException ex) {
439
+
440
+ if (ex.InnerException is WebException web && web.Status == WebExceptionStatus.ProtocolError) {
441
+ return HttpResponse.GetFromWebResponse(web.Response as HttpWebResponse, this);
442
+ }
443
444
+ throw;
445
446
} catch (WebException ex) {
447
if (ex.Status != WebExceptionStatus.ProtocolError) throw;
448
return HttpResponse.GetFromWebResponse(ex.Response as HttpWebResponse, this);
0 commit comments