- Timestamp:
- Aug 1, 2022, 12:54:31 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/MapRendering/Web/Handlers/StaticHandler.cs
r367 r382 2 2 using System.Net; 3 3 using AllocsFixes.FileCache; 4 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest; 5 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse; 4 6 5 7 namespace AllocsFixes.NetConnections.Servers.Web.Handlers { 6 public class StaticHandler : PathHandler {8 public class StaticHandler : AbsHandler { 7 9 private readonly AbstractCache cache; 8 10 private readonly string datapath; … … 16 18 } 17 19 18 public override void HandleRequest ( HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,20 public override void HandleRequest (string _requestPath, HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _con, 19 21 int _permissionLevel) { 20 string fn = _req .Url.AbsolutePath.Remove (0, urlBasePath.Length);22 string fn = _requestPath.Remove (0, urlBasePath.Length); 21 23 22 24 byte[] content = cache.GetFileContent (datapath + fn); … … 29 31 _resp.StatusCode = (int) HttpStatusCode.NotFound; 30 32 if (logMissingFiles) { 31 Log.Out ("Web:Static:FileNotFound: \"" + _req .Url.AbsolutePath + "\" @ \"" + datapath + fn + "\"");33 Log.Out ("Web:Static:FileNotFound: \"" + _requestPath + "\" @ \"" + datapath + fn + "\""); 32 34 } 33 35 }
Note:
See TracChangeset
for help on using the changeset viewer.