aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs b/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs
index 39c98b4..cd4b8ff 100644
--- a/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs
+++ b/OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs
@@ -47,10 +47,18 @@ namespace OpenSim.Framework.Servers.HttpServer
47 } 47 }
48 public Hashtable Process(Hashtable request) 48 public Hashtable Process(Hashtable request)
49 { 49 {
50 if (_dosProtector.Process(GetClientString(request), GetRemoteAddr(request))) 50 Hashtable process = null;
51 return _normalMethod(request); 51 string clientstring= GetClientString(request);
52 string endpoint = GetRemoteAddr(request);
53 if (_dosProtector.Process(clientstring, endpoint))
54 process = _normalMethod(request);
52 else 55 else
53 return _throttledMethod(request); 56 process = _throttledMethod(request);
57
58 if (_options.MaxConcurrentSessions>0)
59 _dosProtector.ProcessEnd(clientstring, endpoint);
60
61 return process;
54 } 62 }
55 63
56 private string GetRemoteAddr(Hashtable request) 64 private string GetRemoteAddr(Hashtable request)