使用NancyFX、自托管和mono的浏览器中出现奇怪的响应

使用NancyFX、自托管和mono的浏览器中出现奇怪的响应,mono,nancy,self-hosting,Mono,Nancy,Self Hosting,以下是我的测试代码: public class MyModule : NancyModule { public MyModule() { Get["/resources/{resourceId}"] = x => { var kurt = (string)x.resourceId; return Response.AsText(kurt); }; } } class Program { static void Main(st

以下是我的测试代码:

public class MyModule : NancyModule
{
  public MyModule()
  {
    Get["/resources/{resourceId}"] = x =>
    {
      var kurt = (string)x.resourceId;
      return Response.AsText(kurt);
    };
  }
}

class Program
{
  static void Main(string[] args)
  {
    using (var host = new NancyHost(new Uri("http://localhost:1234")))
    {
      host.Start();
      Console.WriteLine("Running on http://localhost:1234");
      Console.ReadLine();
    }
  }
}
当我从VS运行此程序时,它会按预期工作,但当我使用mono.exe托管.exe时,我会在浏览器中看到:

P/1.1 200 OK
Content-Type: text/plain
Server: Mono-HTTPAPI/1.0
Date: Fri, 07 Oct 2016 10:58:32 GMT
Transfer-Encoding: chunked
Keep-Alive: timeout=15,max=100

4
test
0

浏览器似乎可以理解响应标题。但是为什么呢?

Mono版本:Mono JIT编译器版本4.6.1(Visual Studio构建的Mono)版权所有(C)2002-2014 Novell,Inc.和Xamarin Inc.以及贡献者。www.mono-project.com TLS:normal SIGSEGV:normal通知:线程+轮询体系结构:x86已禁用:无其他:softdebug LLVM:受支持,未启用。GC:sgenWorks支持Mono版本3.12.1,但实际应用程序使用的类型不在3.12.1中…Mono版本:Mono JIT编译器版本4.6.1(Visual Studio构建的Mono)版权(C)2002-2014 Novell,Inc.和Xamarin Inc.及贡献者。www.mono-project.com TLS:normal SIGSEGV:normal通知:线程+轮询体系结构:x86已禁用:无其他:softdebug LLVM:受支持,未启用。GC:SGen3.12.1版本的Mono可以使用,但实际应用程序使用的类型不在3.12.1版本中。。。