source: binary-improvements2/MapRendering/Web/Handlers/SimpleRedirectHandler.cs@ 382

Last change on this file since 382 was 382, checked in by alloc, 2 years ago

Switched to use SpaceWizards.HttpListener

File size: 603 bytes
Line 
1using System.Net;
2using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest;
3using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse;
4
5namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
6 public class SimpleRedirectHandler : AbsHandler {
7 private readonly string target;
8
9 public SimpleRedirectHandler (string _target) : base (null) {
10 target = _target;
11 }
12
13 public override void HandleRequest (string _requestPath, HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _con,
14 int _permissionLevel) {
15 _resp.Redirect (target);
16 }
17 }
18}
Note: See TracBrowser for help on using the repository browser.