Commit Graph

696 Commits (732d04cb4a81477074b4f6f0bec2d5047b7294c3)

Author SHA1 Message Date
Justin Clark-Casey 732d04cb4a Make private services forbid llHTTPRequest() calls by rejecting those that have the X-SecondLife-Shard header.
If you need to enable this, set AllowHttpRequestIn = true in [Network] for all private services or individual [*Service] sections.
2015-03-04 17:20:13 +00:00
Justin Clark-Casey 3990d922fb Update version to 0.8.0.3 and flavour to release 2014-11-11 17:38:21 +00:00
Justin Clark-Casey 3879f9a081 Change 0.8-post-fixes branch back to Post-Fixes flavour 2014-10-16 21:10:02 +01:00
Justin Clark-Casey 10ed3a5520 Change 0.8 post fixes to 0.8.0.2 release 2014-10-16 20:22:43 +01:00
Justin Clark-Casey 4a90dd3556 Change 0.8-post-fixes branch back to Post_Fixes flavour 2014-08-23 00:02:12 +01:00
Justin Clark-Casey f6d02a63eb Change 0.8 post fixes branch to version 0.8.0.1 with release flavour. 2014-08-22 20:19:16 +01:00
Justin Clark-Casey (justincc) 3410b36d76 Temporary stop CAPS service points from being added to stats as this can be a huge number.
A stop gap solution - a better one may be to improve stats display on simulator-side.
Caps information is still accessible via the "show caps stats by user" and "show caps stats by cap" commands
2014-08-02 00:58:12 +01:00
Justin Clark-Casey (justincc) 2f7d950ead Add stats for service endpoints using existing data.
For each service endpoint (e.g. posts to the xinventory service), a stat is available which shows the number of requests received and moving average per second
The full name is "service.<http-method>:<path>.requests (e.g. service.POST:/xinventory.requests)
2014-08-02 00:58:09 +01:00
Oren Hurvitz e41e52e097 Close streams immediately when we finish using them 2014-08-02 00:55:57 +01:00
Justin Clark-Casey (justincc) ba745a524d Actually call Close() for shared region modules when the simulator is being shutdown.
Adds regression test for this case.
2014-08-02 00:50:10 +01:00
Justin Clark-Casey eea3be9b17 Change flavour to post-fixes 2014-06-17 18:44:31 +01:00
Justin Clark-Casey 698dfe8977 Change 0.8 flavour to release 2014-06-17 16:48:36 +01:00
Robert Adams 02980336a3 Add [Startup]LogShowStatsSeconds=n parameter which controls the interval
that simulator statistics is output to the console. Setting to zero turns
stats logging off.
2014-06-16 18:04:35 +01:00
Justin Clark-Casey 8899f2e2bb Change release flavour to rc3 2014-06-10 23:12:41 +01:00
Justin Clark-Casey (justincc) 60d4b0999c Add rc3 flavour option 2014-06-10 23:12:08 +01:00
Justin Clark-Casey 3a477a29d7 Change release flavour to RC2 2014-05-27 23:38:08 +01:00
Justin Clark-Casey 3f703ae1cb Merge branch 'master' into 0.8-post-fixes 2014-05-27 23:29:54 +01:00
Diva Canto 20f20895cf Adds optional HTTP Basic Authentication to Robust service connectors. 2014-05-23 16:19:43 -07:00
Oren Hurvitz 882af7195c Better error-handling and logging in case User Profile requests fail 2014-05-19 11:11:06 +01:00
Justin Clark-Casey 766c94213c Change version flavour to RC1. Make version number more normal "0.8" rather than "0.8.0" 2014-05-06 19:04:44 +01:00
Oren Hurvitz 88f7a833dc Improved HTTP logging 2014-04-29 07:59:17 +01:00
Oren Hurvitz bc06db3df4 - Created a standard function to send XML-RPC requests, which logs them like we do for other types of HTTP activity.
- Changed OpenProfileClient to use the new XML-RPC sending function
- Improved logging in WebUtil
2014-04-24 15:58:43 +01:00
Oren Hurvitz d15a3b10a3 When sending JSON-RPC calls (for UserProfile), use WebUtil instead of constructing the HTTP requests manually. This allows the calls to be logged when using "debug http all 6". 2014-04-24 15:58:41 +01:00
Oren Hurvitz 2051535ce1 String matching in REST handlers: must allow '-' as a separator, because the "/map" handler uses it 2014-04-02 15:11:54 +01:00
Oren Hurvitz aa217cf90f Better string matching when searching for REST handlers: must match an entire path component (ending with '/' or a similar character).
For example, these should match: "/assets" and "/assets/12345", but these shouldn't match: "/assets" and "/assets_exist".
2014-04-02 08:52:44 +03:00
Oren Hurvitz bbfda8e19e Fixed last-resort sending of error response (HTTP 500) when an error occurs while handling a request.
The previous code didn't actually send the response, so the caller was stuck until the timeout (100 seconds).
2014-04-02 06:32:41 +01:00
BlueWall a15282f023 Merge branch 'master' into m_test 2014-03-27 12:21:38 -04:00
Oren Hurvitz 6d1d58b654 Use the "X-Content-Encoding" header to indicate gzipped data, because old OpenSims fail if they get an unknown "Content-Encoding" 2014-03-25 18:09:23 +01:00
BlueWall 9aec36156e Sync code that has moved in development branch with changes in master 2014-03-25 11:09:27 -04:00
BlueWall dba33fee39 Move from UserProfileModule for general availability 2014-03-25 11:08:11 -04:00
Oren Hurvitz b1d8aa0b64 Use the "Content-Encoding" header to indicate gzipped streams 2014-03-25 15:36:59 +01:00
Oren Hurvitz f90aee696a Always throw an exception if MakeRequest (used for HTTP POST) fails. (Previously many exceptions were ignored)
Resolves http://opensimulator.org/mantis/view.php?id=6949
2014-03-25 09:37:10 +01:00
Oren Hurvitz f901a38204 Improved logging of HTTP requests
- MemoryBuffer isn't seekable, so we can't log it. Log the string instead.
- Handle compressed streams
- Don't attempt to dump binary data. Either don't log it at all (if we know it's binary), or at least convert non-ASCII characters to ASCII.
- Log responses to HTTP requests
- Use the same log prefix for all of these log messages ("[LOGHTTP]"), to make them easy to see at a glance
- Increased the snippet length to 200 (80 doesn't show enough), and add "..." only if the message was actually truncated

Resolves http://opensimulator.org/mantis/view.php?id=6949
2014-03-25 09:36:53 +01:00
Oren Hurvitz 84d7227dfd Changed LogThreadPool to have 4 logging levels. Added console command "debug threadpool level" to set the logging level.
Resolves http://opensimulator.org/mantis/view.php?id=6945
2014-03-25 08:01:50 +01:00
Justin Clark-Casey (justincc) fad1d70180 Add httpserver.<port>.QueuedPollResponses and httpserver.<port>.ProcessedPollResponses statistics 2014-03-18 23:47:33 +00:00
Justin Clark-Casey (justincc) 9e0d419239 minor: Correction to description of QueuedPollResponses since this covers long poll and other 'poll' types 2014-03-18 23:24:22 +00:00
Justin Clark-Casey (justincc) eed343ed8a Add httpserver.<port-number>,QueuedPollResponses stat
This shows the number pf poll responses queued for processing.
2014-03-18 23:21:07 +00:00
Justin Clark-Casey (justincc) f3e177814a Add regression test for http inventory fetch.
Involved some restructuring to allow regression tests to dequeue inventory requests and perform poll responses synchronously rather than async
2014-03-17 20:51:35 +00:00
Justin Clark-Casey (justincc) 996a6c2eea After previous discussion, put eye-catcher 'SCRIPT READY' messages to console rather than log as warning
The problem with logging at warn is that these aren't actually warnings, and so are false positives to scripts that monitor for problems.
Ideally, log4net would have a separate "status" logging level, but currently we will compromise by putting them to console, as they are user-oriented
2013-12-14 01:34:28 +00:00
Justin Clark-Casey (justincc) 7cab41f422 refactor: replace verbose checks with String.IsNullOrEmpty where applicable.
Thanks to Kira for this patch from http://opensimulator.org/mantis/view.php?id=6845
2013-11-15 21:45:08 +00:00
teravus 75f63ecfcd * Add a session concurrency option per key. Allows developer/config to specify number of concurrent requests on a service. 2013-10-09 22:21:25 -05:00
teravus 1df58d04b1 * Move the BasicDOSProtector.cs to OpenSim.Framework (all useful classes 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 23:48:24 -05:00
teravus 75fdd6054d * Refactor
* Break out common BasicDOSProtector code into separate class.
2013-10-07 23:19:50 -05:00
teravus f76cc6036e * Added a Basic DOS protection container/base object for the most common 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-07 21:35:55 -05:00
teravus 85593d8d25 * Add an initial complete frame timeout to the WebSocket processor to make it easier to write WebSocket service code that is resistant to Denial of Service attacks. 2013-10-04 20:37:59 -05:00
Justin Clark-Casey (justincc) 42bdf44658 Bump OPenSimulator version and assembly versions up to 0.8.0 Dev 2013-10-04 23:33:47 +01:00
Aleric Inglewood 7889e7757a Don't use 'Indented' formatting for RpcXml responses.
(cherry picked from commit 93abcde69043b175071e0bb752538d9730433f1d)
2013-09-22 21:10:01 -05:00
Justin Clark-Casey (justincc) 77d418a36d remove mono compiler warnings from PollServiceRequestManager 2013-08-17 00:56:19 +01:00
Justin Clark-Casey (justincc) ac198068ab Add "debug threadpool status" console command to show min/max/current worker/iocp threadpool numbers 2013-08-06 00:00:12 +01:00
Justin Clark-Casey (justincc) 4581bdd929 Add "debug comms status" command to show current debug comms settings 2013-08-05 23:49:33 +01:00