Fix bug in StaticRouter, open files with ReadOnly access
ln.build - build0.waldrennach.l--n.de build job pending Details

master 0.4.1
Harald Wolff 2020-12-24 15:10:06 +01:00
parent e2ba2b0418
commit 610ed7e944
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.4.0</Version>
<Version>0.4.1</Version>
<Authors>Harald Wolff-Thobaben</Authors>
<Company>l--n.de</Company>
<Description />

View File

@ -55,7 +55,7 @@ namespace ln.http.router
{
lock (this)
{
HttpResponse httpResponse = new HttpResponse(httpRequest, new FileStream(finalPath, FileMode.Open));
HttpResponse httpResponse = new HttpResponse(httpRequest, new FileStream(finalPath, FileMode.Open, FileAccess.Read));
httpResponse.SetHeader("content-type", MimeTypeMap.GetMimeType(Path.GetExtension(finalPath)));
return httpResponse;
}