8000 Always use managed https transport · dotdevelop/libgit2sharp@868eb38 · GitHub
[go: up one dir, main page]

Skip to content

Commit 868eb38

Browse files
committed
Always use managed https transport
1 parent 9b6043f commit 868eb38

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

LibGit2Sharp/Core/NativeMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ private static void InitializeNativeLibrary()
197197
}
198198

199199
// Configure the .NET HTTP(S) mechanism on the first initialization of the library in the current process.
200-
if (initCounter == 1 && GlobalSettings.ManagedHttpSmartSubtransportEnabled)
200+
if (initCounter == 1)
201201
{
202202
httpSubtransportRegistration = GlobalSettings.RegisterDefaultSmartSubtransport<ManagedHttpSmartSubtransport>("http");
203203
httpsSubtransportRegistration = GlobalSettings.RegisterDefaultSmartSubtransport<ManagedHttpSmartSubtransport>("https");

LibGit2Sharp/GlobalSettings.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ public static class GlobalSettings
2222
private static bool nativeLibraryPathLocked;
2323
private static string nativeLibraryDefaultPath;
2424

25-
private static bool useManagedHttpSmartSubtransport = true;
26-
2725
internal class SmartSubtransportData
2826
{
2927
internal bool isCustom;
@@ -83,8 +81,6 @@ private static string GetExecutingAssemblyDirectory()
8381
/// </summary>
8482
public static Version Version => version.Value;
8583

86-
internal static bool ManagedHttpSmartSubtransportEnabled => RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || useManagedHttpSmartSubtransport;
87-
8884
private static SmartSubtransportData GetOrCreateSmartSubtransportData(string scheme)
8985
{
9086
Ensure.ArgumentNotNull(scheme, "scheme");
@@ -539,13 +535,5 @@ public static string GetUserAgent()
539535
{
540536
return Proxy.git_libgit2_opts_get_user_agent();
541537
}
542-
543-
/// <summary>
544-
/// Enables the native http implementation. This can only be enabled on Windows or macOS.
545-
/// </summary>
546-
public static void UseNativeHttpTransport()
547-
{
548-
useManagedHttpSmartSubtransport = false;
549-
}
550538
}
551539
}

0 commit comments

Comments
 (0)
0