Change HTTP default request version to HTTP/2 (dotnet/corefx#27079)
authorCaesar Chen <caesar1995@users.noreply.github.com>
Tue, 13 Feb 2018 23:24:22 +0000 (15:24 -0800)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2018 23:24:22 +0000 (15:24 -0800)
* change http default request version

* fix innerloop test

Commit migrated from https://github.com/dotnet/corefx/commit/f7a852f64bf20889579be70710f386a8d4802a34

src/libraries/System.Net.Http/src/System/Net/Http/HttpUtilities.cs
src/libraries/System.Net.Http/tests/FunctionalTests/HttpRequestMessageTest.cs

index ea3269d..cc471b3 100644 (file)
@@ -14,12 +14,8 @@ namespace System.Net.Http
 {
     internal static class HttpUtilities
     {
-        internal static Version DefaultRequestVersion =>
-#if uap
-            HttpVersionInternal.Version20;
-#else
-            HttpVersionInternal.Version11;
-#endif
+        internal static Version DefaultRequestVersion => HttpVersionInternal.Version20;
+
         internal static Version DefaultResponseVersion => HttpVersionInternal.Version11;
 
         internal static bool IsHttpUri(Uri uri)
index bfc4d50..3261d0f 100644 (file)
@@ -14,7 +14,7 @@ namespace System.Net.Http.Functional.Tests
 {
     public class HttpRequestMessageTest
     {
-        Version _expectedRequestMessageVersion = PlatformDetection.IsUap ? new Version(2,0) : new Version(1, 1);
+        Version _expectedRequestMessageVersion = !PlatformDetection.IsFullFramework ? new Version(2,0) : new Version(1, 1);
 
         [Fact]
         public void Ctor_Default_CorrectDefaults()