aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Servers/HttpServer (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-10-09* Add a session concurrency option per key. Allows developer/config to ↵teravus3-8/+21
specify number of concurrent requests on a service.
2013-10-07* Move the BasicDOSProtector.cs to OpenSim.Framework (all useful classes ↵teravus1-181/+0
belong there.....) * Add an IsBlocked(string Key) method so it can be used more generically. (think.. if we want to rate limit login failures, we could have a call in the Login Service to IsBlocked(uuid.ToString()) and ignore the connection if it returns true, if IsBlocked returns false, we could run the login information and if the login fails we could run the Process method to count the login failures.
2013-10-07* Refactorteravus4-410/+213
* Break out common BasicDOSProtector code into separate class.
2013-10-07* Added a Basic DOS protection container/base object for the most common ↵teravus3-0/+682
HTTP Server handlers. XMLRPC Handler, GenericHttpHandler and <Various>StreamHandler * Applied the XmlRpcBasicDOSProtector.cs to the login service as both an example, and good practice. * Applied the BaseStreamHandlerBasicDOSProtector.cs to the friends service as an example of the DOS Protector on StreamHandlers * Added CircularBuffer, used for CPU and Memory friendly rate monitoring. * DosProtector has 2 states, 1. Just Check for blocked users and check general velocity, 2. Track velocity per user, It only jumps to 2 if it's getting a lot of requests, and state 1 is about as resource friendly as if it wasn't even there.
2013-10-04* Add an initial complete frame timeout to the WebSocket processor to make ↵teravus1-2/+65
it easier to write WebSocket service code that is resistant to Denial of Service attacks.
2013-10-04Bump OPenSimulator version and assembly versions up to 0.8.0 DevJustin Clark-Casey (justincc)1-1/+1
2013-09-22Don't use 'Indented' formatting for RpcXml responses.Aleric Inglewood1-1/+15
(cherry picked from commit 93abcde69043b175071e0bb752538d9730433f1d)
2013-08-17remove mono compiler warnings from PollServiceRequestManagerJustin Clark-Casey (justincc)1-4/+2
2013-07-26Increased the rate of the PollServiceRequestManager to 0.5 secs (it was ↵Diva Canto1-1/+1
1sec). Group chat is going over the EQ... Hopefully this won't increase CPU when there's nothing going on, but we need to watch for that.
2013-07-21Removed verbose debug from previous commitDiva Canto1-1/+0
2013-07-21PollServiceRequestManager: changed the long poll from a Queue to a List. No ↵Diva Canto1-13/+17
need to dequeue and enqueue items every 1sec.
2013-07-21Delay the enqueueing of non-longpoll requests for 100ms. No need to have ↵Diva Canto1-1/+11
these requests actively on the processing queue if it seems they're not ready.
2013-07-18Changed the timoeut of EQ 502s (no events) to 50 secs. The viewer post ↵Diva Canto1-1/+1
requests timeout in 60 secs. There's plenty of room for improvement in handling the EQs. Some other time...
2013-07-18Revert "Revert "Putting the requests back in the queue while testing for ↵Diva Canto1-3/+7
count >0 is not the smartest move..."" This reverts commit 71278919575b0e0222cdbe3c0cefa5919f9a75bc.
2013-07-18Reverting the reverts I did yesterday. cpu-branch has now beenDiva Canto2-48/+35
successfully tested, and I'm merging back those changes, which proved to be good. Revert "Revert "Cleared up much confusion in PollServiceRequestManager. Here's the history:"" This reverts commit fa2370b32ee57a07f27501152c3c705a883b13d8.
2013-07-17Revert "Cleared up much confusion in PollServiceRequestManager. Here's the ↵Diva Canto2-35/+48
history:" This reverts commit e46459ef21e1ee5ceaeca70365a7c881d33b09ce.
2013-07-17Revert "Putting the requests back in the queue while testing for count >0 is ↵Diva Canto1-7/+3
not the smartest move..." This reverts commit f4317dc26d670c853d0ea64b401b00f718f09474.
2013-07-17Revert "Now trying DoubleQueue instead of BlockingQueue for the ↵Diva Canto1-2/+2
PollServiceRequestManager." This reverts commit 5f95f4d78e8c7d17b8ba866907156fe6d4444c04.
2013-07-17Revert "This is a completely unreasonable thing to do, effectively defying ↵Diva Canto1-52/+40
the purpose of BlockingQueues. Trying this, to see the effect on CPU." This reverts commit 5232ab0496eb4fe6903a0fd328974ac69df29ad8.
2013-07-17This is a completely unreasonable thing to do, effectively defying the ↵Diva Canto1-40/+52
purpose of BlockingQueues. Trying this, to see the effect on CPU.
2013-07-17Now trying DoubleQueue instead of BlockingQueue for the ↵Diva Canto1-2/+2
PollServiceRequestManager.
2013-07-17Putting the requests back in the queue while testing for count >0 is not the ↵Diva Canto1-3/+7
smartest move...
2013-07-17Cleared up much confusion in PollServiceRequestManager. Here's the history:Diva Canto2-48/+35
When Melanie added the web fetch inventory throttle to core, she made the long poll requests (EQs) effectively be handled on an active loop. All those requests, if they existed, were being constantly dequeued, checked for events (which most often they didn't have), and requeued again. This was an active loop thread on a 100ms cycle! This fixes the issue. Now the inventory requests, if they aren't ready to be served, are placed directly back in the queue, but the long poll requests aren't placed there until there are events ready to be sent or timeout has been reached. This puts the LongPollServiceWatcherThread back to 1sec cycle, as it was before.
2013-07-15Add request received/handling stats for caps which are served by http poll ↵Justin Clark-Casey (justincc)4-50/+69
handlers. This adds explicit cap poll handler supporting to the Caps classes rather than relying on callers to do the complicated coding. Other refactoring was required to get logic into the right places to support this.
2013-07-08Add missing file BaseOutputStreamHandler.cs from recent commit e19defdJustin Clark-Casey (justincc)1-0/+60
2013-07-08BaseHttpServer: if the handler sets the content length, don't override it. ↵Diva Canto1-1/+1
This happens in HEAD handlers.
2013-07-08Add "show caps stats by user" and "show caps stats by cap" console commands ↵Justin Clark-Casey (justincc)7-16/+51
to print various counts of capability invocation by user and by cap This currently prints caps requests received and handled, so that overload of received compared to handled or deadlock can be detected. This involves making BaseStreamHandler and BaseOutputStream record the ints, which means inheritors should subclass ProcessRequest() instead of Handle() However, existing inheriting classes overriding Handle() will still work, albeit without stats recording. "show caps" becomes "show caps list" to disambiguate between show caps commands
2013-06-20minor: remove mono compiler warnings in WebsocketServerHandler.csJustin Clark-Casey (justincc)1-13/+7
2013-06-19Display existing statistic of how many http requests a server is making as ↵Justin Clark-Casey (justincc)1-1/+1
server.network.HTTPRequestsMade in "show stats all"
2013-06-18Make number of inbound http requests handled available as a ↵Justin Clark-Casey (justincc)1-5/+25
httpserver.<port>.IncomingHTTPRequestsProcessed stat
2013-06-10Add port numbers to poll service thread names so that we can tell which ↵Justin Clark-Casey (justincc)1-2/+2
belong to which HttpServer
2013-06-10Reinstate explicit starting and stopping of PollServiceRequestManager added ↵Justin Clark-Casey (justincc)2-4/+7
in 3eee991 but removed in 7c0bfca Do not rely on destructors to stop things. These fire at unpredictable times and cause problems such as http://opensimulator.org/mantis/view.php?id=6503 and most probably http://opensimulator.org/mantis/view.php?id=6668
2013-06-07Supply proper type information for the various types of requestsMelanie1-3/+1
2013-06-07Adding Avination's PollService to round out the HTTP inventory changesMelanie4-226/+209
2013-04-04* In between the fog, a moment of clarity. This fixes mantis 6570teravus1-1/+1
2013-03-16*Yet another HTTPServer update code changes in OpenSim Libs. * This fixes a ↵teravus1-3/+14
connection close issue by getting rid of the socket references * This adds a connection timeout checker to shutdown poor or evil connections and combats DOS attempts that just connect and make no complete requests and just wait. It also actually implements KeepAlive... instead of just understanding the connection header in the request... you can test by connecting and requesting a keepalive header and sending another request on the same connection. The new timeout checker closes expired keepalive sessions, just make sure you send the request within 70 seconds of connecting or the timeout checker will timeout the connection.
2013-03-05* Add a Max Payload size property to the Websocket Server Handler. If you ↵teravus1-1/+16
would like to restrict the maximum packet size, (and therefore protect against Memory DOSing) then you should set this. I defaulted it to 40MB. This means that in theory, a malicious user could connect and send a packet that claims that the payload is up to 40 mb (even if it doesn't actually turn out to be 40mb. More testing needs to be done on it where the packets are maliciously malformed.
2013-03-03Add method to remove JsonRpc Handlers from the serverBlueWall2-0/+8
2013-02-27Make sure we dispose of WebResponse, StreamReader and Stream in various ↵Justin Clark-Casey (justincc)1-12/+3
places where we were not already.
2013-02-19Deleted all AssemblyFileVersion directivesDiva Canto1-1/+1
2013-02-14* gracefully handle a Situation where a double close is called on the ↵teravus1-0/+2
WebSocket handler
2013-02-07This is the final commit that enables the Websocket handlerteravus2-2/+1095
2013-02-05We're not really done here.. but we're getting there. Socket Read is ↵teravus1-1/+37
working.. Still have to do Header.ToBytes and compose a websocket frame with a payload.
2013-02-05Bump version and assembly version numbers from 0.7.5 to 0.7.6Justin Clark-Casey (justincc)1-1/+1
This is mostly Bluewall's work but I am also bumping the general version number OpenSimulator 0.7.5 remains in the release candidate stage. I'm doing this because master is significantly adding things that will not be in 0.7.5 This update should not cause issues with existing external binary DLLs because our DLLs do not have strong names and so the exact version match requirement is not in force.
2013-02-01Revert "Update assembly version numbers"BlueWall1-1/+1
This reverts commit 141ad829f448b9138b12be7cf99c834c1f3977ec.
2013-02-01Update assembly version numbersBlueWall1-1/+1
2013-01-23Add additional return statusBlueWall2-4/+23
Adding additional return status for JsonRpcMethod. Now returns true/false
2013-01-19Explicitly stop PollServiceRequestManager() rather than relying on its ↵Justin Clark-Casey (justincc)2-5/+15
destructor. Hopes to address occasional shutdown failures from http://opensimulator.org/mantis/view.php?id=6503
2013-01-15Add Json-Rpc 2.0 To Registered HandlersBlueWall4-0/+294
Added registration json-rpc handlers in the http server. Covers version 2.0 See: http://www.jsonrpc.org/specification
2012-12-05In BaseHttpServer.HandleRequest(), use Culture.SetCurrentCulture() rather ↵Justin Clark-Casey (justincc)1-1/+1
than creating a new CultureInfo separately