Updates for PR feedback

This commit is contained in:
Louis DeJardin 2015-09-17 18:22:09 -07:00
parent d3a87c4c14
commit 04f6446a50
5 changed files with 2 additions and 9 deletions

View File

@ -24,8 +24,6 @@ namespace SampleApp
context.Request.Path,
context.Request.QueryString);
await context.Request.Body.CopyToAsync(Console.OpenStandardOutput());
context.Response.ContentLength = 11;
context.Response.ContentType = "text/plain";
await context.Response.WriteAsync("Hello world");

View File

@ -13,6 +13,7 @@
}
},
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel",
"run": "Microsoft.AspNet.Server.Kestrel",
"run-socket": "Microsoft.AspNet.Server.Kestrel --server.urls http://unix:/tmp/kestrel-test.sock",
"kestrel": "Microsoft.AspNet.Server.Kestrel"

View File

@ -12,9 +12,6 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
{
public class Connection : ConnectionContext, IConnectionControl
{
private const int EOF = -4095;
private const int ECONNRESET = -4077;
private static readonly Action<UvStreamHandle, int, int, Exception, object> _readCallback = ReadCallback;
private static readonly Func<UvStreamHandle, int, object, Libuv.uv_buf_t> _allocCallback = AllocCallback;

View File

@ -9,10 +9,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNet.Server.Kestrel.Infrastructure;
using Microsoft.Framework.Logging;
using Microsoft.Framework.Primitives;
using System.Numerics;
using Microsoft.AspNet.Hosting.Builder;
// ReSharper disable AccessToModifiedClosure

View File

@ -211,7 +211,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
void ISocketOutput.Write(ArraySegment<byte> buffer, bool immediate)
{
((ISocketOutput)this).WriteAsync(buffer, immediate).Wait();
((ISocketOutput)this).WriteAsync(buffer, immediate).GetAwaiter().GetResult();
}
Task ISocketOutput.WriteAsync(ArraySegment<byte> buffer, bool immediate, CancellationToken cancellationToken)