Add Fallback Handling for DirectoryResource

master
Harald Wolff 2019-11-24 15:07:00 +01:00
parent 6c5b2f7534
commit 64d75b8285
1 changed files with 9 additions and 1 deletions

View File

@ -142,7 +142,15 @@ namespace ln.http.resources
if (DefaultResource != null)
return httpRequest.Redirect(String.Join("/", DefaultResource.Path));
throw new NotImplementedException();
Resource fallback = GetFallBackResource();
if (fallback != null)
{
return fallback.GetResponse(httpRequest);
}
else
{
throw new NotImplementedException();
}
}
public Template FindTemplate(string templatePath)