Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit a6f4984

Browse files
committed
Merge pull request #1865 from dotnet-bot/from-tfs
Merge changes from TFS
2 parents c799bf3 + 7c551c4 commit a6f4984

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/System.Net.Http/src/System/Net/HttpRequestMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ private void InitializeValues(HttpMethod method, Uri requestUri)
189189

190190
_method = method;
191191
_requestUri = requestUri;
192-
_version = HttpUtilities.DefaultVersion;
192+
_version = HttpUtilities.DefaultRequestVersion;
193193
}
194194

195195
internal bool MarkAsSent()

src/System.Net.Http/src/System/Net/HttpResponseMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public HttpResponseMessage(HttpStatusCode statusCode)
139139
}
140140

141141
_statusCode = statusCode;
142-
_version = HttpUtilities.DefaultVersion;
142+
_version = HttpUtilities.DefaultResponseVersion;
143143

144144
if (Logging.On) Logging.Exit(Logging.Http, this, ".ctor", null);
145145
}

src/System.Net.Http/src/System/Net/HttpUtilities.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ namespace System.Net.Http
1414
{
1515
internal static class HttpUtilities
1616
{
17-
internal static readonly Version DefaultVersion = HttpVersion.Version11;
17+
#if NETNative
18+
internal static readonly Version DefaultRequestVersion = HttpVersion.Version20;
19+
#else
20+
internal static readonly Version DefaultRequestVersion = HttpVersion.Version11;
21+
#endif
22+
internal static readonly Version DefaultResponseVersion = HttpVersion.Version11;
1823

1924
internal static bool IsHttpUri(Uri uri)
2025
{

0 commit comments

Comments
 (0)