Ignore:
Timestamp:
Nov 16, 2018, 10:38:46 PM (6 years ago)
Author:
alloc
Message:

*Latest optimizations

File:
1 edited

Legend:

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

    r325 r332  
    1313                        string moduleName = null) : base (moduleName) {
    1414                        this.staticPart = staticPart;
    15                         datapath = filePath;
     15                        datapath = filePath + (filePath [filePath.Length - 1] == '/' ? "" : "/");
    1616                        this.cache = cache;
    1717                        this.logMissingFiles = logMissingFiles;
     
    2222                        string fn = req.Url.AbsolutePath.Remove (0, staticPart.Length);
    2323
    24                         byte[] content = cache.GetFileContent (datapath + "/" + fn);
     24                        byte[] content = cache.GetFileContent (datapath + fn);
    2525
    2626                        if (content != null) {
     
    3131                                resp.StatusCode = (int) HttpStatusCode.NotFound;
    3232                                if (logMissingFiles) {
    33                                         Log.Out ("Web:Static:FileNotFound: \"" + req.Url.AbsolutePath + "\" @ \"" + datapath + "/" +
    34                                                  req.Url.AbsolutePath.Remove (0, staticPart.Length) + "\"");
     33                                        Log.Out ("Web:Static:FileNotFound: \"" + req.Url.AbsolutePath + "\" @ \"" + datapath + fn + "\"");
    3534                                }
    3635                        }
Note: See TracChangeset for help on using the changeset viewer.