You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
@ -2,7 +2,8 @@
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.props" />
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>4.0.3.0</AssemblyVersion>
|
||||
<AssemblyVersion>4.0.3.1</AssemblyVersion>
|
||||
<PackageVersion>4.5.2</PackageVersion>
|
||||
<AssemblyKey>MSFT</AssemblyKey>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -5,12 +5,16 @@
|
||||
<ProjectReference Include="..\ref\System.Net.Http.WinHttpHandler.csproj">
|
||||
<SupportedFramework>net461;netcoreapp2.0;$(AllXamarinFrameworks)</SupportedFramework>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\src\System.Net.Http.WinHttpHandler.csproj" />
|
||||
<ProjectReference Include="..\src\System.Net.Http.WinHttpHandler.csproj">
|
||||
<SupportedFramework>net461;netcoreapp2.0;$(AllXamarinFrameworks)</SupportedFramework>
|
||||
</ProjectReference>
|
||||
<HarvestIncludePaths Include="lib/net46;runtimes/win/lib/net46" />
|
||||
<HarvestIncludePaths Include="ref/netstandard1.3">
|
||||
<SupportedFramework>netcore50</SupportedFramework>
|
||||
</HarvestIncludePaths>
|
||||
<HarvestIncludePaths Include="runtimes/win/lib/netstandard1.3;lib/netstandard1.3" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Excluding the reference assets on the package so that RAR will see the run-time conflicts at build time in order to
|
||||
generate the right binding redirects when targeting Desktop. https://github.com/dotnet/corefx/issues/32457 -->
|
||||
<ExcludeReferenceAssets>true</ExcludeReferenceAssets>
|
||||
</PropertyGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
@ -33,9 +33,6 @@
|
||||
<Compile Include="$(CommonPath)\System\IO\StreamHelpers.CopyValidation.cs">
|
||||
<Link>Common\System\IO\StreamHelpers.CopyValidation.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\HttpVersionInternal.cs">
|
||||
<Link>Common\System\Net\HttpVersionInternal.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\Logging\NetEventSource.Common.cs">
|
||||
<Link>Common\System\Net\Logging\NetEventSource.Common.cs</Link>
|
||||
</Compile>
|
||||
|
@ -147,7 +147,7 @@ namespace System.Net.Http
|
||||
out authTarget))
|
||||
{
|
||||
// WinHTTP returns an error for schemes it doesn't handle.
|
||||
// So, we need to ignore the error and just let it stay at 401.
|
||||
// So, we need to ignore the error and just let it stay at 407.
|
||||
break;
|
||||
}
|
||||
|
||||
@ -155,7 +155,13 @@ namespace System.Net.Http
|
||||
// But we can validate with assert.
|
||||
Debug.Assert(authTarget == Interop.WinHttp.WINHTTP_AUTH_TARGET_PROXY);
|
||||
|
||||
proxyAuthScheme = ChooseAuthScheme(supportedSchemes, state.Proxy.GetProxy(state.RequestMessage.RequestUri), proxyCreds);
|
||||
proxyAuthScheme = ChooseAuthScheme(
|
||||
supportedSchemes,
|
||||
// TODO: Issue #6997. If Proxy==null, we're using the system proxy which is possibly
|
||||
// discovered/calculated with a PAC file. So, we can't determine the actual proxy uri at
|
||||
// this point since it is calculated internally in WinHTTP. For now, pass in null for the uri.
|
||||
state.Proxy?.GetProxy(state.RequestMessage.RequestUri),
|
||||
proxyCreds);
|
||||
state.RetryRequest = true;
|
||||
break;
|
||||
|
||||
@ -378,6 +384,15 @@ namespace System.Net.Http
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (uri == null && !(credentials is NetworkCredential))
|
||||
{
|
||||
// TODO: Issue #6997.
|
||||
// If the credentials are a NetworkCredential, the uri isn't used when calling .GetCredential() since
|
||||
// it will work against all uri's. Otherwise, credentials is probably a CredentialCache and passing in
|
||||
// null for a uri is invalid.
|
||||
return 0;
|
||||
}
|
||||
|
||||
foreach (uint authScheme in s_authSchemePriorityOrder)
|
||||
{
|
||||
if ((supportedSchemes & authScheme) != 0 && credentials.GetCredential(uri, s_authSchemeStringMapping[authScheme]) != null)
|
||||
|
@ -47,13 +47,11 @@ namespace System.Net.Http
|
||||
public class WinHttpHandler : HttpMessageHandler
|
||||
#endif
|
||||
{
|
||||
#if NET46
|
||||
// These are normally defined already in System.Net.Primitives as part of the HttpVersion type.
|
||||
// However, these are not part of 'netstandard'. WinHttpHandler currently builds against
|
||||
// 'netstandard' so we need to add these definitions here.
|
||||
internal static readonly Version HttpVersion20 = new Version(2, 0);
|
||||
internal static readonly Version HttpVersionUnknown = new Version(0, 0);
|
||||
#else
|
||||
internal static Version HttpVersion20 => HttpVersionInternal.Version20;
|
||||
internal static Version HttpVersionUnknown => HttpVersionInternal.Unknown;
|
||||
#endif
|
||||
private static readonly TimeSpan s_maxTimeout = TimeSpan.FromMilliseconds(int.MaxValue);
|
||||
|
||||
[ThreadStatic]
|
||||
@ -792,11 +790,11 @@ namespace System.Net.Http
|
||||
// Try to use the requested version if a known/supported version was explicitly requested.
|
||||
// Otherwise, we simply use winhttp's default.
|
||||
string httpVersion = null;
|
||||
if (state.RequestMessage.Version == HttpVersionInternal.Version10)
|
||||
if (state.RequestMessage.Version == HttpVersion.Version10)
|
||||
{
|
||||
httpVersion = "HTTP/1.0";
|
||||
}
|
||||
else if (state.RequestMessage.Version == HttpVersionInternal.Version11)
|
||||
else if (state.RequestMessage.Version == HttpVersion.Version11)
|
||||
{
|
||||
httpVersion = "HTTP/1.1";
|
||||
}
|
||||
|
@ -46,8 +46,8 @@ namespace System.Net.Http
|
||||
{
|
||||
int versionLength = GetResponseHeader(requestHandle, Interop.WinHttp.WINHTTP_QUERY_VERSION, buffer);
|
||||
response.Version =
|
||||
CharArrayHelpers.EqualsOrdinalAsciiIgnoreCase("HTTP/1.1", buffer, 0, versionLength) ? HttpVersionInternal.Version11 :
|
||||
CharArrayHelpers.EqualsOrdinalAsciiIgnoreCase("HTTP/1.0", buffer, 0, versionLength) ? HttpVersionInternal.Version10 :
|
||||
CharArrayHelpers.EqualsOrdinalAsciiIgnoreCase("HTTP/1.1", buffer, 0, versionLength) ? HttpVersion.Version11 :
|
||||
CharArrayHelpers.EqualsOrdinalAsciiIgnoreCase("HTTP/1.0", buffer, 0, versionLength) ? HttpVersion.Version10 :
|
||||
WinHttpHandler.HttpVersionUnknown;
|
||||
}
|
||||
|
||||
|
@ -55,9 +55,6 @@
|
||||
<Compile Include="$(CommonPath)\System\Net\HttpStatusDescription.cs">
|
||||
<Link>Common\System\Net\HttpStatusDescription.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\HttpVersionInternal.cs">
|
||||
<Link>Common\System\Net\HttpVersionInternal.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Net\Logging\NetEventSource.Common.cs">
|
||||
<Link>Common\System\Net\Logging\NetEventSource.Common.cs</Link>
|
||||
</Compile>
|
||||
|
Reference in New Issue
Block a user