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 | |
---|
1 | using System.Net;
|
---|
2 | using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest;
|
---|
3 | using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse;
|
---|
4 |
|
---|
5 | namespace 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.