Merge pull request #750 from aspnet/pakrym/merge-release-4-3

Merge release/2.1 into dev
This commit is contained in:
Pavel Krymets 2018-04-03 10:45:39 -07:00 committed by GitHub
commit 336a042b8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 19 deletions

View File

@ -16,6 +16,8 @@
<SignAssembly>true</SignAssembly>
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- https://github.com/aspnet/IISIntegration/issues/617 -->
<EnableApiCheck>false</EnableApiCheck>
</PropertyGroup>
</Project>

View File

@ -35,14 +35,14 @@
<MicrosoftNetHttpHeadersPackageVersion>2.1.0-preview3-32094</MicrosoftNetHttpHeadersPackageVersion>
<MicrosoftNETTestSdkPackageVersion>15.6.1</MicrosoftNETTestSdkPackageVersion>
<MicrosoftWebAdministrationPackageVersion>7.0.0</MicrosoftWebAdministrationPackageVersion>
<SystemBuffersPackageVersion>4.5.0-preview2-26326-04</SystemBuffersPackageVersion>
<SystemIOPipelinesPackageVersion>4.5.0-preview2-26326-04</SystemIOPipelinesPackageVersion>
<SystemBuffersPackageVersion>4.5.0-preview2-26313-01</SystemBuffersPackageVersion>
<SystemIOPipelinesPackageVersion>4.5.0-preview2-26313-01</SystemIOPipelinesPackageVersion>
<SystemManagementAutomationPackageVersion>6.1.7601.17515</SystemManagementAutomationPackageVersion>
<SystemMemoryPackageVersion>4.5.0-preview2-26326-04</SystemMemoryPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>4.5.0-preview2-26326-04</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemNumericsVectorsPackageVersion>4.5.0-preview2-26326-04</SystemNumericsVectorsPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>4.5.0-preview2-26326-04</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>4.5.0-preview2-26326-04</SystemSecurityPrincipalWindowsPackageVersion>
<SystemMemoryPackageVersion>4.5.0-preview2-26313-01</SystemMemoryPackageVersion>
<SystemNetWebSocketsWebSocketProtocolPackageVersion>4.5.0-preview2-26313-01</SystemNetWebSocketsWebSocketProtocolPackageVersion>
<SystemNumericsVectorsPackageVersion>4.5.0-preview2-26313-01</SystemNumericsVectorsPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>4.5.0-preview2-26313-01</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemSecurityPrincipalWindowsPackageVersion>4.5.0-preview2-26313-01</SystemSecurityPrincipalWindowsPackageVersion>
<Tooling_NewtonsoftJsonPackageVersion>9.0.1</Tooling_NewtonsoftJsonPackageVersion>
<XunitPackageVersion>2.3.1</XunitPackageVersion>
<XunitRunnerVisualStudioPackageVersion>2.4.0-beta.1.build3945</XunitRunnerVisualStudioPackageVersion>

View File

@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
internal Task WriteAsync(ReadOnlyMemory<byte> memory, CancellationToken cancellationToken = default(CancellationToken))
{
// Want to keep exceptions consistent,
// Want to keep exceptions consistent,
if (!_hasResponseStarted)
{
return WriteAsyncAwaited(memory, cancellationToken);
@ -135,7 +135,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
await writeTask;
}
// ConsumeAsync is called when either the first read or first write is done.
// ConsumeAsync is called when either the first read or first write is done.
// There are two modes for reading and writing to the request/response bodies without upgrade.
// 1. Await all reads and try to read from the Output pipe
// 2. Done reading and await all writes.
@ -265,7 +265,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{
ref var handle = ref handles[currentChunk];
ref var chunk = ref pDataChunks[currentChunk];
handle = b.Retain(true);
handle = b.Pin();
chunk.DataChunkType = HttpApiTypes.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
chunk.fromMemory.BufferLength = (uint)b.Length;
@ -281,13 +281,13 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
{
handle.Dispose();
}
return hr;
}
private unsafe IISAwaitable FlushToIISAsync()
{
// Calls flush
// Calls flush
var hr = 0;
hr = NativeMethods.HttpFlushResponseBytes(_pInProcessHandler, out var fCompletionExpected);
if (!fCompletionExpected)
@ -356,9 +356,9 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
return;
}
// Now we handle the read.
// Now we handle the read.
var memory = Input.Writer.GetMemory();
_inputHandle = memory.Retain(true);
_inputHandle = memory.Pin();
try
{
@ -368,7 +368,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
// read value of 0 == done reading
// read value of -1 == read cancelled, still allowed to read but we
// need a write to occur first.
// need a write to occur first.
if (read == 0)
{
break;
@ -388,7 +388,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
// Flush the read data for the Input Pipe writer
var flushResult = await Input.Writer.FlushAsync();
// If the pipe was closed, we are done reading,
// If the pipe was closed, we are done reading,
if (flushResult.IsCompleted || flushResult.IsCanceled)
{
break;
@ -437,7 +437,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
}
else
{
// Flush of zero bytes will
// Flush of zero bytes will
await FlushToIISAsync();
}
}

View File

@ -110,7 +110,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
ref var handle = ref handles[currentChunk];
ref var chunk = ref pDataChunks[currentChunk];
handle = b.Retain(true);
handle = b.Pin();
chunk.DataChunkType = HttpApiTypes.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
chunk.fromMemory.BufferLength = (uint)b.Length;
@ -152,7 +152,7 @@ namespace Microsoft.AspNetCore.Server.IISIntegration
while (true)
{
var memory = Input.Writer.GetMemory();
_inputHandle = memory.Retain(true);
_inputHandle = memory.Pin();
try
{