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/BaseStreamHandlerBasicDOSProtector.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/BaseStreamHandlerBasicDOSProtector.cs')
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs index 9b8b8c2..1b88545 100644 --- a/OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs +++ b/OpenSim/Framework/Servers/HttpServer/BaseStreamHandlerBasicDOSProtector.cs | |||
@@ -55,12 +55,14 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
55 | { | 55 | { |
56 | byte[] result; | 56 | byte[] result; |
57 | RequestsReceived++; | 57 | RequestsReceived++; |
58 | 58 | string clientstring = GetClientString(httpRequest); | |
59 | if (_dosProtector.Process(GetClientString(httpRequest), GetRemoteAddr(httpRequest))) | 59 | string endpoint = GetRemoteAddr(httpRequest); |
60 | if (_dosProtector.Process(clientstring, endpoint)) | ||
60 | result = ProcessRequest(path, request, httpRequest, httpResponse); | 61 | result = ProcessRequest(path, request, httpRequest, httpResponse); |
61 | else | 62 | else |
62 | result = ThrottledRequest(path, request, httpRequest, httpResponse); | 63 | result = ThrottledRequest(path, request, httpRequest, httpResponse); |
63 | 64 | if (_options.MaxConcurrentSessions > 0) | |
65 | _dosProtector.ProcessEnd(clientstring, endpoint); | ||
64 | 66 | ||
65 | RequestsHandled++; | 67 | RequestsHandled++; |
66 | 68 | ||