Commit Graph

51 Commits (28e68329b688b34279c5ff403a6f2b23994b452e)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 68daeee434 minor: change method doc on GetTextureHandler.TryParseRange(), mainly to trigger another build 2012-12-06 01:36:30 +00:00
Justin Clark-Casey (justincc) acc01bb85d Allow GetTexture calls with no second value in the range header (e.g. just 5333-)
It looks like the latest Kokua is doing this.
As per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, leaving off the second value is legal
This indicates the caller wants the rest of the entity.
2012-12-06 01:12:12 +00:00
Justin Clark-Casey (justincc) 22d4c52ffc Consistenly make NUnit test cases inherit from OpenSimTestCase which automatically turns off any logging enabled between tests 2012-11-24 03:15:24 +00:00
Diva Canto 790b595aa0 Added a few more AssemblyInfos. (Plus added the one in OptionalModules, which had been forgotten.) 2012-11-13 19:50:19 -08:00
Justin Clark-Casey (justincc) 3af2095cbc minor: Comment out "Client requested range for texture ... but" message. This is not useful during normal operation. 2012-10-12 00:27:12 +01:00
Justin Clark-Casey (justincc) a0d0c9f751 If the GetTexture capability receives a request for a range of data beyond that of an otherwise valid asset, return HTTP PartialContent rather than RequestedRangeNotSatisfiable.
This is because recent viewers (3.2.1, 3.3.4) and probably earlier ones using the http GetTexture capability will sometimes make such invalid range requests.
This appears to happen if the viewer's estimate of texture sizes at discard levels > 0 (chiefly 2) exceeds the total texture size.
I believe this does not normally happen but can occur for dynamic textures with are large but mainly blank.
If this happens, returning a RequestedRangeNotSatisfiable will cause the viewer to not render the texture at the final resolution.
However, returning a PartialContent (or OK) even with 0 data will allow the viewer to render the final texture.
2012-09-06 00:11:47 +01:00
Justin Clark-Casey (justincc) 884d603cac Rather than instantiating a UTF8 encoding everywhere when we want to supress the BOM, use a single Util.UTF8NoBomEncoding.
This class is thread-safe (as evidenced by the provision of the system-wide Encoding.UTF8 which does not suppress BOM on output).
2012-07-13 01:03:28 +01:00
Justin Clark-Casey (justincc) 0f6b7b6a41 If a link points to a non-existing item in FetchInventory caps, then don't try to add it to the return data rather than suffering an exception later on 2012-06-29 00:11:44 +01:00
Justin Clark-Casey (justincc) b23425c7c4 As with LLSDInventoryItem from commit 01a2b0b, send type values in LLSDInventoryFolder for inventory CAPs as integers rather than strings.
Should also resolve some issues with exceptions being thrown in some inventory fetches.
2012-06-20 02:28:00 +01:00
Justin Clark-Casey (justincc) c6e375291a Don't include time to transmit response back to requester when assessing slow handling of requests.
This is to avoid logging a 'slow' request when the source of delay is the viewer in processing a response.
This is not something we can do much about on the server end - it's server-side delay that we're interested in.
To ensure consistency, this commit also had to refactor and simplify inbound non-poll network request handling, though there should be no functional change.
IOSHttpResponse no longer exposes the Send() method, only classes in OpenSim.Framework.Servers.HttpServer should be doing this.
Only the GetTextureHandler was sending its own response.  Now it leaves this to BaseHttpServer, like all other core handlers.
2012-06-13 00:03:44 +01:00
Justin Clark-Casey (justincc) 729d90173f Fix build break whree accidentally did inv.Folders rather than inv.Folders.Count in a minor change. 2012-06-02 05:03:56 +01:00
Justin Clark-Casey (justincc) 2de5479c3f minor: tidy up some comments 2012-06-02 05:01:56 +01:00
Justin Clark-Casey (justincc) 01a2b0b289 Fix various issues with http inventory
1) The return messages were being wrongly populated with the names of asset, inventory and sale types when their corresponding integers should have been used instead.
2) Folders with links were including the linked items in the descendents figure, when only the links should be included.
3) Links and linked items in link folders were not being included in the return data, and not in the correct order.

Now that these issues have been addressed, outfits and attachments appear to work consistently when HTTP inventory is enabled (as is now the default).
2012-06-02 04:57:10 +01:00
PixelTomsen bc543c1797 Environment Module - allows Environment settings for Viewer3 warning: includes database region store migrations for mssql, mysql, sqlite
enable/disable this module:
Cap_EnvironmentSettings = "localhost" (for enable)
Cap_EnvironmentSettings = "" (for disable) at ClientStack.LindenCaps section (OpenSimDefaults.ini file)
 or owerwrite in OpenSim.ini

