Commit Graph

128 Commits (0.9.0.1-postfixes)

Author SHA1 Message Date
UbitUmarov 997a85568e double request.ReadWriteTimeout 2017-09-16 00:46:26 +01:00
UbitUmarov 70be8ba6de make some web request errors visible, so cause of later asset not found is clear 2017-06-12 13:29:14 +01:00
UbitUmarov e5bebe3a32 webrequests serialiazation per endpoint its now ServicePointManager job 2017-05-30 08:20:58 +01:00
Melanie Thielker b16abc8166 Massive tab and trailing space cleanup 2017-01-05 19:07:37 +00:00
UbitUmarov b3eda582ec add to SynchronousRestFormsRequester a keepalive disable option, and make use of it on some friends conns 2016-11-23 19:30:55 +00:00
UbitUmarov 35b37510fc explicitly remove some references, and other useless changes 2016-11-17 19:15:28 +00:00
UbitUmarov 52a5688b6e minor: fix a log timing information 2015-12-02 02:43:52 +00:00
Diva Canto 1aa0234408 Trying to make http requests less slow, according to http://stackoverflow.com/questions/2519655/httpwebrequest-is-extremely-slow 2015-11-29 09:48:17 -08:00
UbitUmarov b93412972e revert SynchronousRestObjectRequester timeout to miliseconds, and fix where it was wrong set in seconds 2015-09-09 23:17:18 +01:00
UbitUmarov cdaed11387 at last we can login and see objects ( friends is dead and disable in
scenepresence)
2015-09-03 18:39:08 +01:00
UbitUmarov a11edceb00 seems to compile ( tests comented out) 2015-09-02 19:54:53 +01:00
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