[Archived] Middleware for handling requests for file system resources including files and directories. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
114
stars
72
forks
source link
Return HTTP 404 when FileNotFoundException is thrown when attempting to send a file #232
If a file disappears between the File.Exists and File.Open, or if the file is a broken symlink, static files throws an uncaught exception, causing HTTP 500. This change catches the FileNotFoundExcpetion and returns HTTP 404 instead.
Resolves https://github.com/aspnet/Home/issues/2775
If a file disappears between the File.Exists and File.Open, or if the file is a broken symlink, static files throws an uncaught exception, causing HTTP 500. This change catches the FileNotFoundExcpetion and returns HTTP 404 instead.