tests config value HttpPublicUrlBase before being used
This commit is contained in:
parent
4f7132b3b3
commit
e3a528f651
1 changed files with 4 additions and 1 deletions
|
|
@ -99,7 +99,10 @@ namespace BetterSecondBot.HttpServer
|
||||||
HttpListenerRequest req = ctx.Request;
|
HttpListenerRequest req = ctx.Request;
|
||||||
HttpListenerResponse resp = ctx.Response;
|
HttpListenerResponse resp = ctx.Response;
|
||||||
string test = req.Url.AbsolutePath.Substring(1);
|
string test = req.Url.AbsolutePath.Substring(1);
|
||||||
test = test.Replace(Config.HttpPublicUrlBase, "");
|
if (helpers.notempty(Config.HttpPublicUrlBase) == true)
|
||||||
|
{
|
||||||
|
test = test.Replace(Config.HttpPublicUrlBase, "");
|
||||||
|
}
|
||||||
List<string> http_args = test.Split('/', StringSplitOptions.RemoveEmptyEntries).ToList();
|
List<string> http_args = test.Split('/', StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||||
byte[] data;
|
byte[] data;
|
||||||
resp.StatusCode = 200;
|
resp.StatusCode = 200;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue