Ignore:
Timestamp:
Aug 11, 2021, 6:22:03 PM (3 years ago)
Author:
alloc
Message:

Web:

  • Added SSE (ServerSentEvents) subsystem
  • Added log endpoint to SSE. Less heavy weight and more responsive way of watching the server log
  • Bunch of refactoring
File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/MapRendering/Web/Handlers/StaticHandler.cs

    r351 r367  
    88                private readonly string datapath;
    99                private readonly bool logMissingFiles;
    10                 private readonly string staticPart;
    1110
    12                 public StaticHandler (string _staticPart, string _filePath, AbstractCache _cache, bool _logMissingFiles,
     11                public StaticHandler (string _filePath, AbstractCache _cache, bool _logMissingFiles,
    1312                        string _moduleName = null) : base (_moduleName) {
    14                         staticPart = _staticPart;
    1513                        datapath = _filePath + (_filePath [_filePath.Length - 1] == '/' ? "" : "/");
    1614                        cache = _cache;
     
    2018                public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,
    2119                        int _permissionLevel) {
    22                         string fn = _req.Url.AbsolutePath.Remove (0, staticPart.Length);
     20                        string fn = _req.Url.AbsolutePath.Remove (0, urlBasePath.Length);
    2321
    2422                        byte[] content = cache.GetFileContent (datapath + fn);
Note: See TracChangeset for help on using the changeset viewer.