#69 - Make WebListener target Net45.
This commit is contained in:
parent
4350866536
commit
8bbf5db1ac
|
|
@ -39,12 +39,12 @@ namespace Microsoft.Net.Http.Server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class AuthenticationManager
|
public sealed class AuthenticationManager
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
private static readonly int AuthInfoSize =
|
|
||||||
Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_SERVER_AUTHENTICATION_INFO));
|
|
||||||
#else
|
|
||||||
private static readonly int AuthInfoSize =
|
private static readonly int AuthInfoSize =
|
||||||
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_SERVER_AUTHENTICATION_INFO>();
|
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_SERVER_AUTHENTICATION_INFO>();
|
||||||
|
#else
|
||||||
|
private static readonly int AuthInfoSize =
|
||||||
|
Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_SERVER_AUTHENTICATION_INFO));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private WebListener _server;
|
private WebListener _server;
|
||||||
|
|
@ -163,7 +163,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
&& requestInfo->InfoType == UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeAuth
|
&& requestInfo->InfoType == UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeAuth
|
||||||
&& requestInfo->pInfo->AuthStatus == UnsafeNclNativeMethods.HttpApi.HTTP_AUTH_STATUS.HttpAuthStatusSuccess)
|
&& requestInfo->pInfo->AuthStatus == UnsafeNclNativeMethods.HttpApi.HTTP_AUTH_STATUS.HttpAuthStatusSuccess)
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -176,7 +176,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
&& requestInfo->InfoType == UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeAuth
|
&& requestInfo->InfoType == UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_INFO_TYPE.HttpRequestInfoTypeAuth
|
||||||
&& requestInfo->pInfo->AuthStatus == UnsafeNclNativeMethods.HttpApi.HTTP_AUTH_STATUS.HttpAuthStatusSuccess)
|
&& requestInfo->pInfo->AuthStatus == UnsafeNclNativeMethods.HttpApi.HTTP_AUTH_STATUS.HttpAuthStatusSuccess)
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
return new WindowsPrincipal(new WindowsIdentity(requestInfo->pInfo->AccessToken,
|
return new WindowsPrincipal(new WindowsIdentity(requestInfo->pInfo->AccessToken,
|
||||||
GetAuthTypeFromRequest(requestInfo->pInfo->AuthType).ToString()));
|
GetAuthTypeFromRequest(requestInfo->pInfo->AuthType).ToString()));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,12 @@ namespace Microsoft.Net.Http.Server
|
||||||
|
|
||||||
static ComNetOS()
|
static ComNetOS()
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
|
// TODO: SkipIOCPCallbackOnSuccess doesn't work on Win7. Need a way to detect Win7 vs 8+.
|
||||||
|
IsWin8orLater = false;
|
||||||
|
#else
|
||||||
var win8Version = new Version(6, 2);
|
var win8Version = new Version(6, 2);
|
||||||
IsWin8orLater = (Environment.OSVersion.Version >= win8Version);
|
IsWin8orLater = (Environment.OSVersion.Version >= win8Version);
|
||||||
#else
|
|
||||||
IsWin8orLater = true;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ using System.Diagnostics;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Security;
|
using System.Security;
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
{
|
{
|
||||||
internal static class HttpSysSettings
|
internal static class HttpSysSettings
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
private const string HttpSysParametersKey = @"System\CurrentControlSet\Services\HTTP\Parameters";
|
private const string HttpSysParametersKey = @"System\CurrentControlSet\Services\HTTP\Parameters";
|
||||||
#endif
|
#endif
|
||||||
private const bool EnableNonUtf8Default = true;
|
private const bool EnableNonUtf8Default = true;
|
||||||
|
|
@ -61,7 +61,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void ReadHttpSysRegistrySettings()
|
private static void ReadHttpSysRegistrySettings()
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Environment.HasShutdownStarted
|
return Environment.HasShutdownStarted
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
|| AppDomain.CurrentDomain.IsFinalizingForUnload()
|
|| AppDomain.CurrentDomain.IsFinalizingForUnload()
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
{
|
{
|
||||||
return _requestStream.ReadByte();
|
return _requestStream.ReadByte();
|
||||||
}
|
}
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
public override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||||
{
|
{
|
||||||
return _requestStream.BeginRead(buffer, offset, count, callback, state);
|
return _requestStream.BeginRead(buffer, offset, count, callback, state);
|
||||||
|
|
@ -143,7 +143,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
{
|
{
|
||||||
_responseStream.WriteByte(value);
|
_responseStream.WriteByte(value);
|
||||||
}
|
}
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state)
|
||||||
{
|
{
|
||||||
return _responseStream.BeginWrite(buffer, offset, count, callback, state);
|
return _responseStream.BeginWrite(buffer, offset, count, callback, state);
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ using System.Net;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
#endif
|
#endif
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
|
||||||
|
|
@ -198,10 +198,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
public override unsafe IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
|
||||||
#else
|
|
||||||
public unsafe IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
public unsafe IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||||
|
#else
|
||||||
|
public override unsafe IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
ValidateReadBuffer(buffer, offset, size);
|
ValidateReadBuffer(buffer, offset, size);
|
||||||
|
|
@ -291,10 +291,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
return asyncResult;
|
return asyncResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
public override int EndRead(IAsyncResult asyncResult)
|
|
||||||
#else
|
|
||||||
public int EndRead(IAsyncResult asyncResult)
|
public int EndRead(IAsyncResult asyncResult)
|
||||||
|
#else
|
||||||
|
public override int EndRead(IAsyncResult asyncResult)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (asyncResult == null)
|
if (asyncResult == null)
|
||||||
|
|
@ -425,20 +425,20 @@ namespace Microsoft.Net.Http.Server
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
|
throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
|
||||||
#else
|
|
||||||
public IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
public IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||||
|
#else
|
||||||
|
public override IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
|
throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
public override void EndWrite(IAsyncResult asyncResult)
|
|
||||||
#else
|
|
||||||
public void EndWrite(IAsyncResult asyncResult)
|
public void EndWrite(IAsyncResult asyncResult)
|
||||||
|
#else
|
||||||
|
public override void EndWrite(IAsyncResult asyncResult)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
|
throw new InvalidOperationException(Resources.Exception_ReadOnlyStream);
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
// TODO: False triggers more detailed/correct parsing, but it's rather slow.
|
// TODO: False triggers more detailed/correct parsing, but it's rather slow.
|
||||||
UseCookedRequestUrl = true; // SettingsSectionInternal.Section.HttpListenerUnescapeRequestUrl;
|
UseCookedRequestUrl = true; // SettingsSectionInternal.Section.HttpListenerUnescapeRequestUrl;
|
||||||
Utf8Encoding = new UTF8Encoding(false, true);
|
Utf8Encoding = new UTF8Encoding(false, true);
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
AnsiEncoding = Encoding.GetEncoding(0, new EncoderExceptionFallback(), new DecoderExceptionFallback());
|
|
||||||
#else
|
|
||||||
AnsiEncoding = Utf8Encoding;
|
AnsiEncoding = Utf8Encoding;
|
||||||
|
#else
|
||||||
|
AnsiEncoding = Encoding.GetEncoding(0, new EncoderExceptionFallback(), new DecoderExceptionFallback());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -702,10 +702,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
|
|
||||||
knownHeaderInfo[_nativeResponse.ResponseInfoCount].Type = UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE_INFO_TYPE.HttpResponseInfoTypeMultipleKnownHeaders;
|
knownHeaderInfo[_nativeResponse.ResponseInfoCount].Type = UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE_INFO_TYPE.HttpResponseInfoTypeMultipleKnownHeaders;
|
||||||
knownHeaderInfo[_nativeResponse.ResponseInfoCount].Length =
|
knownHeaderInfo[_nativeResponse.ResponseInfoCount].Length =
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
(uint)Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS));
|
|
||||||
#else
|
|
||||||
(uint)Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS>();
|
(uint)Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS>();
|
||||||
|
#else
|
||||||
|
(uint)Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS header = new UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS();
|
UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS header = new UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS();
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,7 @@ namespace Microsoft.Net.Http.Server
|
||||||
throw new InvalidOperationException(Resources.Exception_WriteOnlyStream);
|
throw new InvalidOperationException(Resources.Exception_WriteOnlyStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
public override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
public override IAsyncResult BeginRead(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException(Resources.Exception_WriteOnlyStream);
|
throw new InvalidOperationException(Resources.Exception_WriteOnlyStream);
|
||||||
|
|
@ -360,10 +360,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
|
|
||||||
// TODO: Verbose log data written
|
// TODO: Verbose log data written
|
||||||
}
|
}
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
public override unsafe IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
|
||||||
#else
|
|
||||||
public unsafe IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
public unsafe IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||||
|
#else
|
||||||
|
public override unsafe IAsyncResult BeginWrite(byte[] buffer, int offset, int size, AsyncCallback callback, object state)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (buffer == null)
|
if (buffer == null)
|
||||||
|
|
@ -465,10 +465,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
|
|
||||||
return asyncResult;
|
return asyncResult;
|
||||||
}
|
}
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
public override void EndWrite(IAsyncResult asyncResult)
|
|
||||||
#else
|
|
||||||
public void EndWrite(IAsyncResult asyncResult)
|
public void EndWrite(IAsyncResult asyncResult)
|
||||||
|
#else
|
||||||
|
public override void EndWrite(IAsyncResult asyncResult)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (asyncResult == null)
|
if (asyncResult == null)
|
||||||
|
|
|
||||||
|
|
@ -140,12 +140,12 @@ namespace Microsoft.Net.Http.Server
|
||||||
overlapped.AsyncResult = this;
|
overlapped.AsyncResult = this;
|
||||||
|
|
||||||
int bufferSize = 1024 * 64; // TODO: Validate buffer size choice.
|
int bufferSize = 1024 * 64; // TODO: Validate buffer size choice.
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
|
_fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, bufferSize /*, useAsync: true*/); // Extremely expensive.
|
||||||
|
#else
|
||||||
// It's too expensive to validate anything before opening the file. Open the file and then check the lengths.
|
// It's too expensive to validate anything before opening the file. Open the file and then check the lengths.
|
||||||
_fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, bufferSize,
|
_fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, bufferSize,
|
||||||
FileOptions.Asynchronous | FileOptions.SequentialScan); // Extremely expensive.
|
FileOptions.Asynchronous | FileOptions.SequentialScan); // Extremely expensive.
|
||||||
#else
|
|
||||||
_fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, bufferSize /*, useAsync: true*/); // Extremely expensive.
|
|
||||||
#endif
|
#endif
|
||||||
long length = _fileStream.Length; // Expensive
|
long length = _fileStream.Length; // Expensive
|
||||||
if (offset < 0 || offset > length)
|
if (offset < 0 || offset > length)
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,12 @@ namespace Microsoft.Net.Http.Server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class TimeoutManager
|
public sealed class TimeoutManager
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
private static readonly int TimeoutLimitSize =
|
|
||||||
Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_TIMEOUT_LIMIT_INFO));
|
|
||||||
#else
|
|
||||||
private static readonly int TimeoutLimitSize =
|
private static readonly int TimeoutLimitSize =
|
||||||
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_TIMEOUT_LIMIT_INFO>();
|
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_TIMEOUT_LIMIT_INFO>();
|
||||||
|
#else
|
||||||
|
private static readonly int TimeoutLimitSize =
|
||||||
|
Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_TIMEOUT_LIMIT_INFO));
|
||||||
#endif
|
#endif
|
||||||
private WebListener _server;
|
private WebListener _server;
|
||||||
private int[] _timeouts;
|
private int[] _timeouts;
|
||||||
|
|
|
||||||
|
|
@ -44,17 +44,17 @@ namespace Microsoft.Net.Http.Server
|
||||||
public sealed class WebListener : IDisposable
|
public sealed class WebListener : IDisposable
|
||||||
{
|
{
|
||||||
private const long DefaultRequestQueueLength = 1000; // Http.sys default.
|
private const long DefaultRequestQueueLength = 1000; // Http.sys default.
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
|
private static readonly int RequestChannelBindStatusSize =
|
||||||
|
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>();
|
||||||
|
private static readonly int BindingInfoSize =
|
||||||
|
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_BINDING_INFO>();
|
||||||
|
#else
|
||||||
private static readonly Type ChannelBindingStatusType = typeof(UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS);
|
private static readonly Type ChannelBindingStatusType = typeof(UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS);
|
||||||
private static readonly int RequestChannelBindStatusSize =
|
private static readonly int RequestChannelBindStatusSize =
|
||||||
Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS));
|
Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS));
|
||||||
private static readonly int BindingInfoSize =
|
private static readonly int BindingInfoSize =
|
||||||
Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_BINDING_INFO));
|
Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_BINDING_INFO));
|
||||||
#else
|
|
||||||
private static readonly int RequestChannelBindStatusSize =
|
|
||||||
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>();
|
|
||||||
private static readonly int BindingInfoSize =
|
|
||||||
Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_BINDING_INFO>();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Win8# 559317 fixed a bug in Http.sys's HttpReceiveClientCertificate method.
|
// Win8# 559317 fixed a bug in Http.sys's HttpReceiveClientCertificate method.
|
||||||
|
|
@ -819,10 +819,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
|
|
||||||
knownHeaderInfo[httpResponse.ResponseInfoCount].Type = UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE_INFO_TYPE.HttpResponseInfoTypeMultipleKnownHeaders;
|
knownHeaderInfo[httpResponse.ResponseInfoCount].Type = UnsafeNclNativeMethods.HttpApi.HTTP_RESPONSE_INFO_TYPE.HttpResponseInfoTypeMultipleKnownHeaders;
|
||||||
knownHeaderInfo[httpResponse.ResponseInfoCount].Length =
|
knownHeaderInfo[httpResponse.ResponseInfoCount].Length =
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
(uint)Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS));
|
|
||||||
#else
|
|
||||||
(uint)Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS>();
|
(uint)Marshal.SizeOf<UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS>();
|
||||||
|
#else
|
||||||
|
(uint)Marshal.SizeOf(typeof(UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS header = new UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS();
|
UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS header = new UnsafeNclNativeMethods.HttpApi.HTTP_MULTIPLE_KNOWN_HEADERS();
|
||||||
|
|
@ -911,10 +911,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
private static int GetTokenOffsetFromBlob(IntPtr blob)
|
private static int GetTokenOffsetFromBlob(IntPtr blob)
|
||||||
{
|
{
|
||||||
Debug.Assert(blob != IntPtr.Zero);
|
Debug.Assert(blob != IntPtr.Zero);
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
IntPtr tokenPointer = Marshal.ReadIntPtr(blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelToken"));
|
|
||||||
#else
|
|
||||||
IntPtr tokenPointer = Marshal.ReadIntPtr(blob, (int)Marshal.OffsetOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>("ChannelToken"));
|
IntPtr tokenPointer = Marshal.ReadIntPtr(blob, (int)Marshal.OffsetOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>("ChannelToken"));
|
||||||
|
#else
|
||||||
|
IntPtr tokenPointer = Marshal.ReadIntPtr(blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelToken"));
|
||||||
#endif
|
#endif
|
||||||
Debug.Assert(tokenPointer != IntPtr.Zero);
|
Debug.Assert(tokenPointer != IntPtr.Zero);
|
||||||
return (int)IntPtrHelper.Subtract(tokenPointer, blob);
|
return (int)IntPtrHelper.Subtract(tokenPointer, blob);
|
||||||
|
|
@ -923,10 +923,10 @@ namespace Microsoft.Net.Http.Server
|
||||||
private static int GetTokenSizeFromBlob(IntPtr blob)
|
private static int GetTokenSizeFromBlob(IntPtr blob)
|
||||||
{
|
{
|
||||||
Debug.Assert(blob != IntPtr.Zero);
|
Debug.Assert(blob != IntPtr.Zero);
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
return Marshal.ReadInt32(blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelTokenSize"));
|
|
||||||
#else
|
|
||||||
return Marshal.ReadInt32(blob, (int)Marshal.OffsetOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>("ChannelTokenSize"));
|
return Marshal.ReadInt32(blob, (int)Marshal.OffsetOf<UnsafeNclNativeMethods.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS>("ChannelTokenSize"));
|
||||||
|
#else
|
||||||
|
return Marshal.ReadInt32(blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelTokenSize"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,12 @@ namespace Microsoft.Net.Http.Server
|
||||||
: base(errorCode, message)
|
: base(errorCode, message)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
|
public int ErrorCode
|
||||||
|
#else
|
||||||
// the base class returns the HResult with this property
|
// the base class returns the HResult with this property
|
||||||
// we need the Win32 Error Code, hence the override.
|
// we need the Win32 Error Code, hence the override.
|
||||||
public override int ErrorCode
|
public override int ErrorCode
|
||||||
#else
|
|
||||||
public int ErrorCode
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
//
|
//
|
||||||
// ==--==
|
// ==--==
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
namespace Microsoft.Win32.SafeHandles
|
namespace Microsoft.Win32.SafeHandles
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
//
|
//
|
||||||
// ==--==
|
// ==--==
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
namespace Microsoft.Win32.SafeHandles
|
namespace Microsoft.Win32.SafeHandles
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
// </copyright>
|
// </copyright>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
|
||||||
|
|
@ -21,17 +21,13 @@
|
||||||
// </copyright>
|
// </copyright>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
namespace System
|
namespace System
|
||||||
{
|
{
|
||||||
internal static class ExternDll
|
internal static class ExternDll
|
||||||
{
|
{
|
||||||
#if ASPNETCORE50
|
|
||||||
public const string api_ms_win_core_localization_LIB = "api-ms-win-core-localization-l2-1-0.dll";
|
public const string api_ms_win_core_localization_LIB = "api-ms-win-core-localization-l2-1-0.dll";
|
||||||
#else
|
|
||||||
public const string Kernel32 = "kernel32.dll";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
**
|
**
|
||||||
=============================================================================*/
|
=============================================================================*/
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
namespace System.Runtime.InteropServices
|
namespace System.Runtime.InteropServices
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
// </copyright>
|
// </copyright>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
|
@ -36,11 +36,7 @@ namespace System
|
||||||
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000,
|
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000,
|
||||||
FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000;
|
FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000;
|
||||||
|
|
||||||
#if ASPNETCORE50
|
|
||||||
[DllImport(ExternDll.api_ms_win_core_localization_LIB, CharSet = System.Runtime.InteropServices.CharSet.Unicode, SetLastError = true, BestFitMapping = true)]
|
[DllImport(ExternDll.api_ms_win_core_localization_LIB, CharSet = System.Runtime.InteropServices.CharSet.Unicode, SetLastError = true, BestFitMapping = true)]
|
||||||
#else
|
|
||||||
[DllImport(ExternDll.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Unicode, SetLastError = true, BestFitMapping = true)]
|
|
||||||
#endif
|
|
||||||
public static unsafe extern int FormatMessage(int dwFlags, IntPtr lpSource_mustBeNull, uint dwMessageId,
|
public static unsafe extern int FormatMessage(int dwFlags, IntPtr lpSource_mustBeNull, uint dwMessageId,
|
||||||
int dwLanguageId, StringBuilder lpBuffer, int nSize, IntPtr[] arguments);
|
int dwLanguageId, StringBuilder lpBuffer, int nSize, IntPtr[] arguments);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
"allowUnsafe": true
|
"allowUnsafe": true
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"aspnet50": {},
|
"net45": { },
|
||||||
|
"aspnet50": { },
|
||||||
"aspnetcore50": {
|
"aspnetcore50": {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.Net.WebSocketAbstractions": "1.0.0-*",
|
"Microsoft.Net.WebSocketAbstractions": "1.0.0-*",
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ namespace Microsoft.Net.WebSockets
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Environment.HasShutdownStarted
|
return Environment.HasShutdownStarted
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
|| AppDomain.CurrentDomain.IsFinalizingForUnload()
|
|| AppDomain.CurrentDomain.IsFinalizingForUnload()
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
|
||||||
|
|
@ -173,10 +173,10 @@ namespace Microsoft.Net.WebSockets
|
||||||
|
|
||||||
static WebSocketProtocolComponent()
|
static WebSocketProtocolComponent()
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
DllFileName = Path.Combine(Environment.SystemDirectory, WEBSOCKET);
|
|
||||||
#else
|
|
||||||
DllFileName = Path.Combine(Environment.GetEnvironmentVariable("SYSTEMROOT"), "System32", WEBSOCKET);
|
DllFileName = Path.Combine(Environment.GetEnvironmentVariable("SYSTEMROOT"), "System32", WEBSOCKET);
|
||||||
|
#else
|
||||||
|
DllFileName = Path.Combine(Environment.SystemDirectory, WEBSOCKET);
|
||||||
#endif
|
#endif
|
||||||
WebSocketDllHandle = SafeLoadLibrary.LoadLibraryEx(DllFileName);
|
WebSocketDllHandle = SafeLoadLibrary.LoadLibraryEx(DllFileName);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1103,7 +1103,7 @@ namespace Microsoft.Net.WebSockets
|
||||||
|
|
||||||
if (thisLockTaken || sessionHandleLockTaken)
|
if (thisLockTaken || sessionHandleLockTaken)
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
RuntimeHelpers.PrepareConstrainedRegions();
|
RuntimeHelpers.PrepareConstrainedRegions();
|
||||||
#endif
|
#endif
|
||||||
try
|
try
|
||||||
|
|
@ -1189,7 +1189,7 @@ namespace Microsoft.Net.WebSockets
|
||||||
Contract.Assert(lockObject != null, "'lockObject' MUST NOT be NULL.");
|
Contract.Assert(lockObject != null, "'lockObject' MUST NOT be NULL.");
|
||||||
if (lockTaken)
|
if (lockTaken)
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
RuntimeHelpers.PrepareConstrainedRegions();
|
RuntimeHelpers.PrepareConstrainedRegions();
|
||||||
#endif
|
#endif
|
||||||
try
|
try
|
||||||
|
|
@ -2253,7 +2253,9 @@ namespace Microsoft.Net.WebSockets
|
||||||
"'webSocket.m_KeepAliveTracker' MUST NOT be NULL at this point.");
|
"'webSocket.m_KeepAliveTracker' MUST NOT be NULL at this point.");
|
||||||
int keepAliveIntervalMilliseconds = (int)_keepAliveInterval.TotalMilliseconds;
|
int keepAliveIntervalMilliseconds = (int)_keepAliveInterval.TotalMilliseconds;
|
||||||
Contract.Assert(keepAliveIntervalMilliseconds > 0, "'keepAliveIntervalMilliseconds' MUST be POSITIVE.");
|
Contract.Assert(keepAliveIntervalMilliseconds > 0, "'keepAliveIntervalMilliseconds' MUST be POSITIVE.");
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
|
_keepAliveTimer = new Timer(_keepAliveTimerElapsedCallback, webSocket, keepAliveIntervalMilliseconds, Timeout.Infinite);
|
||||||
|
#else
|
||||||
if (ExecutionContext.IsFlowSuppressed())
|
if (ExecutionContext.IsFlowSuppressed())
|
||||||
{
|
{
|
||||||
_keepAliveTimer = new Timer(_keepAliveTimerElapsedCallback, webSocket, keepAliveIntervalMilliseconds, Timeout.Infinite);
|
_keepAliveTimer = new Timer(_keepAliveTimerElapsedCallback, webSocket, keepAliveIntervalMilliseconds, Timeout.Infinite);
|
||||||
|
|
@ -2265,8 +2267,6 @@ namespace Microsoft.Net.WebSockets
|
||||||
_keepAliveTimer = new Timer(_keepAliveTimerElapsedCallback, webSocket, keepAliveIntervalMilliseconds, Timeout.Infinite);
|
_keepAliveTimer = new Timer(_keepAliveTimerElapsedCallback, webSocket, keepAliveIntervalMilliseconds, Timeout.Infinite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
_keepAliveTimer = new Timer(_keepAliveTimerElapsedCallback, webSocket, keepAliveIntervalMilliseconds, Timeout.Infinite);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,12 +50,12 @@ namespace Microsoft.Net.WebSockets
|
||||||
public const int MinSendBufferSize = 16;
|
public const int MinSendBufferSize = 16;
|
||||||
internal const int MinReceiveBufferSize = 256;
|
internal const int MinReceiveBufferSize = 256;
|
||||||
internal const int MaxBufferSize = 64 * 1024;
|
internal const int MaxBufferSize = 64 * 1024;
|
||||||
#if ASPNET50
|
#if ASPNETCORE50
|
||||||
private static readonly int SizeOfUInt = Marshal.SizeOf(typeof(uint));
|
|
||||||
private static readonly int SizeOfBool = Marshal.SizeOf(typeof(bool));
|
|
||||||
#else
|
|
||||||
private static readonly int SizeOfUInt = Marshal.SizeOf<uint>();
|
private static readonly int SizeOfUInt = Marshal.SizeOf<uint>();
|
||||||
private static readonly int SizeOfBool = Marshal.SizeOf<bool>();
|
private static readonly int SizeOfBool = Marshal.SizeOf<bool>();
|
||||||
|
#else
|
||||||
|
private static readonly int SizeOfUInt = Marshal.SizeOf(typeof(uint));
|
||||||
|
private static readonly int SizeOfBool = Marshal.SizeOf(typeof(bool));
|
||||||
#endif
|
#endif
|
||||||
private static readonly int PropertyBufferSize = (2 * SizeOfUInt) + SizeOfBool + IntPtr.Size;
|
private static readonly int PropertyBufferSize = (2 * SizeOfUInt) + SizeOfBool + IntPtr.Size;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.Net.WebSockets
|
namespace Microsoft.Net.WebSockets
|
||||||
{
|
{
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2237:MarkISerializableTypesWithSerializable")]
|
||||||
#endif
|
#endif
|
||||||
internal sealed class WebSocketException : Win32Exception
|
internal sealed class WebSocketException : Win32Exception
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
//
|
//
|
||||||
// ==--==
|
// ==--==
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
namespace Microsoft.Win32.SafeHandles
|
namespace Microsoft.Win32.SafeHandles
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
// See the Apache 2 License for the specific language governing
|
// See the Apache 2 License for the specific language governing
|
||||||
// permissions and limitations under the License.
|
// permissions and limitations under the License.
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
// </copyright>
|
// </copyright>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
|
||||||
|
|
@ -21,17 +21,13 @@
|
||||||
// </copyright>
|
// </copyright>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
namespace System
|
namespace System
|
||||||
{
|
{
|
||||||
internal static class ExternDll
|
internal static class ExternDll
|
||||||
{
|
{
|
||||||
#if NETFX || ASPNET50
|
|
||||||
public const string Kernel32 = "kernel32.dll";
|
|
||||||
#else
|
|
||||||
public const string api_ms_win_core_localization_LIB = "api-ms-win-core-localization-l2-1-0.dll";
|
public const string api_ms_win_core_localization_LIB = "api-ms-win-core-localization-l2-1-0.dll";
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
**
|
**
|
||||||
=============================================================================*/
|
=============================================================================*/
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
namespace System.Runtime.InteropServices
|
namespace System.Runtime.InteropServices
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
// </copyright>
|
// </copyright>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
|
@ -36,11 +36,7 @@ namespace System
|
||||||
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000,
|
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000,
|
||||||
FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000;
|
FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000;
|
||||||
|
|
||||||
#if ASPNETCORE50
|
|
||||||
[DllImport(ExternDll.api_ms_win_core_localization_LIB, CharSet = System.Runtime.InteropServices.CharSet.Unicode, SetLastError = true, BestFitMapping = true)]
|
[DllImport(ExternDll.api_ms_win_core_localization_LIB, CharSet = System.Runtime.InteropServices.CharSet.Unicode, SetLastError = true, BestFitMapping = true)]
|
||||||
#else
|
|
||||||
[DllImport(ExternDll.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Unicode, SetLastError = true, BestFitMapping = true)]
|
|
||||||
#endif
|
|
||||||
public static unsafe extern int FormatMessage(int dwFlags, IntPtr lpSource_mustBeNull, uint dwMessageId,
|
public static unsafe extern int FormatMessage(int dwFlags, IntPtr lpSource_mustBeNull, uint dwMessageId,
|
||||||
int dwLanguageId, StringBuilder lpBuffer, int nSize, IntPtr[] arguments);
|
int dwLanguageId, StringBuilder lpBuffer, int nSize, IntPtr[] arguments);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
// See the Apache 2 License for the specific language governing
|
// See the Apache 2 License for the specific language governing
|
||||||
// permissions and limitations under the License.
|
// permissions and limitations under the License.
|
||||||
|
|
||||||
#if !ASPNET50
|
#if ASPNETCORE50
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
},
|
},
|
||||||
"compilationOptions" : { "allowUnsafe": true },
|
"compilationOptions" : { "allowUnsafe": true },
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"aspnet50" : { },
|
"net45" : { },
|
||||||
"aspnetcore50" : {
|
"aspnetcore50" : {
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.Win32.Primitives": "4.0.0.0",
|
"Microsoft.Win32.Primitives": "4.0.0.0",
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ namespace Microsoft.AspNet.Server.WebListener
|
||||||
Assert.Equal("Hello World", response);
|
Assert.Equal("Hello World", response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if ASPNET50
|
#if !ASPNETCORE50
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task RequestBody_ReadBeginEnd_Success()
|
public async Task RequestBody_ReadBeginEnd_Success()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
{
|
{
|
||||||
"commands": {
|
"commands": {
|
||||||
"test": "Xunit.KRunner"
|
"test": "Xunit.KRunner"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.Net.Http.Server" : "",
|
"System.Net.Http": "4.0.0.0",
|
||||||
"Xunit.KRunner": "1.0.0-*"
|
"System.Runtime": "4.0.20.0",
|
||||||
},
|
"Microsoft.Net.Http.Server": "1.0.0-*",
|
||||||
"frameworks": {
|
"Xunit.KRunner": "1.0.0-*"
|
||||||
"aspnet50": {
|
},
|
||||||
"dependencies": {
|
"frameworks": {
|
||||||
"System.Net.Http": "",
|
"net45": {
|
||||||
"System.Net.Http.WebRequest": "",
|
dependencies: {
|
||||||
"System.Runtime": ""
|
"System.Net.Http.WebRequest": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue