From 6de97f439f142c5a3dcc9a60429aa13a387deb19 Mon Sep 17 00:00:00 2001 From: Alexander Stoll <45196568+Crited@users.noreply.github.com> Date: Wed, 25 Mar 2020 15:33:32 +0100 Subject: [PATCH] Change Regex to support more input variants References #57 --- lib/web/Read-IcingaRESTMessage.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/web/Read-IcingaRESTMessage.psm1 b/lib/web/Read-IcingaRESTMessage.psm1 index 496c4df..3a0f0c6 100644 --- a/lib/web/Read-IcingaRESTMessage.psm1 +++ b/lib/web/Read-IcingaRESTMessage.psm1 @@ -15,8 +15,8 @@ function Read-IcingaRESTMessage() #Path $PathMatch = $Matches[3]; - $PathMatch -match '(.+)\?(.*)' | Out-Null; - $Arguments = $Matches[2]; + $PathMatch -match '((\/[^\/\?]+)*)\??([^\/]*)' | Out-Null; + $Arguments = $Matches[3]; $Request.RequestPath.Add('FullPath', $Matches[1]); $Request.RequestPath.Add('PathArray', $Matches[1].TrimStart('/').Split('/'));