Skip to content

Commit 0b6ffe8

Browse files
committed
Merge pull request #634 from jeffa00/master
ServicePointManager to ServicePoint Change: changes the behavior from setting the default for all future ServicePoints but not the current one to just setting the current one.
2 parents a6b86a5 + ed52046 commit 0b6ffe8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

RestSharp/Http.Async.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ private HttpWebRequest ConfigureAsyncWebRequest(string method, Uri url)
443443
}
444444

445445
webRequest.AutomaticDecompression = DecompressionMethods.Deflate | DecompressionMethods.GZip | DecompressionMethods.None;
446-
ServicePointManager.Expect100Continue = false;
446+
447+
webRequest.ServicePoint.Expect100Continue = false;
447448

448449
if (Timeout != 0)
449450
{

RestSharp/Http.Sync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private HttpWebRequest ConfigureWebRequest(string method, Uri url)
254254
#endif
255255
webRequest.PreAuthenticate = PreAuthenticate;
256256

257-
ServicePointManager.Expect100Continue = false;
257+
webRequest.ServicePoint.Expect100Continue = false;
258258

259259
AppendHeaders(webRequest);
260260
AppendCookies(webRequest);

0 commit comments

Comments
 (0)