We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dd2844 commit 0e676c0Copy full SHA for 0e676c0
dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs
@@ -351,10 +351,14 @@ internal string GetGxRouteValue(string path)
351
}
352
public bool ServiceInPath(String path, out String actualPath)
353
{
354
+ actualPath = null;
355
string tmppath = path.Substring(0, 1).Equals("/") ? path.Substring(1) : path;
356
int pos = tmppath.IndexOf("/");
- string innerPath = tmppath.Substring(pos, tmppath.Length - pos);
357
- actualPath = FindPath( innerPath, servicesPathUrl, true);
+ if (pos > 0)
358
+ {
359
+ string innerPath = tmppath.Substring(pos, tmppath.Length - pos);
360
+ actualPath = FindPath(innerPath, servicesPathUrl, true);
361
+ }
362
if (String.IsNullOrEmpty(actualPath))
363
364
// fallback
0 commit comments