Commit Graph

117 Commits (371c9dd2af01a2e7422ec901ee1f80757284a78c)

Author SHA1 Message Date
UbitUmarov 371c9dd2af bad merge? 2015-09-01 14:54:35 +01:00
UbitUmarov 377a8072dc remove last debug msg 2014-11-01 16:04:22 +00:00
UbitUmarov f2ea426453 debug msg 2014-11-01 15:52:05 +00:00
UbitUmarov c643ff4cba fix some errors when using http debug level > 4 2014-10-15 14:14:25 +01:00
UbitUmarov ff518e7cbb make webutilmore verbose on PUT for avatar updates. Reduce LargeTime debug
level to 500ms from 3000ms
2014-08-17 02:12:45 +01:00
Oren Hurvitz 6b57b61836 Log RestClient requests similarly to WebClient (e.g, "debug http all 6" logs the entire request and response) 2014-07-21 09:24:45 +01:00
Oren Hurvitz 99ac770abb Close streams immediately when we finish using them 2014-07-21 08:30:03 +01:00
Diva Canto 20f20895cf Adds optional HTTP Basic Authentication to Robust service connectors. 2014-05-23 16:19:43 -07:00
Justin Clark-Casey (justincc) 4569c595bf Fix behaviour change in recent commit bbc1dc6 so that SynchronousRestObjectRequester.MakeRequest() calls with no timeout specified use the default HttpWebRequest timeout as previously.
I mistakenly thought that that default request timeout was inifite rather than 100 seconds, restoring previously behaviour.
As per http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.timeout%28v=vs.100%29.aspx
Relates to http://opensimulator.org/mantis/view.php?id=7165
2014-05-13 22:21:20 +01:00
Justin Clark-Casey (justincc) bbc1dc6bce Replace existing 0 timeout in internal overloaded SynchronousRestObjectRequester.MakeRequest() methods with proper Timeout.Infinite (-1) instead.
Triggered by recent faf9ba53 though this was wrong in the code before, it's just that we didn't actually try to set the timeout given.
2014-05-12 22:37:07 +01:00
Justin Clark-Casey (justincc) 7db4336f1c minor: Add method doc to SynchronousRestObjectRequester.MakeRequest() methods 2014-05-12 22:05:02 +01:00
Justin Clark-Casey (justincc) faf9ba53fc In SynchronousRestObjectRequester.MakeRequest<TRequest, TResponse>(string verb, string requestUrl, TRequest obj, int pTimeout, int maxConnections) actually set timeout on WebRequest if given.
Previously, we were doing nothing with this parameter.
No effect on current code since none of the 6 callers attempt to use the timeout.
2014-05-12 19:20:00 +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 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
Oren Hurvitz 161c827a44 Fixed a case where logging an HTTP response failed because the stream was non-seekable 2014-03-27 17:46:37 +02:00
Oren Hurvitz 76add0fdb0 Log errors in MakeRequest() as INFO, not ERROR. Some communications problems are benign (e.g., can't send Friend status update to a region that is down), so don't log them as ERROR so soon. We rethrow the exception, so the caller can still decide to log the error as an ERROR.
Resolves http://opensimulator.org/mantis/view.php?id=7077
2014-03-27 15:00:42 +01: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
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
Justin Clark-Casey (justincc) 88b1fc1382 Set up a StreamReader and call ReadToEnd() instead of using the GetStreamString() extension method
This eliminates some stream seeking that was never necessary and makes disposable of the StreamReader consistent with other code
2014-02-27 23:13:26 +00:00
Justin Clark-Casey (justincc) 5fafea6631 refactor: More consistently use using construct within WebUtil to match other existing code there. 2014-02-27 22:52:43 +00:00
Justin Clark-Casey (justincc) 1f4f09ad69 Add more details to InvalidOperationException logging in SychronousRestFormsRequest.MakeRequest(). 2014-02-27 20:35:56 +00:00
Oren Hurvitz b8e22f02e7 Make sure Web streams are disposed after use 2014-01-31 00:44:22 +00:00
Melanie 3589acdab1 Merge branch 'master' into careminster
Conflicts:
	.gitignore
	OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
	OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs
	prebuild.xml
	runprebuild.bat
2013-11-23 19:13:22 +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
Melanie 005c69511d Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
2013-08-07 23:29:42 +01:00
Justin Clark-Casey (justincc) 9bcf072795 Make it possible to switch whether we serialize osd requests per endpoint or not, either via config (SerializeOSDRequests in [Network]) or via the "debug comms set" console command.
For debug purposes to assess what impact this has on network response in a heavy test environment.
2013-08-05 23:44:48 +01:00
Diva Canto 5198df3aa0 Issue: 10 simultaneous TPs, many not making it. Now bypassing the per-url lock -- we should be "ok" (or, more "ok") now that we have increased the connection limit on the http library. But this is a sensitive part of the code, so it may need reverting. 2013-08-02 17:00:18 -07:00
Diva Canto 33ddb6c246 Revert "WARNING: BRUTE FORCE DEBUG. AVOID USING THIS COMMIT."
This reverts commit c95a23863a.
2013-07-04 13:25:58 -07:00
Diva Canto c95a23863a WARNING: BRUTE FORCE DEBUG. AVOID USING THIS COMMIT. 2013-07-04 13:13:52 -07:00
Melanie ffcee82b1d Merge branch 'master' into careminster
Conflicts:
	OpenSim/Data/MySQL/MySQLSimulationData.cs
	OpenSim/Region/Framework/Scenes/EventManager.cs
	OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
2013-06-30 18:27:30 +01:00
Diva Canto 00093a305d Changed HG status notifications timeout down to 15secs from the default 100. 2013-06-29 18:35:23 -07:00
Melanie 9975c5674c Merge branch 'master' into careminster 2013-06-13 02:49:43 +01:00
Justin Clark-Casey (justincc) 47b6e78790 Implement logging of first 80 characters (debug level 5) or full body data (debug level 6) on outgoing requests, depending on debug level
This is set via "debug http out <level>"
This matches the existing debug level behaviours for logging incoming http data
2013-06-12 21:34:20 +01:00
Melanie 578174d21c Merge branch 'master' into careminster
Conflicts:
	OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs
	OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
	OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
2013-02-27 18:05:04 +00:00
Justin Clark-Casey (justincc) 80c19b7cac Make sure we dispose of WebResponse, StreamReader and Stream in various places where we were not already. 2013-02-27 00:21:02 +00:00
Melanie 72c925a6c9 Merge branch 'avination' into careminster
Conflicts:
	OpenSim/Framework/WebUtil.cs
	OpenSim/Region/Physics/OdePlugin/OdeScene.cs
2012-10-18 20:56:34 +01:00
UbitUmarov db00402fa8 make sure a buffer is closed, and changed a misleading log msg 2012-10-05 00:14:49 +01:00
Melanie 503ce70f74 Allow setting connection limits, part 2 2012-09-30 16:31:23 +01:00
Diva Canto 91a5c602e3 Revert "Added request.Proxy=null everywhere, as discussed in http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow."
But the patch is here, in case anyone wants to try it.

This reverts commit 531edd51d8.
2012-09-30 07:48:03 -07:00
Diva Canto 531edd51d8 Added request.Proxy=null everywhere, as discussed in http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow.
Thanks R.Gunther (rigun@rigutech.nl) https://lists.berlios.de/pipermail/opensim-users/2012-September/010986.html
2012-09-30 07:22:55 -07:00
Melanie bbaf2c5a80 Merge branch 'master' into careminster
Conflicts:
	OpenSim/Region/Framework/Scenes/Scene.cs
2012-09-24 20:14:00 +01:00
Justin Clark-Casey (justincc) 80f486c778 minor: Make slow outgoing request log messages consistent with other log messages 2012-09-21 01:59:28 +01:00
Justin Clark-Casey (justincc) e29d563557 Add request number counting to incoming HTTP requests in the same way that this was already being done for outgoing HTTP requests.
This allows us to associate debug logging messages with the right request.
It also allows us to put a request number on 'long request' logging even if other debug logging is not enabled, which gives us some idea of whether every request is suffering this problem or only some.
This is a separate internal number not associated with any incoming number in the opensim-request-id header, this will be clarified when logging of this incoming request number is re-enabled.
This commit also adds port number to HTTP IN logging to allow us to distinguish between different request numbers on different ports.
2012-09-21 00:09:17 +01:00
Justin Clark-Casey (justincc) a5b3989e5d Insert a new log level 4 for HTTP IN and HTTP OUT that will log how long the request took.
This is only printed if debug http level >= 4 and the request didn't take more than the time considered 'long', in which case the existing log message is printed.
This displaces the previous log levels 4 and 5 which are now 5 and 6 respectively.
2012-09-20 23:18:19 +01:00
Justin Clark-Casey (justincc) 387a1bb283 Add ability to turn on/off logging of outgoing HTTP requests flowing through WebUtil.
This is for debugging purposes.
This is controlled via the "debug http" command which can already log incoming requests.
This now gains a mandatory parameter of in, out or all to control what is logged.
Log messages are also shortened and labelled and HTTP IN or HTTP OUT to be consistent with existing UDP PACKET IN and PACKET OUT messages.
2012-09-20 23:17:44 +01:00
Melanie 9f93bef111 Allow setting connection limits, part 2 2012-09-14 00:15:10 +02:00