Ignore:
Timestamp:
Aug 6, 2022, 11:32:32 PM (2 years ago)
Author:
alloc
Message:

Big refactoring in Web to pass around a Context instead of a bunch of individual arguments all the time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements2/MapRendering/Web/Handlers/RewriteHandler.cs

    r382 r387  
    1 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest;
    2 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse;
    3 
    41namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
    52        public class RewriteHandler : AbsHandler {
     
    129                }
    1310
    14                 public override void HandleRequest (string _requestPath, HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _con,
    15                         int _permissionLevel) {
    16                         string newRequestPath = fixedTarget ? target : target + _requestPath.Remove (0, urlBasePath.Length);
    17                         parent.ApplyPathHandler (newRequestPath, _req, _resp, _con, _permissionLevel);
     11                public override void HandleRequest (RequestContext _context) {
     12                        _context.RequestPath = fixedTarget ? target : target + _context.RequestPath.Remove (0, urlBasePath.Length);
     13                        parent.ApplyPathHandler (_context);
    1814                }
    1915        }
Note: See TracChangeset for help on using the changeset viewer.