mantis: http://opensimulator.org/mantis/view.php?id=5860

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-05-23 17:04:19 -04:00
Justin Clark-Casey (justincc) 231a3bf147 Implement optional name and description on http stream handlers so that we can relate a slow request to what the handler actually does and the agent it serves, if applicable.
This is most useful for capabilities where the url is not self-describing.
2012-05-03 01:45:49 +01:00
Justin Clark-Casey (justincc) 07e62df558 Add regression test for teleporting an agent between separated regions on the same simulator.
This involves a large amount of change in test scene setup code to allow test scenes to share shared modules
SetupScene is now an instance method that requires an instantiation of SceneHelpers, though other SceneHelpers methods are still static
May split these out into separate classes in the future.
2012-04-27 00:58:54 +01:00
Diva Canto e324fb2415 Guard against null inventory contents. 2012-04-06 11:22:30 -07:00
Justin Clark-Casey (justincc) 7661a0b2a9 Implement the FetchInventory2 capability. This accompanies the existing FetchInventoryDescendents2 capability.
Not yet enabled by default.  You can enable this by setting Cap_FetchInventory2 = "localhost" in the [ClientStack.LindenCaps] section of OpenSim.ini
Enabling both FetchInventory2 and FetchInventoryDescendents2 improves the situation with properly fetching attachments and hud objects
Probably because viewers are never expecting the odd situation where FetchInventoryDescendents2 is present but not FetchInventory2
However, for some reason attachments and hud objects occasionally fail to appear, though their status is correct in inventory
For attachments, focussing on the avatar makes them appear.  Hud objects have to be reattached.
2012-01-06 21:07:34 +00:00
Justin Clark-Casey (justincc) 014a86c26b Adding commented out log messages and some minor formatting for future bug hunting. No functional changes. 2012-01-02 19:46:30 +00:00
Justin Clark-Casey (justincc) 0b91ec8dd2 Migrate detailed "appearance show" report generation up to AvatarFactoryModule from AppearanceInfoModule so that it can be used in debug (inactive).
Further filters "debug packet <level>" to exclused [Request]ObjectPropertiesFamily if level is below 25.
Adjust some method doc
Minor changes to some logging messages.
2011-12-19 18:58:05 +00:00
Justin Clark-Casey (justincc) 4e9f50b878 Add commented log lines to FetchInventoryDescendents2 path for future use.
Haven't been able to resolve issue where attachments are removed by the viewer on relog on a localhost
2011-12-09 22:32:28 +00:00
Justin Clark-Casey (justincc) 63fe673af1 Revert "Revert "Stop performing the asset save part of baked texture uploading on the UploadBakedTexture cap asynchronously.""
This turned out not to be the upload texture issue.

This reverts commit 8721841fc3.
2011-12-08 23:45:53 +00:00
Justin Clark-Casey (justincc) a8ed185c00 properly lock CapsHandlers.m_capsHandlers 2011-12-07 14:55:01 +00:00
Justin Clark-Casey (justincc) 8e542cfa03 Stop accidentally setting up the UploadTexture caps handler with the same url for all users
This meant that if a user exited the region, the UploadTexture handler would be effectively removed for everyone, causing subsequent failures.
This hopefully resolves the recent UploadTexture LLSD problems
This was a regression in 5640f2e (Thu Dec 1 23:24:15 2011 +0000)
2011-12-06 21:42:56 +00:00
Justin Clark-Casey (justincc) 8721841fc3 Revert "Stop performing the asset save part of baked texture uploading on the UploadBakedTexture cap asynchronously."
This is a possible cause of the dramatic upswing in "Unable to upload... No handler registered for LLSD requests..."
Needs more investigation.

