Last change
on this file since 350 was 325, checked in by alloc, 6 years ago |
Code style cleanup (mostly whitespace changes, enforcing braces, using cleanup)
|
File size:
462 bytes
|
Line | |
---|
1 | using System.Net;
|
---|
2 |
|
---|
3 | namespace AllocsFixes.NetConnections.Servers.Web.Handlers {
|
---|
4 | public class SimpleRedirectHandler : PathHandler {
|
---|
5 | private readonly string target;
|
---|
6 |
|
---|
7 | public SimpleRedirectHandler (string target, string moduleName = null) : base (moduleName) {
|
---|
8 | this.target = target;
|
---|
9 | }
|
---|
10 |
|
---|
11 | public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
|
---|
12 | int permissionLevel) {
|
---|
13 | resp.Redirect (target);
|
---|
14 | }
|
---|
15 | }
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.