diff options
author | teravus | 2013-10-09 22:21:25 -0500 |
---|---|---|
committer | teravus | 2013-10-09 22:21:25 -0500 |
commit | 75f63ecfcd885ae71bca130ee0db1ecc997b86cd (patch) | |
tree | d7eea5746c154ed8b6b6e9a4bd0c1b0ba98cc320 /OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs | |
parent | * Remove a test *cleanup* (diff) | |
download | opensim-SC_OLD-75f63ecfcd885ae71bca130ee0db1ecc997b86cd.zip opensim-SC_OLD-75f63ecfcd885ae71bca130ee0db1ecc997b86cd.tar.gz opensim-SC_OLD-75f63ecfcd885ae71bca130ee0db1ecc997b86cd.tar.bz2 opensim-SC_OLD-75f63ecfcd885ae71bca130ee0db1ecc997b86cd.tar.xz |
* Add a session concurrency option per key. Allows developer/config to specify number of concurrent requests on a service.
Diffstat (limited to 'OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/GenericHTTPBasicDOSProtector.cs | 14 |
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) |