Hi Oren, the correct way is to create an additional post handler that is reachable at a different URL, e,g, /AssetQuery/
Servers that don't implement it would return 404. Don't try to shoehorn this functionality into the existing post handler. Melanie On 31 Mar 2014, at 13:55, Oren Hurvitz <or...@kitely.com> wrote: I have implemented this method. I found that the Assets Service already had a method to check for assets' existence, so I just had to extend it to check multiple asset ID's at once, and make it available remotely. But now I'm not sure what to do about backwards compatibility. I'm sending the request using POST, because sending a lot of data is better done using POST than GET. But as it turns out, AssetServerPostHandler doesn't handle unknown requests well. First, it assumes that all requests will contain an AssetBase, but this request doesn't. Second, its try/catch clause doesn't catch the exception that is generated, because it's an InvalidOperationException and not an XmlException (which is what's currently caught). The unfortunate result is that the server doesn't send back *any* reply, which means that the caller must wait for the full timeout (100 seconds!) before giving up. [BTW, I'm going to investigate this further because it may explain the 100-second timeouts users occasionally experience.] I've already fixed this problem in the current patch (not yet submitted), so that in the future AssetServerPostHandler will return an error code immediately for unknown requests (HTTP 400). But that won't help when connecting to old grids. I see two ways to fix this: 1. Send the request using GET instead of POST. AssetServerGetHandler handles unknown requests a little better than POST: it tries to find the parameter as an Asset ID, but if not found then it just returns HTTP 404 immediately. 2. Add a way to query the server for its capabilities, to find out if it supports this request. I prefer approach #2 because it can be used in the future for many other new features. How about adding a method to IGatekeeperService, something like this: Dictionary<string,string> GetServerCapabilities(); In this example, the capability will be: "SupportsAssetsExist"="true" -- View this message in context: http://opensim-dev.2196679.n2.nabble.com/Optimize-pushing-assets-to-other-grids-tp7579093p7579100.html Sent from the opensim-dev mailing list archive at Nabble.com. _______________________________________________ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev _______________________________________________ Opensim-dev mailing list Opensim-dev@lists.berlios.de https://lists.berlios.de/mailman/listinfo/opensim-dev