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/API/Null.cs

    r383 r387  
    11using System.Text;
    2 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest;
    3 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse;
    42
    53namespace AllocsFixes.NetConnections.Servers.Web.API {
    6         public class Null : WebAPI {
     4        public class Null : AbsWebAPI {
    75                public Null (string _name) : base(_name) {
    86                }
    97               
    10                 public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,
    11                         int _permissionLevel) {
    12                         _resp.ContentLength64 = 0;
    13                         _resp.ContentType = "text/plain";
    14                         _resp.ContentEncoding = Encoding.ASCII;
    15                         _resp.OutputStream.Write (new byte[] { }, 0, 0);
     8                public override void HandleRequest (RequestContext _context) {
     9                        _context.Response.ContentLength64 = 0;
     10                        _context.Response.ContentType = "text/plain";
     11                        _context.Response.ContentEncoding = Encoding.ASCII;
     12                        _context.Response.OutputStream.Write (new byte[] { }, 0, 0);
    1613                }
    1714        }
Note: See TracChangeset for help on using the changeset viewer.