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