From 56182abb619cb8eff5271dfdac437c4b1c224a32 Mon Sep 17 00:00:00 2001 From: TheBitBrine Date: Thu, 25 Apr 2019 20:49:28 +0400 Subject: [PATCH] Update QuickMan.cs --- QuickMan.Lib/QuickMan.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/QuickMan.Lib/QuickMan.cs b/QuickMan.Lib/QuickMan.cs index cea5d0e..3b5876c 100644 --- a/QuickMan.Lib/QuickMan.cs +++ b/QuickMan.Lib/QuickMan.cs @@ -1,13 +1,10 @@ -using System; +using System; using System.Collections.Generic; -using System.Collections.Specialized; using System.Diagnostics; using System.IO; using System.Linq; using System.Net; -using System.Text; using System.Threading; -using System.Threading.Tasks; namespace TheBitBrine { @@ -252,6 +249,9 @@ private void Process(HttpListenerContext context) RequestedEndpoint = RequestedEndpoint.Remove(RequestedEndpoint.Length - 2, 1); if (RequestedEndpoint.StartsWith("/")) RequestedEndpoint = RequestedEndpoint.Remove(0, 1); } + + if (RequestedEndpoint.Contains('?')) + RequestedEndpoint = RequestedEndpoint.Split('?')[0]; if (_Endpoints.ContainsKey(RequestedEndpoint)) _Endpoints[RequestedEndpoint](context);