This reverts commit 1854c52ea3.
2011-12-06 18:37:13 +00:00
Justin Clark-Casey (justincc) 319507f521 Add test for not found response from GetTexture cap handler.
Add OpenSim.Region.Capabilities.Handlers.Tests.dll into test suite
2011-12-05 21:04:17 +00:00
Justin Clark-Casey (justincc) 4567555c49 Implement IOSHttpRequest and IOSHttpResponse http interfaces and use instead of OSHttpRequest/OSHttpResponse.
This is required for the substitution of different HTTP servers or the newer HttpServer.dll without having to commit to a particular implementation.
This is also required to write regression tests that involve the HTTP layer.
If you need to recompile, all you need to do is replace OSHttpRequest/OSHttpResponse references with IOSHttpRequest/IOSHttpResponse.
2011-12-05 20:44:20 +00:00
Justin Clark-Casey (justincc) 37889eb3fa For the GetTexture capability, if a data range is requested that covers the whole asset length, return HTTP PartialContent instead of NotFound
NotFound is obviously wrong, and this change stops viewer 3.2.2 (and v probably earlier) complaining in the log about missing textures that are actually present.
We still return PartialContent even if the range requested is a superset of the data range as per httpd's behaviour
https://issues.apache.org/bugzilla/show_bug.cgi?id=51878
Viewer 3.2.2 and very probably earlier appear happy with this.
Whether fixing this NotFound bug has any practical effect apart from resolve viewer log messages is unknown.
2011-12-05 18:35:03 +00:00
Justin Clark-Casey (justincc) 1854c52ea3 Stop performing the asset save part of baked texture uploading on the UploadBakedTexture cap asynchronously.
This prevents a possible race condition where the client would be told all baked textures had updated before they were in the asset service.
The client would then trigger a set appearance which, after a delay, would send the avatar appearance out to other clients.
The race condition seems unlikely because of this delay but it's still possible.
Might help with grey avatar appearances.
2011-12-01 23:38:25 +00:00
Justin Clark-Casey (justincc) 5460f2e035 refactor: Separate the upload baked texture handler out from BunchOfCaps 2011-12-01 23:24:15 +00:00
Justin Clark-Casey (justincc) fa63054c4f On "show caps", stop excluding the seed cap but do exclude it elsewhere 2011-11-29 20:37:03 +00:00
Justin Clark-Casey (justincc) bafea2282a Rip out unused Scene.HandleFetchInventoryDescendentsCAPS().
This has been handled by WebFetchInvDescHandler.Fetch() for some time.
2011-11-26 01:39:23 +00:00
Justin Clark-Casey (justincc) c5b636469d Stop locking the requests coming in to WebFetchInvDecHandler.
There's no technical reason for this as the methods are thread safe.  However, it might have served to slow down requests.
2011-11-26 00:13:04 +00:00
Justin Clark-Casey (justincc) 5b4fe23f7f Resolve error where an unknown asset type would cause the fetch inventory descendents cap to fail.
Introduced just a few commits ago in 0688861
2011-11-25 23:43:57 +00:00
Justin Clark-Casey (justincc) 676d32974a Implement the FetchInventoryDescendents2 capability using the same code as WebFetchInventoryDescendents.
Enabling this by setting Cap_FetchInventoryDescendents2 = "localhost" in the [ClientStack.LindenCaps] section of OpenSim.ini downloads inventory via http rather than udp in later viewers.
2011-11-25 22:46:42 +00:00
Justin Clark-Casey (justincc) 0688861aa7 Use the more extensive Utils.AssetTypeToString()/InventoryTypeToString() conversion rather than the arrays in TaskInventoryItem 2011-11-25 22:15:29 +00:00
Justin Clark-Casey (justincc) 8c82ff16ad Fix WebFetchInventoryDescendents cap to use Utils.AssetTypeTostring/InventoryTypeToString to convert types to strings
These cover a wider range of types.
2011-11-25 21:54:31 +00:00
Justin Clark-Casey (justincc) 63c137820b Stop passing a request handler to the initial caps.RegisterHandler in EventQueueGetModule since this is immediatley replaced by a poll server handler.
This allows us to comment out a bunch of code and simplify the codebase and readability.
2011-11-24 21:27:35 +00:00
Justin Clark-Casey (justincc) 086bf9f15d Save the default terrain texture UUIDs for a new region instead of leaving them as UUID.Zero.
Leaving them at UUID.Zero meant that when a viewer 2 logged into a region that had been freshly created, it received UUID.Zero for these textures, and hence display the land as plain white.
On a simulator restart, the problem would go away since when the database adapators loaded the new region settings, RegionSettings itself has code to use default textures instead of UUID.Zero.
This commit resolves the problem by saving the default texture UUIDs instead of Zero.
However, we currently have to do this in a roundabout way by resaving once the RegionSettings have been created by the database for the first time.  This needless complexity should be addressed.
This change will also have the effect of replacing any existing UUID.Zero terrain textures with the default ones.
However, this shouldn't have any effect since the UUID.Zeros were already being replaced in memory with those same UUIDs.
2011-09-09 00:38:04 +01:00
Justin Clark-Casey (justincc) 3146f4bae0 Don't need to try both AssetService.Get and GetCached in GetMesh since Get always calls GetCached and code paths were identical 2011-08-18 23:36:43 +01:00
Diva Canto a650c74d23 Comment verbose debug message in GetTexture 2011-05-08 16:50:36 -07:00
Justin Clark-Casey (justincc) 04ecd748d9 remove further mono compiler warnings 2011-05-06 22:47:41 +01:00
Melanie f5bb6edd85 Squish a warning 2011-05-05 13:01:46 +01:00
Diva Canto 6b52c1d6cd Fix the GetTexture path to /CAPS/GetTexture for now until we have real capabilities. 2011-05-02 16:16:10 -07:00
Diva Canto 883f21dd02 WebFetchInventoryDescendents working. Tested with robust. 2011-05-02 14:33:34 -07:00
Diva Canto aba9ffdbd0 Refactored the GetMesh module into a handler and a module, to be the same as GetTexture. 2011-05-02 11:56:40 -07:00
Diva Canto 10180760b7 Works! 2011-05-02 08:48:55 -07:00
Diva Canto f79400e94c Broke down Caps.cs into a generic Caps object that simply registers/unregisters capabilities and a specific bunch of capability implementations in Linden space called BunchOfCaps.
Renamed a few methods that were misnomers.
Compiles but doesn't work.
2011-05-01 18:22:53 -07:00
Diva Canto f10666c7ba How this might look like from a configuration perspective. Changes OpenSimDefaults.ini. 2011-05-01 10:07:54 -07:00
Diva Canto 6b2b036387 Added OpenSim.Capabilities.Handlers. For the moment it has only the GetTexture handler. The region module in Linden space uses it. WARNING: nothing of this works yet, it just compiles. 2011-05-01 09:08:18 -07:00