|
|
@ -1,5 +1,6 @@ |
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
using System.Diagnostics; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using System.Text; |
|
|
|
using System.Web; |
|
|
|
using System.Web; |
|
|
@ -46,14 +47,14 @@ namespace FLocal.IISHandler { |
|
|
|
public void ProcessRequest(HttpContext context) { |
|
|
|
public void ProcessRequest(HttpContext context) { |
|
|
|
Initializer.instance.Initialize(); |
|
|
|
Initializer.instance.Initialize(); |
|
|
|
|
|
|
|
|
|
|
|
DateTime start = DateTime.Now; |
|
|
|
Stopwatch st = Stopwatch.StartNew(); |
|
|
|
int requestNumber = counter.GetCurrentValueAndIncrement(); |
|
|
|
int requestNumber = counter.GetCurrentValueAndIncrement(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
Config.instance.Logger.Log("Began serving request #" + requestNumber + ": " + context.Request.Url.AbsoluteUri); |
|
|
|
Config.instance.Logger.Log("Began serving request #" + requestNumber + ": " + context.Request.Url.AbsoluteUri); |
|
|
|
this.doProcessRequest(context); |
|
|
|
this.doProcessRequest(context); |
|
|
|
Config.instance.Logger.Log("Done serving request #" + requestNumber + "; " + (DateTime.Now-start).TotalSeconds + " seconds spent"); |
|
|
|
Config.instance.Logger.Log("Done serving request #" + requestNumber + "; " + st.ElapsedMilliseconds + " ms spent"); |
|
|
|
} catch(RedirectException e) { |
|
|
|
} catch(RedirectException e) { |
|
|
|
Config.instance.Logger.Log("Done serving request #" + requestNumber + "; " + (DateTime.Now-start).TotalSeconds + " seconds spent (redirected)"); |
|
|
|
Config.instance.Logger.Log("Done serving request #" + requestNumber + "; " + st.ElapsedMilliseconds + " ms spent (redirected)"); |
|
|
|
context.Response.Redirect(e.newUrl); |
|
|
|
context.Response.Redirect(e.newUrl); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|