Skip to content

Commit a6e7477

Browse files
committed
copy callback property to the web request
1 parent 26abc69 commit a6e7477

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

RestSharp/Http.Async.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,9 @@ private HttpWebRequest ConfigureAsyncWebRequest(string method, Uri url)
485485

486486
#if !SILVERLIGHT
487487
webRequest.AllowAutoRedirect = this.FollowRedirects;
488+
#endif
489+
#if NET45
490+
webRequest.ServerCertificateValidationCallback = this.RemoteCertificateValidationCallback;
488491
#endif
489492
return webRequest;
490493
}

RestSharp/Http.Sync.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,10 @@ private HttpWebRequest ConfigureWebRequest(string method, Uri url)
312312
webRequest.MaximumAutomaticRedirections = this.MaxRedirects.Value;
313313
}
314314

315+
#if NET45
316+
webRequest.ServerCertificateValidationCallback = this.RemoteCertificateValidationCallback;
317+
#endif
318+
315319
return webRequest;
316320
}
317321
}

0 commit comments

Comments
 (0)