Skip to content

Commit

Permalink
ArgumentOutOfRangeException fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Sep 8, 2020
1 parent 1348281 commit d863438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PeachPied.WordPress.AspNetCore/RequestDelegateExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static void ShortUrlRule(RewriteContext context, IFileProvider files)
{
var req = context.HttpContext.Request;
var subpath = req.Path.Value;
if (subpath != "/")
if (subpath != "/" && subpath.Length != 0)
{
if (subpath.IndexOf("wp-content/", StringComparison.Ordinal) != -1 || // it is in the wp-content -> definitely a file
files.GetFileInfo(subpath).Exists || // the script is in the file system
Expand Down

0 comments on commit d863438

Please sign in to comment.