diff --git a/HTTPServer.cs b/HTTPServer.cs
index be583ee..87db9bc 100644
--- a/HTTPServer.cs
+++ b/HTTPServer.cs
@@ -147,7 +147,7 @@ namespace ln.http
HttpResponse response;
try
{
- response = Router.Route(httpRequest.URI.AbsolutePath,httpRequest);
+ response = Router.Route(new HttpRoutingContext(httpRequest),httpRequest);
}
catch (HttpException httpExc)
{
@@ -234,7 +234,7 @@ namespace ln.http
}
if (argumentContainer['c'].IsSet)
- router.AddSimpleRoute("/*", new RouterTarget((request) => router.Route(argumentContainer['c'].Value,request)),0);
+ router.AddSimpleRoute("/*", new RouterTarget((request) => router.Route(new HttpRoutingContext(request, argumentContainer['c'].Value), request)), 0);
HTTPServer server = new HTTPServer(new Endpoint(IPv6.Parse(argumentContainer['l'].Value),argumentContainer['p'].IntegerValue),
new LoggingRouter(router));
diff --git a/HttpRequest.cs b/HttpRequest.cs
index 88ec6fc..80e5245 100644
--- a/HttpRequest.cs
+++ b/HttpRequest.cs
@@ -232,6 +232,7 @@ namespace ln.http
return requestCookies[name];
}
+ public bool ContainsParameter(string parameterName) => requestParameters.ContainsKey(parameterName);
public String GetParameter(String parameterName) => GetParameter(parameterName, null);
public String GetParameter(String parameterName,String defaultValue)
{
@@ -249,15 +250,16 @@ namespace ln.http
}
-
- public HttpResponse Redirect(string location,int status = 307)
+ public HttpResponse Redirect(string location, params object[] p) => Redirect(303, location, p);
+ public HttpResponse Redirect(int status, string location, params object[] p)
{
- HttpResponse httpResponse = new HttpResponse(this);
- httpResponse.AddHeader("location", location);
- httpResponse.StatusCode = status;
- httpResponse.AddHeader("content-type", "text/plain");
- httpResponse.ContentWriter.WriteLine("Redirect: {0}", location);
- return httpResponse;
+ location = string.Format(location, p);
+
+ HttpResponse response = new HttpResponse(this);
+ response.StatusCode = status;
+ response.SetHeader("location", location);
+ return response;
+
}
public void Dispose()
diff --git a/HttpRouter.cs b/HttpRouter.cs
index 99e1bca..1ed78b1 100644
--- a/HttpRouter.cs
+++ b/HttpRouter.cs
@@ -1,5 +1,6 @@
using System;
using ln.logging;
+using ln.http.router;
namespace ln.http
{
public abstract class HttpRouter : IHttpRouter
@@ -10,7 +11,7 @@ namespace ln.http
public abstract IHTTPResource FindResource(HttpRequest httpRequest);
- public virtual HttpResponse Route(string path,HttpRequest httpRequest)
+ public virtual HttpResponse Route(HttpRoutingContext routingContext, HttpRequest httpRequest)
{
try
{
diff --git a/IHttpRouter.cs b/IHttpRouter.cs
index 866a5cb..3934d8a 100644
--- a/IHttpRouter.cs
+++ b/IHttpRouter.cs
@@ -1,8 +1,9 @@
using System;
+using ln.http.router;
namespace ln.http
{
public interface IHttpRouter
{
- HttpResponse Route(string path, HttpRequest httpRequest);
+ HttpResponse Route(HttpRoutingContext routingContext, HttpRequest httpRequest);
}
}
diff --git a/exceptions/UnsupportedMediaTypeException.cs b/exceptions/UnsupportedMediaTypeException.cs
new file mode 100644
index 0000000..ee795d0
--- /dev/null
+++ b/exceptions/UnsupportedMediaTypeException.cs
@@ -0,0 +1,20 @@
+// /**
+// * File: UnsupportedMediaTypeException.cs
+// * Author: haraldwolff
+// *
+// * This file and it's content is copyrighted by the Author and / or copyright holder.
+// * Any use wihtout proper permission is illegal and may lead to legal actions.
+// *
+// *
+// **/
+using System;
+namespace ln.http.exceptions
+{
+ public class UnsupportedMediaTypeException : HttpException
+ {
+ public UnsupportedMediaTypeException()
+ : base(415, "Unsupported Media Type")
+ {
+ }
+ }
+}
diff --git a/ln.http.csproj b/ln.http.csproj
index 2299c76..180f481 100644
--- a/ln.http.csproj
+++ b/ln.http.csproj
@@ -85,6 +85,8 @@
+
+
diff --git a/mono_crash.153ec3754c.0.json b/mono_crash.153ec3754c.0.json
new file mode 100644
index 0000000..3b71156
--- /dev/null
+++ b/mono_crash.153ec3754c.0.json
@@ -0,0 +1,2296 @@
+{
+ "protocol_version" : "0.0.4",
+ "configuration" : {
+ "version" : "(6.4.0.198) (tarball)",
+ "tlc" : "__thread",
+ "sigsgev" : "altstack",
+ "notifications" : "epoll",
+ "architecture" : "amd64",
+ "disabled_features" : "none",
+ "smallconfig" : "disabled",
+ "bigarrays" : "disabled",
+ "softdebug" : "enabled",
+ "interpreter" : "enabled",
+ "llvm_support" : "610",
+ "suspend" : "hybrid"
+ },
+ "memory" : {
+ "minor_gc_time" : "625547",
+ "major_gc_time" : "57821",
+ "minor_gc_count" : "27",
+ "major_gc_count" : "1",
+ "major_gc_time_concurrent" : "190119"
+ },
+ "threads" : [
+ {
+ "is_managed" : false,
+ "offset_free_hash" : "0x0",
+ "offset_rich_hash" : "0x0",
+ "crashed" : false,
+ "native_thread_id" : "0x7f84409ee700",
+ "thread_info_addr" : "0x7f84380008d0",
+ "thread_name" : "mono",
+ "ctx" : {
+ "IP" : "0x7f84448d63f9",
+ "SP" : "0x7f84409edb70",
+ "BP" : "(nil)"
+ },
+ "unmanaged_frames" : [
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+
+ ]
+ },
+ {
+ "is_managed" : true,
+ "offset_free_hash" : "0x8bf38afbe",
+ "offset_rich_hash" : "0x8bf38b229",
+ "crashed" : false,
+ "native_thread_id" : "0x7f84405ec700",
+ "thread_info_addr" : "0x7f843002d780",
+ "thread_name" : "Thread Pool Wor",
+ "ctx" : {
+ "IP" : "0x7f84448d600c",
+ "SP" : "0x7f84405ea450",
+ "BP" : "(nil)"
+ },
+ "managed_frames" : [
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x00000",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x00000"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+ "token" : "0x6000084",
+ "native_offset" : "0x0",
+ "filename" : "MonoDevelop.MSBuildBuilder.exe",
+ "sizeofimage" : "0x14000",
+ "timestamp" : "0xde5f999a",
+ "il_offset" : "0x000ef"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+ "token" : "0x600009d",
+ "native_offset" : "0x0",
+ "filename" : "MonoDevelop.MSBuildBuilder.exe",
+ "sizeofimage" : "0x14000",
+ "timestamp" : "0xde5f999a",
+ "il_offset" : "0x0006e"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+ "token" : "0x600007b",
+ "native_offset" : "0x0",
+ "filename" : "MonoDevelop.MSBuildBuilder.exe",
+ "sizeofimage" : "0x14000",
+ "timestamp" : "0xde5f999a",
+ "il_offset" : "0x0006d"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+ "token" : "0x00000",
+ "native_offset" : "0x0",
+ "filename" : "MonoDevelop.MSBuildBuilder.exe",
+ "sizeofimage" : "0x14000",
+ "timestamp" : "0xde5f999a",
+ "il_offset" : "0x0002a"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x00000",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0000c"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60048ac",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0xffffffff"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+ "token" : "0x6000039",
+ "native_offset" : "0x0",
+ "filename" : "MonoDevelop.MSBuildBuilder.exe",
+ "sizeofimage" : "0x14000",
+ "timestamp" : "0xde5f999a",
+ "il_offset" : "0x00019"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+ "token" : "0x6000166",
+ "native_offset" : "0x0",
+ "filename" : "MonoDevelop.MSBuildBuilder.exe",
+ "sizeofimage" : "0x14000",
+ "timestamp" : "0xde5f999a",
+ "il_offset" : "0x00029"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+ "token" : "0x6000181",
+ "native_offset" : "0x0",
+ "filename" : "MonoDevelop.MSBuildBuilder.exe",
+ "sizeofimage" : "0x14000",
+ "timestamp" : "0xde5f999a",
+ "il_offset" : "0x00001"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x6001fcc",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0xffffffff"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x00000",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002a"
+ }
+
+ ],
+ "unmanaged_frames" : [
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+
+ ]
+},
+{
+ "is_managed" : false,
+ "offset_free_hash" : "0x0",
+ "offset_rich_hash" : "0x0",
+ "crashed" : false,
+ "native_thread_id" : "0x7f8428eff700",
+ "thread_info_addr" : "0x7f83e80008d0",
+ "thread_name" : "Thread Pool Wor",
+ "ctx" : {
+ "IP" : "0x7f84448d8a82",
+ "SP" : "0x7f8428efec60",
+ "BP" : "0x555670e33648"
+ },
+ "unmanaged_frames" : [
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "native_address" : "unregistered"
+ }
+
+ ]
+},
+{
+ "is_managed" : true,
+ "offset_free_hash" : "0x153ec3754c",
+ "offset_rich_hash" : "0x153ec387f6",
+ "crashed" : true,
+ "native_thread_id" : "0x7f842b231700",
+ "thread_info_addr" : "0x7f8414000b20",
+ "thread_name" : "RequestBuilder ",
+ "ctx" : {
+ "IP" : "0x555670b364f0",
+ "SP" : "0x7f842b22e240",
+ "BP" : "0x487227e"
+ },
+ "managed_frames" : [
+ {
+ "native_address" : "unregistered"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x00000",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x00000"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "ADC1D4EB-9C7D-4BA0-ABDD-8D6AB7DBAECA",
+ "token" : "0x6000014",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.NET.Build.Extensions.Tasks.dll",
+ "sizeofimage" : "0x1e000",
+ "timestamp" : "0xfa3a0142",
+ "il_offset" : "0x00021"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "ADC1D4EB-9C7D-4BA0-ABDD-8D6AB7DBAECA",
+ "token" : "0x6000012",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.NET.Build.Extensions.Tasks.dll",
+ "sizeofimage" : "0x1e000",
+ "timestamp" : "0xfa3a0142",
+ "il_offset" : "0x00021"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "ADC1D4EB-9C7D-4BA0-ABDD-8D6AB7DBAECA",
+ "token" : "0x6000011",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.NET.Build.Extensions.Tasks.dll",
+ "sizeofimage" : "0x1e000",
+ "timestamp" : "0xfa3a0142",
+ "il_offset" : "0x00000"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "ADC1D4EB-9C7D-4BA0-ABDD-8D6AB7DBAECA",
+ "token" : "0x600004f",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.NET.Build.Extensions.Tasks.dll",
+ "sizeofimage" : "0x1e000",
+ "timestamp" : "0xfa3a0142",
+ "il_offset" : "0x00000"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x600130e",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x00029"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x600203e",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x002a9"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60045fd",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002c"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x60011b3",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x0004d"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x6002039",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x00065"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60045fd",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002c"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x60011b1",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x0004d"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x6002035",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x0019d"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60045fd",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002c"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x60011ac",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x00044"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x6002033",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x0015e"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60045fd",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002c"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x60011ab",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x00033"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x6002031",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x0018b"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60045fd",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002c"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x60011a6",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x00068"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x600202f",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x0005f"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60045fd",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002c"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x6001180",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x0004d"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x600202d",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x002b7"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60045f2",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002c"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x6001179",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x00044"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x6002027",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x00414"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x60024c7",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0xffffffff"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+ "token" : "0x6002010",
+ "native_offset" : "0x0",
+ "filename" : "Microsoft.Build.dll",
+ "sizeofimage" : "0x194000",
+ "timestamp" : "0xd4fae8af",
+ "il_offset" : "0x0001a"
+ }
+,
+ {
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x00000",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002a"
+ }
+
+ ],
+"unmanaged_frames" : [
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f842a87b700",
+"thread_info_addr" : "0x7f840c000b20",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+ "IP" : "0x7f84448d8a82",
+ "SP" : "0x7f842a87ac60",
+ "BP" : "0x555670e33648"
+},
+"unmanaged_frames" : [
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f842ac07700",
+"thread_info_addr" : "0x7f8408044950",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+ "IP" : "0x7f84448d8a82",
+ "SP" : "0x7f842ac06c60",
+ "BP" : "0x555670e33648"
+},
+"unmanaged_frames" : [
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f8429922700",
+"thread_info_addr" : "0x7f83f40008d0",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+ "IP" : "0x7f84448d8a82",
+ "SP" : "0x7f8429921c60",
+ "BP" : "0x555670e33648"
+},
+"unmanaged_frames" : [
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f8444904f80",
+"thread_info_addr" : "0x555670f6e300",
+"thread_name" : "mono",
+"ctx" : {
+ "IP" : "0x7f84448d600c",
+ "SP" : "0x7ffd430817d0",
+ "BP" : "(nil)"
+},
+"unmanaged_frames" : [
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "native_address" : "unregistered"
+ }
+
+]
+},
+{
+"is_managed" : true,
+"offset_free_hash" : "0x46f25bae1",
+"offset_rich_hash" : "0x46f25bbee",
+"crashed" : false,
+"native_thread_id" : "0x7f8440bef700",
+"thread_info_addr" : "0x7f8434000b20",
+"thread_name" : "mono",
+"ctx" : {
+ "IP" : "0x7f84448d9882",
+ "SP" : "0x7f8440bee350",
+ "BP" : "(nil)"
+},
+"managed_frames" : [
+{
+ "native_address" : "unregistered"
+ }
+,
+{
+ "is_managed" : "true",
+ "guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+ "token" : "0x00000",
+ "native_offset" : "0x0",
+ "filename" : "System.dll",
+ "sizeofimage" : "0x286000",
+ "timestamp" : "0xd21fc5ef",
+ "il_offset" : "0x00000"
+ }
+,
+{
+ "is_managed" : "true",
+ "guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+ "token" : "0x60021c8",
+ "native_offset" : "0x0",
+ "filename" : "System.dll",
+ "sizeofimage" : "0x286000",
+ "timestamp" : "0xd21fc5ef",
+ "il_offset" : "0x0000c"
+ }
+,
+{
+ "is_managed" : "true",
+ "guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+ "token" : "0x60021bc",
+ "native_offset" : "0x0",
+ "filename" : "System.dll",
+ "sizeofimage" : "0x286000",
+ "timestamp" : "0xd21fc5ef",
+ "il_offset" : "0x0002e"
+ }
+,
+{
+ "is_managed" : "true",
+ "guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+ "token" : "0x6002156",
+ "native_offset" : "0x0",
+ "filename" : "System.dll",
+ "sizeofimage" : "0x286000",
+ "timestamp" : "0xd21fc5ef",
+ "il_offset" : "0x00000"
+ }
+,
+{
+ "is_managed" : "true",
+ "guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+ "token" : "0x6002113",
+ "native_offset" : "0x0",
+ "filename" : "System.dll",
+ "sizeofimage" : "0x286000",
+ "timestamp" : "0xd21fc5ef",
+ "il_offset" : "0x0009b"
+ }
+,
+{
+ "is_managed" : "true",
+ "guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+ "token" : "0x600005d",
+ "native_offset" : "0x0",
+ "filename" : "MonoDevelop.MSBuildBuilder.exe",
+ "sizeofimage" : "0x14000",
+ "timestamp" : "0xde5f999a",
+ "il_offset" : "0x0000e"
+ }
+,
+{
+ "is_managed" : "true",
+ "guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+ "token" : "0x00000",
+ "native_offset" : "0x0",
+ "filename" : "mscorlib.dll",
+ "sizeofimage" : "0x46e000",
+ "timestamp" : "0xa0ecf22b",
+ "il_offset" : "0x0002a"
+ }
+
+],
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f84407ed700",
+"thread_info_addr" : "0x7f842c080750",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+"IP" : "0x7f84448d8a82",
+"SP" : "0x7f84407ecc60",
+"BP" : "0x555670e33648"
+},
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : true,
+"offset_free_hash" : "0x4e2348cf8",
+"offset_rich_hash" : "0x4e2348f2d",
+"crashed" : false,
+"native_thread_id" : "0x7f842bfff700",
+"thread_info_addr" : "0x7f8420000b20",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+"IP" : "0x7f84448d600c",
+"SP" : "0x7f842bffd8b0",
+"BP" : "(nil)"
+},
+"managed_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x00000"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+"token" : "0x6000b14",
+"native_offset" : "0x0",
+"filename" : "Microsoft.Build.dll",
+"sizeofimage" : "0x194000",
+"timestamp" : "0xd4fae8af",
+"il_offset" : "0x00053"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+"token" : "0x6000a2c",
+"native_offset" : "0x0",
+"filename" : "Microsoft.Build.dll",
+"sizeofimage" : "0x194000",
+"timestamp" : "0xd4fae8af",
+"il_offset" : "0x00008"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+"token" : "0x60000a0",
+"native_offset" : "0x0",
+"filename" : "MonoDevelop.MSBuildBuilder.exe",
+"sizeofimage" : "0x14000",
+"timestamp" : "0xde5f999a",
+"il_offset" : "0x00065"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+"token" : "0x6000178",
+"native_offset" : "0x0",
+"filename" : "MonoDevelop.MSBuildBuilder.exe",
+"sizeofimage" : "0x14000",
+"timestamp" : "0xde5f999a",
+"il_offset" : "0x0012f"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+"token" : "0x6000085",
+"native_offset" : "0x0",
+"filename" : "MonoDevelop.MSBuildBuilder.exe",
+"sizeofimage" : "0x14000",
+"timestamp" : "0xde5f999a",
+"il_offset" : "0x0001c"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x0002a"
+}
+
+],
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : true,
+"offset_free_hash" : "0x2d1bac677",
+"offset_rich_hash" : "0x2d1bac6a4",
+"crashed" : false,
+"native_thread_id" : "0x7f8440257700",
+"thread_info_addr" : "0x7f8424000b20",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+"IP" : "0x7f84448d63f9",
+"SP" : "0x7f84402565b0",
+"BP" : "(nil)"
+},
+"managed_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x00000"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x6001f2b",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0xffffffff"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "F9C97B26-2149-4D4F-A382-A0BDDF871DA8",
+"token" : "0x6000176",
+"native_offset" : "0x0",
+"filename" : "MonoDevelop.MSBuildBuilder.exe",
+"sizeofimage" : "0x14000",
+"timestamp" : "0xde5f999a",
+"il_offset" : "0x00004"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x0002a"
+}
+
+],
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : true,
+"offset_free_hash" : "0x3e2a1a842",
+"offset_rich_hash" : "0x3e2a1aa27",
+"crashed" : false,
+"native_thread_id" : "0x7f8429e4b700",
+"thread_info_addr" : "0x7f83fc000b20",
+"thread_name" : "RequestBuilder ",
+"ctx" : {
+"IP" : "0x7f84448d600c",
+"SP" : "0x7f8429e4a280",
+"BP" : "(nil)"
+},
+"managed_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x00000"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x6001e28",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x000d9"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+"token" : "0x6003c23",
+"native_offset" : "0x0",
+"filename" : "System.dll",
+"sizeofimage" : "0x286000",
+"timestamp" : "0xd21fc5ef",
+"il_offset" : "0x00067"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+"token" : "0x60042ec",
+"native_offset" : "0x0",
+"filename" : "System.dll",
+"sizeofimage" : "0x286000",
+"timestamp" : "0xd21fc5ef",
+"il_offset" : "0x0004d"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+"token" : "0x6002010",
+"native_offset" : "0x0",
+"filename" : "Microsoft.Build.dll",
+"sizeofimage" : "0x194000",
+"timestamp" : "0xd4fae8af",
+"il_offset" : "0x0002e"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x0002a"
+}
+
+],
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f842a5f7700",
+"thread_info_addr" : "0x7f8400010480",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+"IP" : "0x7f84448d8a82",
+"SP" : "0x7f842a5f6c60",
+"BP" : "0x555670e33648"
+},
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f8443f07700",
+"thread_info_addr" : "0x7f843c000b20",
+"thread_name" : "Finalizer",
+"ctx" : {
+"IP" : "0x7f84448d8896",
+"SP" : "0x7f8443f06c80",
+"BP" : "0x555670e32d20"
+},
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : true,
+"offset_free_hash" : "0x3e2a1a842",
+"offset_rich_hash" : "0x3e2a1aa27",
+"crashed" : false,
+"native_thread_id" : "0x7f842a1f5700",
+"thread_info_addr" : "0x7f83f8000b20",
+"thread_name" : "RequestBuilder ",
+"ctx" : {
+"IP" : "0x7f84448d600c",
+"SP" : "0x7f842a1f4280",
+"BP" : "(nil)"
+},
+"managed_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x00000"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x6001e28",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x000d9"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+"token" : "0x6003c23",
+"native_offset" : "0x0",
+"filename" : "System.dll",
+"sizeofimage" : "0x286000",
+"timestamp" : "0xd21fc5ef",
+"il_offset" : "0x00067"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "2703BBAA-0A6E-4686-B603-3C2DDDB1A363",
+"token" : "0x60042ec",
+"native_offset" : "0x0",
+"filename" : "System.dll",
+"sizeofimage" : "0x286000",
+"timestamp" : "0xd21fc5ef",
+"il_offset" : "0x0004d"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+"token" : "0x6002010",
+"native_offset" : "0x0",
+"filename" : "Microsoft.Build.dll",
+"sizeofimage" : "0x194000",
+"timestamp" : "0xd4fae8af",
+"il_offset" : "0x0002e"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x0002a"
+}
+
+],
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : true,
+"offset_free_hash" : "0x15b1c48ca",
+"offset_rich_hash" : "0x15b1c48f4",
+"crashed" : false,
+"native_thread_id" : "0x7f842bd7f700",
+"thread_info_addr" : "0x7f8418000b20",
+"thread_name" : "Timer-Scheduler",
+"ctx" : {
+"IP" : "0x7f84448d63f9",
+"SP" : "0x7f842bd7de90",
+"BP" : "(nil)"
+},
+"managed_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x00000"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x0002a"
+}
+
+],
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f8429b23700",
+"thread_info_addr" : "0x7f83f00008d0",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+"IP" : "0x7f84448d8a82",
+"SP" : "0x7f8429b22c60",
+"BP" : "0x555670e33648"
+},
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : true,
+"offset_free_hash" : "0x34c923327",
+"offset_rich_hash" : "0x34c923397",
+"crashed" : false,
+"native_thread_id" : "0x7f842b272700",
+"thread_info_addr" : "0x7f8410000b20",
+"thread_name" : "In-proc Node (D",
+"ctx" : {
+"IP" : "0x7f84448d600c",
+"SP" : "0x7f842b270e70",
+"BP" : "(nil)"
+},
+"managed_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x00000"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x600202e",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0xffffffff"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+"token" : "0x60010aa",
+"native_offset" : "0x0",
+"filename" : "Microsoft.Build.dll",
+"sizeofimage" : "0x194000",
+"timestamp" : "0xd4fae8af",
+"il_offset" : "0x00047"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "B695B167-88DD-418C-BE8B-4D98F7A92FF3",
+"token" : "0x60012c4",
+"native_offset" : "0x0",
+"filename" : "Microsoft.Build.dll",
+"sizeofimage" : "0x194000",
+"timestamp" : "0xd4fae8af",
+"il_offset" : "0x00000"
+}
+,
+{
+"is_managed" : "true",
+"guid" : "285579F5-4AF4-4A2C-A048-DAD6BE20E190",
+"token" : "0x00000",
+"native_offset" : "0x0",
+"filename" : "mscorlib.dll",
+"sizeofimage" : "0x46e000",
+"timestamp" : "0xa0ecf22b",
+"il_offset" : "0x0002a"
+}
+
+],
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+},
+{
+"is_managed" : false,
+"offset_free_hash" : "0x0",
+"offset_rich_hash" : "0x0",
+"crashed" : false,
+"native_thread_id" : "0x7f8428afd700",
+"thread_info_addr" : "0x7f83e00008d0",
+"thread_name" : "Thread Pool Wor",
+"ctx" : {
+"IP" : "0x7f84448d8a82",
+"SP" : "0x7f8428afcc60",
+"BP" : "0x555670e33648"
+},
+"unmanaged_frames" : [
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+,
+{
+"native_address" : "unregistered"
+}
+
+]
+}
+]
+}
\ No newline at end of file
diff --git a/router/FileRouter.cs b/router/FileRouter.cs
index cdef10d..135ad8d 100644
--- a/router/FileRouter.cs
+++ b/router/FileRouter.cs
@@ -23,7 +23,7 @@ namespace ln.http.router
FileName = filename;
}
- public HttpResponse Route(string path, HttpRequest httpRequest)
+ public HttpResponse Route(HttpRoutingContext routingContext, HttpRequest httpRequest)
{
HttpResponse httpResponse = new HttpResponse(httpRequest, new FileStream(FileName, FileMode.Open));
httpResponse.SetHeader("content-type", MimeTypeMap.GetMimeType(Path.GetExtension(FileName)));
diff --git a/router/HttpRoutingContext.cs b/router/HttpRoutingContext.cs
new file mode 100644
index 0000000..7927a42
--- /dev/null
+++ b/router/HttpRoutingContext.cs
@@ -0,0 +1,31 @@
+using System;
+namespace ln.http.router
+{
+ public class HttpRoutingContext
+ {
+ public HttpRequest HttpRequest { get; }
+
+ public string Path { get; set; }
+ public string RoutedPath { get; set; }
+
+ public HttpRoutingContext(HttpRequest httpRequest) : this(httpRequest, httpRequest.URI.AbsolutePath) { }
+ public HttpRoutingContext(HttpRequest httpRequest, string path)
+ {
+ HttpRequest = httpRequest;
+ Path = path;
+ RoutedPath = "";
+ }
+ HttpRoutingContext(HttpRequest httpRequest,string path,string routedPath)
+ {
+ HttpRequest = httpRequest;
+ Path = path;
+ RoutedPath = routedPath;
+ }
+
+ public HttpRoutingContext Routed(string residual)
+ {
+ return new HttpRoutingContext(HttpRequest, residual, RoutedPath + Path.Substring(0,Path.Length - residual.Length));
+ }
+
+ }
+}
diff --git a/router/LoggingRouter.cs b/router/LoggingRouter.cs
index 775a2cb..a8e13ea 100644
--- a/router/LoggingRouter.cs
+++ b/router/LoggingRouter.cs
@@ -26,15 +26,20 @@ namespace ln.http.router
Logger = logger;
}
- public HttpResponse Route(string path, HttpRequest httpRequest)
+ public HttpResponse Route(HttpRoutingContext routingContext, HttpRequest httpRequest)
{
DateTime start = DateTime.Now;
HttpResponse response = null;
try
{
- response = Next.Route(path, httpRequest);
- } finally
+ response = Next.Route(routingContext, httpRequest);
+ }
+ catch (Exception e)
+ {
+ throw;
+ }
+ finally
{
DateTime end = DateTime.Now;
TimeSpan duration = end - start;
diff --git a/router/RouterTarget.cs b/router/RouterTarget.cs
index 424c25e..1622a09 100644
--- a/router/RouterTarget.cs
+++ b/router/RouterTarget.cs
@@ -4,15 +4,19 @@ namespace ln.http.router
{
public class RouterTarget :IHttpRouter
{
- public Func Target { get; }
+ public Func Target { get; }
public RouterTarget(Func target)
+ {
+ Target = (HttpRoutingContext routingContext, HttpRequest httpRequest) => target(routingContext.Path, httpRequest);
+ }
+ public RouterTarget(Func target)
{
Target = target;
}
public RouterTarget(Func target)
{
- Target = (path,request) => target(request);
+ Target = (context,request) => target(request);
}
protected RouterTarget()
{
@@ -40,9 +44,9 @@ namespace ln.http.router
}
}
- public HttpResponse Route(string path, HttpRequest httpRequest)
+ public HttpResponse Route(HttpRoutingContext routingContext, HttpRequest httpRequest)
{
- return Target(path, httpRequest);
+ return Target(routingContext, httpRequest);
}
public virtual HttpResponse HEAD(HttpRequest request) => throw new MethodNotAllowedException();
diff --git a/router/SimpleRouter.cs b/router/SimpleRouter.cs
index 116416d..127a2a8 100644
--- a/router/SimpleRouter.cs
+++ b/router/SimpleRouter.cs
@@ -2,6 +2,7 @@
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Text;
+using System.Linq;
namespace ln.http.router
{
public class SimpleRouter : IHttpRouter
@@ -13,23 +14,29 @@ namespace ln.http.router
{
}
+ public void AddSimpleRoute(string simpleRoute, Func target) => AddSimpleRoute(simpleRoute, new RouterTarget(target));
+ public void AddSimpleRoute(string simpleRoute, Func target) => AddSimpleRoute(simpleRoute, new RouterTarget(target));
+ public void AddSimpleRoute(string simpleRoute, Func target) => AddSimpleRoute(simpleRoute, new RouterTarget(target));
public void AddSimpleRoute(string simpleRoute, IHttpRouter target) => AddSimpleRoute(simpleRoute, target, simpleRoute.Split('/').Length);
public void AddSimpleRoute(string simpleRoute, IHttpRouter target, int priority)
{
- string[] parts = simpleRoute.Split(new char[] { '/' },StringSplitOptions.RemoveEmptyEntries);
- StringBuilder stringBuilder = new StringBuilder("^");
- foreach (string part in parts)
+ string[] parts = simpleRoute.Split(new char[] { '/' });
+ string[] reparts = parts.Select((part) =>
{
if (part.StartsWith(":", StringComparison.InvariantCulture))
- stringBuilder.AppendFormat("/(?<{0}>[^/]+)", part.Substring(1));
+ if (part.EndsWith("*", StringComparison.InvariantCulture))
+ return string.Format("(?<{0}>[^/]+)(?<_>/.*)?", part.Substring(1, part.Length - 2));
+ else
+ return string.Format("(?<{0}>[^/]+)", part.Substring(1));
else if (part.Equals("*"))
- stringBuilder.AppendFormat("/(?<_>.*)");
+ return string.Format("(?<_>.*)");
else
- stringBuilder.AppendFormat("/{0}", part);
- }
- stringBuilder.Append("/?$");
+ return string.Format("{0}", part);
+ }).ToArray();
- AddRoute(stringBuilder.ToString(), target, priority);
+ string reroute = string.Join("/", reparts);
+
+ AddRoute(reroute, target, priority);
}
public void AddRoute(String route, IHttpRouter target) => AddRoute(route, target, 0);
@@ -43,11 +50,11 @@ namespace ln.http.router
}
public void Remove(SimpleRoute simpleRoute) => routes.Remove(simpleRoute);
- public HttpResponse Route(string path, HttpRequest httpRequest)
+ public HttpResponse Route(HttpRoutingContext routingContext, HttpRequest httpRequest)
{
foreach (SimpleRoute simpleRoute in routes.ToArray())
{
- Match match = simpleRoute.Route.Match(path);
+ Match match = simpleRoute.Route.Match(routingContext.Path);
if (match.Success)
{
string residual = "";
@@ -56,9 +63,13 @@ namespace ln.http.router
{
httpRequest?.SetParameter(group.Name, group.Value);
if (group.Name.Equals("_"))
- residual = "/" + group.Value;
+ if (group.Value.StartsWith("/", StringComparison.InvariantCulture))
+ residual = group.Value;
+ else
+ residual = "/" + group.Value;
}
- HttpResponse response = simpleRoute.Target.Route(residual, httpRequest);
+
+ HttpResponse response = simpleRoute.Target.Route(routingContext.Routed(residual), httpRequest);
if (response != null)
return response;
}
diff --git a/router/StaticRouter.cs b/router/StaticRouter.cs
index 69bb885..d2b1b4a 100644
--- a/router/StaticRouter.cs
+++ b/router/StaticRouter.cs
@@ -34,9 +34,9 @@ namespace ln.http.router
public void AddIndex(string indexName) => indexNames.Add(indexName);
public void RemoveIndex(string indexName) => indexNames.Remove(indexName);
- public HttpResponse Route(string path, HttpRequest httpRequest)
+ public HttpResponse Route(HttpRoutingContext routingContext, HttpRequest httpRequest)
{
- string finalPath = Path.Combine(RootPath, path.Substring(1));
+ string finalPath = Path.Combine(RootPath, routingContext.Path.Substring(1));
if (Directory.Exists(finalPath))
{
diff --git a/router/WebsocketRouter.cs b/router/WebsocketRouter.cs
index f3470f6..5b3015b 100644
--- a/router/WebsocketRouter.cs
+++ b/router/WebsocketRouter.cs
@@ -15,7 +15,7 @@ namespace ln.http.router
public WebSocket CreateWebSocket(HttpRequest request) => createWebsocket(request);
- public HttpResponse Route(string path, HttpRequest httpRequest)
+ public HttpResponse Route(HttpRoutingContext routingContext, HttpRequest httpRequest)
{
WebSocket websocket = CreateWebSocket(httpRequest);
try