mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-29 13:00:35 +00:00
WebService: opening file in shared mode for concurrent access.
This commit is contained in:
@@ -567,7 +567,7 @@ namespace DnsServerCore
|
||||
|
||||
private static async Task SendFileAsync(HttpListenerResponse response, string filePath)
|
||||
{
|
||||
using (FileStream fS = new FileStream(filePath, FileMode.Open, FileAccess.Read))
|
||||
using (FileStream fS = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||
{
|
||||
response.ContentType = WebUtilities.GetContentType(filePath).MediaType;
|
||||
response.ContentLength64 = fS.Length;
|
||||
|
||||
Reference in New Issue
Block a user